diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-06-30 21:33:42 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-06-30 21:33:42 +0000 |
commit | f2d79bd71046d1b5b9a9c949c667739159ab5c98 (patch) | |
tree | 4d872afadd1e984371a0a3ce58fa67ba156b7d8d /pym/_emerge/depgraph.py | |
parent | d7f6174284a3d97613c2f5b8cee48fccfd22dcf8 (diff) | |
download | portage-f2d79bd71046d1b5b9a9c949c667739159ab5c98.tar.gz portage-f2d79bd71046d1b5b9a9c949c667739159ab5c98.tar.bz2 portage-f2d79bd71046d1b5b9a9c949c667739159ab5c98.zip |
Bug #275945 - Add a new --avoid-update which tries to avoid updating packages
which possible. Thanks to Sebastian Mingramm (few) <s.mingramm@gmx.de> for
this patch.
svn path=/main/trunk/; revision=13745
Diffstat (limited to 'pym/_emerge/depgraph.py')
-rw-r--r-- | pym/_emerge/depgraph.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 25e385521..de097c419 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2091,6 +2091,11 @@ class depgraph(object): 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 \ |