I think we need something like that:
=== modified file 'DistUpgrade/DistUpgradeController.py' --- DistUpgrade/DistUpgradeController.py 2018-01-29 09:43:48 +0000 +++ DistUpgrade/DistUpgradeController.py 2018-02-07 10:01:22 +0000 @@ -772,6 +772,17 @@ logging.debug("updateSourcesList()") self.sources = SourcesList(matcherPath=self.datadir) # backup first! + + if not any(e.dist == self.fromDist for e in self.sources): + res = self._view.askYesNoQuestion(_("No valid sources.list entry found"), + _("While scanning your repository " + "information no entry about %s could be " + "found.\n\n" + "An upgrade might not succeed.\n\n" + "Do you want to continue anyway?" % self.fromDist) + if not res: + self.abort() + self.sources.backup(self.sources_backup_ext) if not self.rewriteSourcesList(mirror_check=True): logging.error("No valid mirror found")
It might be a bit too stupid, though.
I think we need something like that:
=== modified file 'DistUpgrade/ DistUpgradeCont roller. py' DistUpgradeCont roller. py 2018-01-29 09:43:48 +0000 DistUpgradeCont roller. py 2018-02-07 10:01:22 +0000
logging. debug(" updateSourcesLi st()")
self. sources = SourcesList( matcherPath= self.datadir) askYesNoQuestio n(_("No valid sources.list entry found"),
self. sources. backup( self.sources_ backup_ ext) rcesList( mirror_ check=True) :
logging. error(" No valid mirror found")
--- DistUpgrade/
+++ DistUpgrade/
@@ -772,6 +772,17 @@
# backup first!
+
+ if not any(e.dist == self.fromDist for e in self.sources):
+ res = self._view.
+ _("While scanning your repository "
+ "information no entry about %s could be "
+ "found.\n\n"
+ "An upgrade might not succeed.\n\n"
+ "Do you want to continue anyway?" % self.fromDist)
+ if not res:
+ self.abort()
+
if not self.rewriteSou
It might be a bit too stupid, though.