#fixes 2638

This commit is contained in:
Faik Uygur
2006-05-02 14:14:27 +00:00
parent 630febca69
commit 7b54f2eff6
3 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -77,8 +77,8 @@ def check_path_collision(package, pkgList):
# collide. Exp: # collide. Exp:
# pinfo.path: /usr/share # pinfo.path: /usr/share
# path.path: /usr/share/doc # path.path: /usr/share/doc
if (path.path.endswith(ctx.const.ar_file_suffix) and ctx.get_option('create_static')) or \ 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 ctx.get_option('create_debug')): (path.path.endswith(ctx.const.debug_file_suffix) and not ctx.get_option('no_debug')):
# don't throw collision error for these files. # don't throw collision error for these files.
# we'll handle this in gen_files_xml.. # we'll handle this in gen_files_xml..
continue continue
@@ -611,14 +611,14 @@ class Builder:
def add_path(path): def add_path(path):
# add the files under material path # add the files under material path
for fpath, fhash in util.get_file_hashes(path, collisions, install_dir): 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 fpath.endswith(ctx.const.ar_file_suffix) \
and not package.name.endswith(ctx.const.static_name_suffix) \ and not package.name.endswith(ctx.const.static_name_suffix) \
and util.is_ar_file(fpath): and util.is_ar_file(fpath):
# if this is an ar file, and this package is not a static package, # if this is an ar file, and this package is not a static package,
# don't include this file into the package. # don't include this file into the package.
continue continue
if ctx.get_option('create_debug') \ if not ctx.get_option('no_debug') \
and fpath.endswith(ctx.const.debug_file_suffix) \ and fpath.endswith(ctx.const.debug_file_suffix) \
and not package.name.endswith(ctx.const.debug_name_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, # 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. # Strip install directory before building .pisi packages.
self.strip_install_dir() self.strip_install_dir()
if ctx.get_option('create_static'): if not ctx.get_option('no_static'):
obj = self.generate_static_package_object() obj = self.generate_static_package_object()
if obj: if obj:
self.spec.packages.append(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() obj = self.generate_debug_package_object()
if obj: if obj:
self.spec.packages.append(obj) self.spec.packages.append(obj)
+4 -4
View File
@@ -360,10 +360,10 @@ unpack, setup, build, install, package
help=_("bypass errors from ActionsAPI")) help=_("bypass errors from ActionsAPI"))
self.parser.add_option("-B", "--ignore-comar", action="store_true", self.parser.add_option("-B", "--ignore-comar", action="store_true",
default=False, help=_("bypass comar configuration agent")) default=False, help=_("bypass comar configuration agent"))
self.parser.add_option("-S", "--create-static", action="store_true", self.parser.add_option("", "--no-static", action="store_true",
default=True, help=_("automatically create a static package with ar files")) default=False, help=_("don't create a static package with ar files"))
self.parser.add_option("-g", "--create-debug", action="store_true", self.parser.add_option("", "--no-debug", action="store_true",
default=True, help=_("automatically create a debug package with debug files")) default=False, help=_("don't create a debug package with debug files"))
self.parser.add_option("", "--no-install", action="store_true", self.parser.add_option("", "--no-install", action="store_true",
default=False, help=_("don't install build dependencies, fail if a build dependency is present")) default=False, help=_("don't install build dependencies, fail if a build dependency is present"))
+2 -2
View File
@@ -556,14 +556,14 @@ def strip_file(filepath, outpath):
return True return True
elif "SB executable" in o: elif "SB executable" in o:
if ctx.get_option('create_debug'): if not ctx.get_option('no_debug'):
check_dir(os.path.dirname(outpath)) check_dir(os.path.dirname(outpath))
save_elf_debug(filepath, outpath) save_elf_debug(filepath, outpath)
run_strip(filepath) run_strip(filepath)
return True return True
elif "SB shared object" in o: 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)) check_dir(os.path.dirname(outpath))
save_elf_debug(filepath, outpath) save_elf_debug(filepath, outpath)
run_strip(filepath, "--strip-unneeded") run_strip(filepath, "--strip-unneeded")