diff --git a/pisi/archive.py b/pisi/archive.py index 8f9b2287..6bb33901 100644 --- a/pisi/archive.py +++ b/pisi/archive.py @@ -42,12 +42,11 @@ class ArchiveBase(object): self.type = atype def unpack(self, target_dir, clean_dir = False): - self.target_dir = target_dir # first we check if we need to clean-up our working env. - if os.path.exists(self.target_dir) and clean_dir: - util.clean_dir(self.target_dir) + if os.path.exists(target_dir) and clean_dir: + util.clean_dir(target_dir) - os.makedirs(self.target_dir) + os.makedirs(target_dir) class ArchiveBinary(ArchiveBase): diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 2cbfb564..616a4cb9 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -42,12 +42,8 @@ class NotfoundError(pisi.Error): class AtomicOperation(object): - def __init__(self, ignore_dep = None): - #self.package = package - if ignore_dep==None: - self.ignore_dep = ctx.config.get_option('ignore_dependency') - else: - self.ignore_dep = ignore_dep + def __init__(self): + pass def run(self, package): "perform an atomic package operation" @@ -58,7 +54,7 @@ class Install(AtomicOperation): "Install class, provides install routines for pisi packages" @staticmethod - def from_name(name, ignore_dep = None): + def from_name(name): # download package and return an installer object # find package in repository repo = ctx.packagedb.which_repo(name) @@ -77,13 +73,13 @@ class Install(AtomicOperation): ctx.ui.info(_("Package URI: %s") % pkg_path, verbose=True) - return Install(pkg_path, ignore_dep) + return Install(pkg_path) else: raise Error(_("Package %s not found in any active repository.") % name) - def __init__(self, package_fname, ignore_dep = None, ignore_file_conflicts = None): + def __init__(self, package_fname, ignore_file_conflicts = None): "initialize from a file name" - super(Install, self).__init__(ignore_dep) + super(Install, self).__init__() if not ignore_file_conflicts: ignore_file_conflicts = ctx.get_option('ignore_file_conflicts') self.ignore_file_conflicts = ignore_file_conflicts @@ -394,8 +390,8 @@ def install_single_name(name, upgrade = False): class Remove(AtomicOperation): - def __init__(self, package_name, ignore_dep = None): - super(Remove, self).__init__(ignore_dep) + def __init__(self, package_name): + super(Remove, self).__init__() self.package_name = package_name self.package = ctx.packagedb.get_package(self.package_name, pisi.itembyrepodb.installed) try: diff --git a/remove_unused_attributes.patch b/remove_unused_attributes.patch deleted file mode 100644 index 887a0a94..00000000 --- a/remove_unused_attributes.patch +++ /dev/null @@ -1,76 +0,0 @@ -Index: pisi/atomicoperations.py -=================================================================== ---- pisi/atomicoperations.py (revision 11473) -+++ pisi/atomicoperations.py (working copy) -@@ -42,12 +42,8 @@ - - class AtomicOperation(object): - -- def __init__(self, ignore_dep = None): -- #self.package = package -- if ignore_dep==None: -- self.ignore_dep = ctx.config.get_option('ignore_dependency') -- else: -- self.ignore_dep = ignore_dep -+ def __init__(self): -+ pass - - def run(self, package): - "perform an atomic package operation" -@@ -58,7 +54,7 @@ - "Install class, provides install routines for pisi packages" - - @staticmethod -- def from_name(name, ignore_dep = None): -+ def from_name(name): - # download package and return an installer object - # find package in repository - repo = ctx.packagedb.which_repo(name) -@@ -77,13 +73,13 @@ - - ctx.ui.info(_("Package URI: %s") % pkg_path, verbose=True) - -- return Install(pkg_path, ignore_dep) -+ return Install(pkg_path) - else: - raise Error(_("Package %s not found in any active repository.") % name) - -- def __init__(self, package_fname, ignore_dep = None, ignore_file_conflicts = None): -+ def __init__(self, package_fname, ignore_file_conflicts = None): - "initialize from a file name" -- super(Install, self).__init__(ignore_dep) -+ super(Install, self).__init__() - if not ignore_file_conflicts: - ignore_file_conflicts = ctx.get_option('ignore_file_conflicts') - self.ignore_file_conflicts = ignore_file_conflicts -@@ -394,8 +390,8 @@ - - class Remove(AtomicOperation): - -- def __init__(self, package_name, ignore_dep = None): -- super(Remove, self).__init__(ignore_dep) -+ def __init__(self, package_name): -+ super(Remove, self).__init__() - self.package_name = package_name - self.package = ctx.packagedb.get_package(self.package_name, pisi.itembyrepodb.installed) - try: -Index: pisi/archive.py -=================================================================== ---- pisi/archive.py (revision 11473) -+++ pisi/archive.py (working copy) -@@ -42,12 +42,11 @@ - self.type = atype - - def unpack(self, target_dir, clean_dir = False): -- self.target_dir = target_dir - # first we check if we need to clean-up our working env. -- if os.path.exists(self.target_dir) and clean_dir: -- util.clean_dir(self.target_dir) -+ if os.path.exists(target_dir) and clean_dir: -+ util.clean_dir(target_dir) - -- os.makedirs(self.target_dir) -+ os.makedirs(target_dir) - - - class ArchiveBinary(ArchiveBase):