+8
-1
@@ -474,18 +474,23 @@ class Builder:
|
|||||||
"""Build each package defined in PSPEC file. After this process there
|
"""Build each package defined in PSPEC file. After this process there
|
||||||
will be .pisi files hanging around, AS INTENDED ;)"""
|
will be .pisi files hanging around, AS INTENDED ;)"""
|
||||||
|
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
# Strip install directory before building .pisi packages.
|
# Strip install directory before building .pisi packages.
|
||||||
self.strip_install_dir()
|
self.strip_install_dir()
|
||||||
|
|
||||||
for package in self.spec.packages:
|
for package in self.spec.packages:
|
||||||
|
|
||||||
# store additional files
|
# store additional files
|
||||||
c = os.getcwd()
|
c = os.getcwd()
|
||||||
os.chdir(self.pspecDir)
|
os.chdir(self.pspecDir)
|
||||||
install_dir = self.bctx.pkg_dir() + ctx.const.install_dir_suffix
|
install_dir = self.bctx.pkg_dir() + ctx.const.install_dir_suffix
|
||||||
|
tmp_aF = []
|
||||||
for afile in package.additionalFiles:
|
for afile in package.additionalFiles:
|
||||||
destdir = util.join_path(install_dir, os.path.dirname(afile.target))
|
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)):
|
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)
|
destfile = os.path.basename(afile.target)
|
||||||
if not destfile: destfile = os.path.basename(src)
|
if not destfile: destfile = os.path.basename(src)
|
||||||
ctx.ui.debug(_("Copying additional file: '%s' to '%s' as '%s'") \
|
ctx.ui.debug(_("Copying additional file: '%s' to '%s' as '%s'") \
|
||||||
@@ -495,6 +500,8 @@ class Builder:
|
|||||||
# mode is octal!
|
# mode is octal!
|
||||||
os.chmod(util.join_path(destdir, destfile), int(afile.permission, 8))
|
os.chmod(util.join_path(destdir, destfile), int(afile.permission, 8))
|
||||||
|
|
||||||
|
package.additionalFiles = tmp_aF
|
||||||
|
|
||||||
os.chdir(c)
|
os.chdir(c)
|
||||||
|
|
||||||
ctx.ui.action(_("** Building package %s") % package.name);
|
ctx.ui.action(_("** Building package %s") % package.name);
|
||||||
|
|||||||
Reference in New Issue
Block a user