From 9e9f533a50f3a73d039b25645eb3ccd32ccb7a42 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Mon, 7 Nov 2005 10:18:05 +0000 Subject: [PATCH] =?UTF-8?q?=20fix=20#698,=20additional=20files=20icin=20gl?= =?UTF-8?q?ob=20deste=C4=9Fi..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/build.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 92507280..947ae745 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -485,12 +485,17 @@ class Builder: os.chdir(self.pspecDir) install_dir = self.bctx.pkg_dir() + ctx.const.install_dir_suffix for afile in package.additionalFiles: - src = os.path.join(ctx.const.files_dir, afile.filename) - dest = os.path.join(install_dir + os.path.dirname(afile.target), os.path.basename(afile.target)) - util.copy_file(src, dest) - if afile.permission: - # mode is octal! - os.chmod(dest, int(afile.permission, 8)) + wildcard_path = util.join_path(ctx.const.files_dir, afile.filename) + destdir = util.join_path(install_dir, os.path.dirname(afile.target)) + for src in glob.glob(wildcard_path): + 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'") \ + % (src, destdir, destfile)) + util.copy_file(src, util.join_path(destdir, destfile)) + if afile.permission: + # mode is octal! + os.chmod(util.join_path(destdir, destfile), int(afile.permission, 8)) os.chdir(c)