diff --git a/pisi/build.py b/pisi/build.py index 5c0b6b9c..7de43d93 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -474,18 +474,23 @@ class Builder: """Build each package defined in PSPEC file. After this process there will be .pisi files hanging around, AS INTENDED ;)""" + from copy import deepcopy + # Strip install directory before building .pisi packages. self.strip_install_dir() for package in self.spec.packages: - # store additional files c = os.getcwd() os.chdir(self.pspecDir) install_dir = self.bctx.pkg_dir() + ctx.const.install_dir_suffix + tmp_aF = [] for afile in package.additionalFiles: destdir = util.join_path(install_dir, os.path.dirname(afile.target)) for src in glob.glob(util.join_path(ctx.const.files_dir, afile.filename)): + tmp_afile_obj = deepcopy(afile) + tmp_afile_obj.filename = src[len(ctx.const.files_dir) + 1:] + tmp_aF.append(tmp_afile_obj) destfile = os.path.basename(afile.target) if not destfile: destfile = os.path.basename(src) ctx.ui.debug(_("Copying additional file: '%s' to '%s' as '%s'") \ @@ -495,6 +500,8 @@ class Builder: # mode is octal! os.chmod(util.join_path(destdir, destfile), int(afile.permission, 8)) + package.additionalFiles = tmp_aF + os.chdir(c) ctx.ui.action(_("** Building package %s") % package.name);