From 7b54f2eff60325c8d4a8f62dcc7ec0dbdacfe9ed Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 2 May 2006 14:14:27 +0000 Subject: [PATCH] #fixes 2638 --- pisi/build.py | 12 ++++++------ pisi/cli/commands.py | 8 ++++---- pisi/util.py | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 8afd1b85..18645434 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -77,8 +77,8 @@ def check_path_collision(package, pkgList): # collide. Exp: # pinfo.path: /usr/share # path.path: /usr/share/doc - if (path.path.endswith(ctx.const.ar_file_suffix) and ctx.get_option('create_static')) or \ - (path.path.endswith(ctx.const.debug_file_suffix) and ctx.get_option('create_debug')): + if (path.path.endswith(ctx.const.ar_file_suffix) and not ctx.get_option('no_static')) or \ + (path.path.endswith(ctx.const.debug_file_suffix) and not ctx.get_option('no_debug')): # don't throw collision error for these files. # we'll handle this in gen_files_xml.. continue @@ -611,14 +611,14 @@ class Builder: def add_path(path): # add the files under material path for fpath, fhash in util.get_file_hashes(path, collisions, install_dir): - if ctx.get_option('create_static') \ + if not ctx.get_option('no_static') \ and fpath.endswith(ctx.const.ar_file_suffix) \ and not package.name.endswith(ctx.const.static_name_suffix) \ and util.is_ar_file(fpath): # if this is an ar file, and this package is not a static package, # don't include this file into the package. continue - if ctx.get_option('create_debug') \ + if not ctx.get_option('no_debug') \ and fpath.endswith(ctx.const.debug_file_suffix) \ and not package.name.endswith(ctx.const.debug_name_suffix): # if this is a debug file, and this package is not a debug package, @@ -729,12 +729,12 @@ class Builder: # Strip install directory before building .pisi packages. self.strip_install_dir() - if ctx.get_option('create_static'): + if not ctx.get_option('no_static'): obj = self.generate_static_package_object() if obj: self.spec.packages.append(obj) - if ctx.get_option('create_debug'): + if not ctx.get_option('no_debug'): obj = self.generate_debug_package_object() if obj: self.spec.packages.append(obj) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 39025643..69615b71 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -360,10 +360,10 @@ unpack, setup, build, install, package help=_("bypass errors from ActionsAPI")) self.parser.add_option("-B", "--ignore-comar", action="store_true", default=False, help=_("bypass comar configuration agent")) - self.parser.add_option("-S", "--create-static", action="store_true", - default=True, help=_("automatically create a static package with ar files")) - self.parser.add_option("-g", "--create-debug", action="store_true", - default=True, help=_("automatically create a debug package with debug files")) + self.parser.add_option("", "--no-static", action="store_true", + default=False, help=_("don't create a static package with ar files")) + self.parser.add_option("", "--no-debug", action="store_true", + default=False, help=_("don't create a debug package with debug files")) self.parser.add_option("", "--no-install", action="store_true", default=False, help=_("don't install build dependencies, fail if a build dependency is present")) diff --git a/pisi/util.py b/pisi/util.py index 50b9ddd7..2c5efe58 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -556,14 +556,14 @@ def strip_file(filepath, outpath): return True elif "SB executable" in o: - if ctx.get_option('create_debug'): + if not ctx.get_option('no_debug'): check_dir(os.path.dirname(outpath)) save_elf_debug(filepath, outpath) run_strip(filepath) return True elif "SB shared object" in o: - if ctx.get_option('create_debug'): + if not ctx.get_option('no_debug'): check_dir(os.path.dirname(outpath)) save_elf_debug(filepath, outpath) run_strip(filepath, "--strip-unneeded")