diff --git a/pisi/build.py b/pisi/build.py index 01074f43..7e273393 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -492,7 +492,11 @@ class Builder: static_package_obj.partOf = 'library:static' for f in ar_files: static_package_obj.files.append(pisi.specfile.Path(path = f[len(self.pkg_install_dir()):], fileType = "library")) - static_package_obj.packageDependencies.append(pisi.dependency.Dependency(package = self.spec.source.name)) + + # append all generated packages to dependencies + for p in self.spec.packages: + static_package_obj.packageDependencies.append( + pisi.dependency.Dependency(package = p.name)) return static_package_obj @@ -515,9 +519,10 @@ class Builder: for f in debug_files: static_package_obj.files.append(pisi.specfile.Path(path = f[len(self.pkg_install_dir()):], fileType = "debug")) - # FIXME: This cause a dependency problem for one source -> multi binary packages. For example mysql source package - # has mysql-lib, -server and -client but mysql-debug package depends mysql which is not exists so it cannot installed. - static_package_obj.packageDependencies.append(pisi.dependency.Dependency(package = self.spec.source.name)) + # append all generated packages to dependencies + for p in self.spec.packages: + static_package_obj.packageDependencies.append( + pisi.dependency.Dependency(package = p.name)) return static_package_obj diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 174e9ae1..83181d62 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -361,9 +361,9 @@ unpack, setup, build, install, package 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=False, help=_("automatically create a static package with ar files")) + default=True, help=_("automatically create a static package with ar files")) self.parser.add_option("-g", "--create-debug", action="store_true", - default=False, help=_("automatically create a debug package with debug files")) + default=True, help=_("automatically create a debug package with debug files")) def run(self):