* [gentoo-commits] portage r11937 - in main/branches/prefix/pym: _emerge portage
@ 2008-11-15 15:17 Fabian Groffen (grobian)
0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2008-11-15 15:17 UTC (permalink / raw
To: gentoo-commits
Author: grobian
Date: 2008-11-15 15:17:23 +0000 (Sat, 15 Nov 2008)
New Revision: 11937
Modified:
main/branches/prefix/pym/_emerge/__init__.py
main/branches/prefix/pym/portage/__init__.py
main/branches/prefix/pym/portage/dep.py
Log:
Merged from trunk -r11811:11816
| 11812 | Override Atom.__setattr__() to make Atom instances |
| zmedico | immutable. Thanks to Brian Harring for the suggestion. |
| 11813 | In Atom.__setattr__(), include inputs in case it helps for |
| zmedico | debugging with derived classes. Thanks to Brian Harring for |
| | the suggestion. |
| 11814 | Bug #245661 - Never enable --complete-graph automatically |
| zmedico | since it's confusing for users. |
| 11815 | Remove the special package.keywords mask warning from bug |
| zmedico | #223447 since --depclean now uses the depgraph class and |
| | therefore should be more consistent with the update |
| | algorithm. |
| 11816 | Bug #245932 - Pass use_mask and use_force parameters into |
| zmedico | recursive _expand_new_virtuals() calls, fixing a TypeError |
| | which is triggered inside |
| | portage.dep._use_dep._eval_qa_conditionals(). |
Modified: main/branches/prefix/pym/_emerge/__init__.py
===================================================================
--- main/branches/prefix/pym/_emerge/__init__.py 2008-11-15 06:52:29 UTC (rev 11936)
+++ main/branches/prefix/pym/_emerge/__init__.py 2008-11-15 15:17:23 UTC (rev 11937)
@@ -4194,14 +4194,7 @@
_dep_keys = ["DEPEND", "RDEPEND", "PDEPEND"]
- # If dep calculation time exceeds this value then automatically
- # enable "complete" mode since any performance difference is
- # not as likely to be noticed by the user after this much time
- # has passed.
- _complete_threshold = 20
-
def __init__(self, settings, trees, myopts, myparams, spinner):
- self._creation_time = time.time()
self.settings = settings
self.target_root = settings["ROOT"]
self.myopts = myopts
@@ -5795,19 +5788,15 @@
intially satisfied.
Since this method can consume enough time to disturb users, it is
- currently only enabled by the --complete-graph option, or when
- dep calculation time exceeds self._complete_threshold.
+ currently only enabled by the --complete-graph option.
"""
if "--buildpkgonly" in self.myopts or \
"recurse" not in self.myparams:
return 1
if "complete" not in self.myparams:
- if time.time() - self._creation_time > self._complete_threshold:
- self.myparams.add("complete")
- else:
- # Skip this to avoid consuming enough time to disturb users.
- return 1
+ # Skip this to avoid consuming enough time to disturb users.
+ return 1
# Put the depgraph into a mode that causes it to only
# select packages that have already been added to the
@@ -5936,43 +5925,13 @@
stale_cache.discard(cpv)
pkg_in_graph = self.digraph.contains(pkg)
- # Check for masked installed packages. For keyword
- # mask there are a couple of common cases that are
- # likely to generate unwanted noise:
- #
- # * Packages missing /var/db/pkg/*/*/KEYWORDS entries
- # due to having been installed by an old version of
- # portage.
- #
- # * Packages installed by overriding ACCEPT_KEYWORDS
- # via the environment.
- #
- # To avoid unwanted noise, only warn about keyword
- # masks if all of the following are true:
- #
- # * KEYWORDS is not empty (not installed by old portage).
- #
-
+ # Check for masked installed packages. Only warn about
+ # packages that are in the graph in order to avoid warning
+ # about those that will be automatically uninstalled during
+ # the merge process or by --depclean.
if pkg in final_db:
if pkg_in_graph and not visible(pkgsettings, pkg):
self._masked_installed.add(pkg)
- elif pkgsettings._getMissingKeywords(
- pkg.cpv, pkg.metadata) and \
- pkg.metadata["KEYWORDS"].split() and \
- not pkg_in_graph:
- try:
- ebuild = self._pkg(pkg.cpv,
- "ebuild", pkg.root_config)
- except KeyError:
- ebuild = None
- else:
- try:
- if not visible(pkgsettings, ebuild):
- ebuild = None
- except portage.exception.InvalidDependString:
- ebuild = None
- if ebuild is None:
- self._masked_installed.add(pkg)
blocker_atoms = None
blockers = None
Modified: main/branches/prefix/pym/portage/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/__init__.py 2008-11-15 06:52:29 UTC (rev 11936)
+++ main/branches/prefix/pym/portage/__init__.py 2008-11-15 15:17:23 UTC (rev 11937)
@@ -6199,7 +6199,8 @@
continue
elif isinstance(x, list):
newsplit.append(_expand_new_virtuals(x, edebug, mydbapi,
- mysettings, myroot=myroot, trees=trees, **kwargs))
+ mysettings, myroot=myroot, trees=trees, use_mask=use_mask,
+ use_force=use_force, **kwargs))
continue
if not isinstance(x, portage.dep.Atom):
Modified: main/branches/prefix/pym/portage/dep.py
===================================================================
--- main/branches/prefix/pym/portage/dep.py 2008-11-15 06:52:29 UTC (rev 11936)
+++ main/branches/prefix/pym/portage/dep.py 2008-11-15 15:17:23 UTC (rev 11937)
@@ -529,29 +529,32 @@
def __init__(self, s):
if not isvalidatom(s, allow_blockers=True):
raise InvalidAtom(s)
+ obj_setattr = object.__setattr__
for x in self._str_methods:
- setattr(self, x, getattr(s, x))
+ obj_setattr(self, x, getattr(s, x))
blocker = "!" == s[:1]
if blocker:
- self.blocker = self._blocker(forbid_overlap=("!" == s[1:2]))
- if self.blocker.overlap.forbid:
+ blocker = self._blocker(forbid_overlap=("!" == s[1:2]))
+ if blocker.overlap.forbid:
s = s[2:]
else:
s = s[1:]
else:
- self.blocker = False
+ blocker = False
+ obj_setattr(self, "blocker", blocker)
- self.cp = dep_getkey(s)
- self.cpv = dep_getcpv(s)
- self.slot = dep_getslot(s)
- self.operator = get_operator(s)
- #self.repo = self._get_repo(s)
- self.use = dep_getusedeps(s)
- if self.use:
- self.use = _use_dep(self.use)
+ obj_setattr(self, "cp", dep_getkey(s))
+ obj_setattr(self, "cpv", dep_getcpv(s))
+ obj_setattr(self, "slot", dep_getslot(s))
+ obj_setattr(self, "operator", get_operator(s))
+
+ use = dep_getusedeps(s)
+ if use:
+ use = _use_dep(use)
else:
- self.use = None
+ use = None
+ obj_setattr(self, "use", use)
def __cmp__(self, other):
self_str = str(self)
@@ -562,6 +565,10 @@
return 1
return -1
+ def __setattr__(self, name, value):
+ raise AttributeError("Atom instances are immutable",
+ self.__class__, name, value)
+
def get_operator(mydep):
"""
Return the operator used in a depstring.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-15 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15 15:17 [gentoo-commits] portage r11937 - in main/branches/prefix/pym: _emerge portage Fabian Groffen (grobian)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox