diff options
Diffstat (limited to 'portato/backend/flags.py')
-rw-r--r-- | portato/backend/flags.py | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py index 99ff56f..1e1325e 100644 --- a/portato/backend/flags.py +++ b/portato/backend/flags.py @@ -10,14 +10,15 @@ # # Written by René 'Necoro' Neumann <necoro@necoro.net> +from __future__ import absolute_import + import os import os.path from subprocess import Popen, PIPE # needed for grep from gettext import lgettext as _ -from portato.helper import * -from portato.backend import system -import package +from . import system, _Package +from ..helper import debug, error, unique_array CONFIG = { "usefile" : "portato", @@ -93,7 +94,7 @@ def grep (pkg, path): @returns: occurences of pkg in the format: "file:line-no:complete_line_found" @rtype: string""" - if not isinstance(pkg, package.Package): + if not isinstance(pkg, _Package): pkg = system.new_package(pkg) # assume it is a cpv or a gentoolkit.Package if os.path.exists(path): @@ -201,7 +202,7 @@ def set_use_flag (pkg, flag): global useFlags, newUseFlags - if not isinstance(pkg, package.Package): + if not isinstance(pkg, _Package): pkg = system.new_package(pkg) # assume cpv or gentoolkit.Package cpv = pkg.get_cpv() @@ -265,7 +266,7 @@ def remove_new_use_flags (cpv): @param cpv: the package for which to remove the flags @type cpv: string (cpv) or L{backend.Package}-object""" - if isinstance(cpv, package.Package): + if isinstance(cpv, _Package): cpv = cpv.get_cpv() try: @@ -281,7 +282,7 @@ def get_new_use_flags (cpv): @returns: list of flags @rtype: string[]""" - if isinstance(cpv, package.Package): + if isinstance(cpv, _Package): cpv = cpv.get_cpv() list2return = [] @@ -398,7 +399,7 @@ def set_masked (pkg, masked = True): global new_masked, newunmasked - if not isinstance(pkg, package.Package): + if not isinstance(pkg, _Package): pkg = system.new_package(pkg) cpv = pkg.get_cpv() @@ -457,7 +458,7 @@ def set_masked (pkg, masked = True): debug("new_(un)masked: %s",str(link_neq)) def remove_new_masked (cpv): - if isinstance(cpv, package.Package): + if isinstance(cpv, _Package): cpv = cpv.get_cpv() try: @@ -471,7 +472,7 @@ def remove_new_masked (cpv): pass def new_masking_status (cpv): - if isinstance(cpv, package.Package): + if isinstance(cpv, _Package): cpv = cpv.get_cpv() def get(list): @@ -499,7 +500,7 @@ def new_masking_status (cpv): def is_locally_masked (pkg, changes = True): - if not isinstance(pkg, package.Package): + if not isinstance(pkg, _Package): pkg = system.new_package(pkg) # assume it is a cpv or a gentoolkit.Package if changes: @@ -594,7 +595,7 @@ newTesting = {} arch = "" def remove_new_testing (cpv): - if isinstance(cpv, package.Package): + if isinstance(cpv, _Package): cpv = cpv.get_cpv() try: @@ -603,7 +604,7 @@ def remove_new_testing (cpv): pass def new_testing_status (cpv): - if isinstance(cpv, package.Package): + if isinstance(cpv, _Package): cpv = cpv.get_cpv() if cpv in newTesting: @@ -621,7 +622,7 @@ def set_testing (pkg, enable): @type enable: boolean""" global arch, newTesting - if not isinstance(pkg, package.Package): + if not isinstance(pkg, _Package): pkg = system.new_package(pkg) arch = pkg.get_global_settings("ARCH") |