* [gentoo-commits] portage r11314 - main/trunk/pym/portage/sets
@ 2008-08-01 21:56 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-08-01 21:56 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-08-01 21:56:26 +0000 (Fri, 01 Aug 2008)
New Revision: 11314
Modified:
main/trunk/pym/portage/sets/profiles.py
Log:
Add debug support to PackagesSystemSet since robbat2 is reporting an empty
set for some unknown reason.
Modified: main/trunk/pym/portage/sets/profiles.py
===================================================================
--- main/trunk/pym/portage/sets/profiles.py 2008-08-01 11:16:40 UTC (rev 11313)
+++ main/trunk/pym/portage/sets/profiles.py 2008-08-01 21:56:26 UTC (rev 11314)
@@ -2,18 +2,22 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import logging
import os
from portage.util import grabfile_package, stack_lists
from portage.sets.base import PackageSet
+from portage.sets import get_boolean
+from portage.util import writemsg_level
__all__ = ["PackagesSystemSet"]
class PackagesSystemSet(PackageSet):
_operations = ["merge"]
- def __init__(self, profile_paths):
+ def __init__(self, profile_paths, debug=False):
super(PackagesSystemSet, self).__init__()
self._profile_paths = profile_paths
+ self._debug = debug
if profile_paths:
description = self._profile_paths[-1]
if description == "/etc/portage/profile" and \
@@ -24,10 +28,26 @@
self.description = "System packages for profile %s" % description
def load(self):
+ debug = self._debug
+ if debug:
+ writemsg_level("\nPackagesSystemSet: profile paths: %s\n" % \
+ (self._profile_paths,), level=logging.DEBUG, noiselevel=-1)
+
mylist = [grabfile_package(os.path.join(x, "packages")) for x in self._profile_paths]
+
+ if debug:
+ writemsg_level("\nPackagesSystemSet: raw packages: %s\n" % \
+ (mylist,), level=logging.DEBUG, noiselevel=-1)
+
mylist = stack_lists(mylist, incremental=1)
+
+ if debug:
+ writemsg_level("\nPackagesSystemSet: stacked packages: %s\n" % \
+ (mylist,), level=logging.DEBUG, noiselevel=-1)
+
self._setAtoms([x[1:] for x in mylist if x[0] == "*"])
def singleBuilder(self, options, settings, trees):
- return PackagesSystemSet(settings.profiles)
+ debug = get_boolean(options, "debug", False)
+ return PackagesSystemSet(settings.profiles, debug=debug)
singleBuilder = classmethod(singleBuilder)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-01 21:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 21:56 [gentoo-commits] portage r11314 - main/trunk/pym/portage/sets Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox