Index: pym/_emerge/depgraph.py =================================================================== --- pym/_emerge/depgraph.py (revision 13744) +++ pym/_emerge/depgraph.py (working copy) @@ -2091,6 +2091,11 @@ break if len(matched_packages) > 1: + if "--avoid-update" in self.myopts: + for pkg in matched_packages: + if pkg.installed: + return pkg, existing_node + bestmatch = portage.best( [pkg.cpv for pkg in matched_packages]) matched_packages = [pkg for pkg in matched_packages \ Index: pym/_emerge/main.py =================================================================== --- pym/_emerge/main.py (revision 13744) +++ pym/_emerge/main.py (working copy) @@ -65,6 +65,7 @@ "--searchdesc", "--selective", "--skipfirst", "--tree", +"--avoid-update", "--update", "--usepkg", "--usepkgonly", "--verbose", @@ -1060,6 +1061,10 @@ noiselevel=-1) return 1 + if ("--avoid-update" in myopts) and ("--update" in myopts): + writemsg("!!! confilcting options given: --update and --avoid-update\n", noiselevel=-1) + return 1 + if settings.get("PORTAGE_DEBUG", "") == "1": spinner.update = spinner.update_quiet portage.debug=1 Index: pym/_emerge/help.py =================================================================== --- pym/_emerge/help.py (revision 13744) +++ pym/_emerge/help.py (working copy) @@ -235,6 +235,14 @@ print " to the prompt, so an accidental press of the \"Enter\" key at any" print " time prior to the prompt will be interpreted as a choice!" print + print " "+green("--avoid-update") + print " Tries to prevent package updates. This may not always be possible" + print " since new packages or new dependencies due to use flag changes may" + print " require a newer version of an installed package. Furthermore this" + print " option may lead to slot conflicts (Multiple package instances within" + print " a single package slot have been pulled into the dependency graph)." + print " It is not possible to use this option in such a case." + print print " "+green("--buildpkg")+" ("+green("-b")+" short option)" desc = "Tells emerge to build binary packages for all ebuilds processed in" + \ " addition to actually merging the packages. Useful for maintainers" + \ Index: man/emerge.1 =================================================================== --- man/emerge.1 (revision 13744) +++ man/emerge.1 (working copy) @@ -90,6 +90,13 @@ to the \fBworld\fR file at the end, so that they are considered for later updating. .TP +.BR "\-\-avoid\-update " +Tries to prevent package updates. This may not always be possible since new +packages or new dependencies due to use flag changes may require a newer version +of an installed package. Furthermore this option may lead to slot conflicts +(Multiple package instances within a single package slot have been pulled +into the dependency graph). It is not possible to use this option in such a case. +.TP .BR "\-\-clean " (\fB\-c\fR) Cleans up the system by examining the installed packages and removing older packages. This is accomplished by looking at each installed package and separating @@ -364,6 +371,9 @@ USE flags may be toggled by your profile as well as your USE and package.use settings. + +\fB\-\-avoid\-update\fR may prevent updates of installed packages without +use flag changes. Note that \fB\-\-avoid-\update\fR may lead to slot conflicts. .TP .BR "\-\-noconfmem" Causes portage to disregard merge records indicating that a config file