summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/backend/__init__.py2
-rw-r--r--portato/backend/package.py3
-rw-r--r--portato/backend/portage_helper.py9
3 files changed, 8 insertions, 6 deletions
diff --git a/portato/backend/__init__.py b/portato/backend/__init__.py
index 1e7066f..a72923b 100644
--- a/portato/backend/__init__.py
+++ b/portato/backend/__init__.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-import sys, copy, os
+import os
from threading import Lock
# import portage
diff --git a/portato/backend/package.py b/portato/backend/package.py
index 436b5e1..d4eff19 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -203,7 +203,7 @@ class Package:
i_flags.append(f)
return i_flags
else:
- return self.get_new_flags()
+ return self.get_new_use_flags()
def set_use_flag (self, flag):
"""Set a use-flag.
@@ -377,6 +377,7 @@ class Package:
p = self.get_ebuild_path()
sp = p.split("/")
if len(sp):
+ import string
return string.join(sp[:-1],"/")
def get_env_var(self, var, tree = None):
diff --git a/portato/backend/portage_helper.py b/portato/backend/portage_helper.py
index a215b51..42b1d19 100644
--- a/portato/backend/portage_helper.py
+++ b/portato/backend/portage_helper.py
@@ -10,9 +10,10 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-import re, os, copy
-
+import re, os
+import types
import portage
+
from portage_util import unique_array
from portato.backend import portage_settings
@@ -141,7 +142,7 @@ def find_system_packages ():
@returns: a tuple of (resolved_packages, unresolved_packages).
@rtype: (backend.Package[], backend.Package[])"""
- pkglist = settings.packages
+ pkglist = portage_settings.settings.packages
resolved = []
unresolved = []
for x in pkglist:
@@ -323,7 +324,7 @@ def update_world (newuse = False, deep = False):
world.close()
# append system packages
- sys = portage_settings.settings.packages
+ sys = find_all_system_packages()
for x in sys:
if x[0] == "*": # some packages are stored with a '*' at the front - ignore it
x = x[1:]