Bug #199408 - Always enable the skip_masked and skip_unsatisfied for the
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Jan 2009 22:49:42 +0000 (22:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Jan 2009 22:49:42 +0000 (22:49 -0000)
resume_depgraph() function. This will cause emerge --resume to automatically
drop masked packages (without the need to specify --skipfirst).

svn path=/main/trunk/; revision=12543

pym/_emerge/__init__.py

index 1252f3874909fef2b1a63b704017b55af15d1043..4292865fbedd51204b94fd3f13262e3cc051bb81 100644 (file)
@@ -10867,7 +10867,7 @@ class Scheduler(PollScheduler):
                try:
                        success, mydepgraph, dropped_tasks = resume_depgraph(
                                self.settings, self.trees, self._mtimedb, self.myopts,
-                               myparams, self._spinner, skip_unsatisfied=True)
+                               myparams, self._spinner)
                except depgraph.UnsatisfiedResumeDep, e:
                        mydepgraph = e.depgraph
                        dropped_tasks = set()
@@ -13660,14 +13660,15 @@ def action_depclean(settings, trees, ldpath_mtimes,
        else:
                print "Number removed:       "+str(len(cleanlist))
 
-def resume_depgraph(settings, trees, mtimedb, myopts, myparams, spinner,
-       skip_masked=False, skip_unsatisfied=False):
+def resume_depgraph(settings, trees, mtimedb, myopts, myparams, spinner):
        """
        Construct a depgraph for the given resume list. This will raise
        PackageNotFound or depgraph.UnsatisfiedResumeDep when necessary.
        @rtype: tuple
        @returns: (success, depgraph, dropped_tasks)
        """
+       skip_masked = True
+       skip_unsatisfied = True
        mergelist = mtimedb["resume"]["mergelist"]
        dropped_tasks = set()
        while True:
@@ -13870,14 +13871,11 @@ def action_build(settings, trees, mtimedb,
                                        del mergelist[i]
                                        break
 
-               skip_masked      = "--skipfirst" in myopts
-               skip_unsatisfied = "--skipfirst" in myopts
                success = False
                mydepgraph = None
                try:
                        success, mydepgraph, dropped_tasks = resume_depgraph(
-                               settings, trees, mtimedb, myopts, myparams, spinner,
-                               skip_masked=skip_masked, skip_unsatisfied=skip_unsatisfied)
+                               settings, trees, mtimedb, myopts, myparams, spinner)
                except (portage.exception.PackageNotFound,
                        depgraph.UnsatisfiedResumeDep), e:
                        if isinstance(e, depgraph.UnsatisfiedResumeDep):