לא יסור שבט מיהודה. מדרש אגדה לא יסור לא יפרח כמו סורי הגפן נכריה שהוא כמו לולבי הגפן: לא יסור שבט מיהודה, according to a Midrash this line is to be understood as in Jeremiah 2,21: “it will not blossom;” the word appears in this sense there סורי הגפן נכריה, “the vine blossomed into an alien vine.” In other words: Yaakov cautions that the rod of Yehudah as a ruler will not blossom forth
עד כי יבא שילה. עד שיחרב משכן שילה יבא לשון חרבן כמו לא יבא עוד שמשך וה"פ לא יפרח ולא ינץ מלך ביהודה עד כי יטוש משכן שילה וכן הוא אומר ויטש משכן שילה וסמיך ליה ויבחר בדוד עבדו. ד"א לא יסור מלכות מבית דוד ליתנו לאחר כמו שסר משאול עד כי יבא שילה מלך המשיח וכ"ש כשיבא משיח שהרי משיח בן דוד הוא ונמצא שלא יסור לעולם והה"ד ונאמן ביתך וממלכה עד עולם וכתיב וחסדי לא אסיר מעמו כאשר הסירותי מעם שאול ד"א לא יסור שבט מיהודה שלא ימלוך על כל ישראל עד כי יבא שילה כלומ' בשכם שנתחלקה שם המלכות ושילה ושכם היו קרובים זה לזה כדכתיב בין שילה ובין שכם ולכך נקט שילה ומ"מ ולו יקהת עמים לאחר שנתחלקה המלכות. ד"א לא יסור שבט מיהודה ומחוקק מבין רגליו עד כלומר לעולמי עד כי יבא שילה שהרי יבא משיח שהוא משבטו. מהרב ר' יצחק: עד כי יבא שילה, “not until the Tabernacle in Shiloh will be ruined. The word יבא in this line does not mean “he will come,” but is an expression denoting ruin, just as in Isaiah 60,20: לא יבא עוד שמשך, “your sun will never set again;” An alternate interpretation of this verse: instead of referring to Yehudah’s ascent to the throne being still a long way off, Yaakov promises that once on the throne of the Kingdom of Yehudah, the rod symbolising the power of the holder of it will not be usurped per by another tribe, as it had been done after Saul’s dynasty collapsed until the coming of the Messiah, symbolised by the word שילה, in other words, not ever. G–d confirmed Yaakov’s promise to David in Samuel II 7,16: through the prophet Natan. A third possible interpretation of our verse; David will not lose the throne of all of Israel until after the fateful assembly in Sh’chem,- very close to Shiloh- when ten tribes crowned Jerobam as their king, and Rechavam, Solomon’s son retained the loyalty only of his own tribe and that of the tribe of Binyamin. Still another interpretation of our verse: in spite of many revolutions, exiles etc. that will occur after the first King from the tribe of Yehudah, David will ascend the throne, when the Messiah will arrive who will be from the tribe of Yehudah, and he will rule without anyone disputing his right to do so. (Attributed to Rav Rachmiel? Yitzchok)