[Simple-cdd-devel] simple-cdd and python
Enrico Zini
enrico at enricozini.org
Wed Feb 18 13:29:26 UTC 2015
On Fri, Jan 23, 2015 at 03:46:34PM -0800, Vagrant Cascadian wrote:
> > My intention with find_profile_files was to look into all profiles and
> > return a sequence to be iterated on, so that config files, preseed files
> > and so on could be loaded from all profiles; with the break it looks
> > like only the first profile would be loaded. Was something not working
> > as expected with that?
>
> # Have build profiles over-ride all others
> for p in ["default"] + self.env.get("profiles") + self.env.get("build_profiles"):
> for pathname in self.find_profile_files(p + ".conf"):
> self.env.read_config_file(pathname)
>
> So, find_profile_files here should only ever return a single file, first
> searching the working dir profiles/default.conf, and falling back to
> /usr/share/simple-cdd/profiles/default.conf if no file was found in the
> working dir. This allows values in the working dir to override the
> default files in /usr/share/simple-cdd/profiles/.
>
> Looking at the other uses of find_profile_files, it should be the
> same; it only ever should return no files, or a single file.
>
> A profile may consist of some files from the working dir, and some files
> From /usr/share/simple-cdd/profiles, but the working dir should override
> the files in /usr/share/.
I've only understood this now: since basename is given as an argument,
and find_profile_files is called for each profile name, indeed it does
not make sense that it returns 2 or 3 instances of profilename.conf
I finally got there. Better late than never...
Enrico
--
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/simple-cdd-devel/attachments/20150218/31b7c5a1/attachment.sig>
More information about the Simple-cdd-devel
mailing list