diff options
Diffstat (limited to 'src/tinderbox/__init__.py')
-rw-r--r-- | src/tinderbox/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tinderbox/__init__.py b/src/tinderbox/__init__.py index b3da906..bf7e96b 100644 --- a/src/tinderbox/__init__.py +++ b/src/tinderbox/__init__.py @@ -441,8 +441,18 @@ class Package(object): pi.content = self.content pi.attachments = self.attachments pi.depends = self.depends + pi.profile = self._get_current_profile() return pi + def _get_current_profile(self): + ret = None + try: + profpath = os.readlink("%s/etc/make.profile" % portage.root) + ret = profpath[profpath.rindex("profiles")+len("profiles")+1:] + except Exception, e: + print e + return ret + def get_package_contents(self): """Returns package contents as dict with paths as keys |