Package: simple-cdd Version: 0.6.5 Tags: patch Hi,
after spending an entire afternoon figuring out why simple-cdd wasn't including my extra files, I stepped through the code and noticed that simple-cdd assumes paths in PROFILE.extras to be absolute (and also fails silently, if the files aren't there...) Because all other file references (e.g. "local_packages") are relative, this is extremely unintuitive. The fact that this behavior is undocumented doesn't help, either. Therefore, I propose files beginning with a '/' to be treated as absolute, otherwise prepend the working directory of simple-cdd. Patch attached. Greetings Jack
From c1d209417d21b4485da228c384e403f8ac6fec2a Mon Sep 17 00:00:00 2001 From: Jack Henschel <jack...@mailbox.org> Date: Fri, 24 Nov 2017 13:00:31 +0100 Subject: [PATCH] Add support for relative paths for "all_extras" and document the change Signed-off-by: Jack Henschel <jack...@mailbox.org> --- build-simple-cdd | 5 ++++- simple-cdd.conf.detailed | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build-simple-cdd b/build-simple-cdd index 5da6284..f06ddbc 100755 --- a/build-simple-cdd +++ b/build-simple-cdd @@ -136,7 +136,10 @@ class SimpleCDD: for pathname in self.find_profile_files("{}.extra".format(p)): # include the extra file itself, as well as the contents it references self.env.append("all_extras", pathname) - self.env.append("all_extras", self.read_list_file(pathname)) + for f in self.read_list_file(pathname): + if f[0] != '/': + f = os.path.join(self.env.get("simple_cdd_dir"), f) + self.env.append("all_extras", f) self.env.append("exclude_files", scdd.find_profile_files("{}.excludes".format(p))) # Create our private GPG keyring unless we have been asked to use the diff --git a/simple-cdd.conf.detailed b/simple-cdd.conf.detailed index 7a851a0..0d1a1d4 100644 --- a/simple-cdd.conf.detailed +++ b/simple-cdd.conf.detailed @@ -57,6 +57,8 @@ # Extra files to include onto the CD # These will get copied to /simple-cdd dir on the CD +# Paths starting with '/' are interpreted as absolute, otherwise relative +# to the currect directory. #all_extras="" # Generate a simple package repository on the CD with the debs cited -- 2.15.0
signature.asc
Description: OpenPGP digital signature