[Simple-cdd-devel] simple-cdd and python

Vagrant Cascadian vagrant at debian.org
Fri Jan 23 23:46:34 UTC 2015


On 2015-01-22, Enrico Zini wrote:
> On Wed, Jan 21, 2015 at 02:39:15PM -0800, Vagrant Cascadian wrote:
>> On 2015-01-21, Enrico Zini wrote:
>> > On Tue, Jan 20, 2015 at 04:16:55PM -0800, Vagrant Cascadian wrote:

>>     Fix bug that causes wget to download whole mirror by adding a
>>     trailing slash to directories specified in mirror_files.
>> 
>> We might want to split that into mirror_files and mirror_dirs or
>> something to make it explicit.
>
> Ack. 
>
> What is the behaviour difference of wget between
> http://ftp.de.debian.org/debian/doc and
> http://ftp.de.debian.org/debian/doc/ ?

I *think* it impacted how the --no-parent wget option works, possibly in
conjunction with --cut-dirs.


>> > I've revamped the qemu testing code, porting it to python and double
>> > checking it against today's qemu manpage.
>> 
>> After a couple minor fixes, it's also working for me. Although the
>> default for qemu is 128MB of ram, so would be good to add that back, or
>> add an arbitrary --qemu-opts support or something along those lines.
>
> qemu-opts sounds like a good idea, maybe just in a config file.

Sure.


> Question: what triggered 861900b383d056ef514e91167a90e017fca7c540 "Only
> return the first file found when using find_profile_files." ?

I had noticed it was reading profiles/default.conf twice, because the
read_configuration function had listed my working dir twice:

  simple_cdd_dirs=FormatList(["{simple_cdd_dir}", os.path.dirname(os.path.abspath(sys.argv[0])), "/usr/share/simple-cdd"]),

So it had listed the same directory twice with one from
"{simple_cdd_dir}" and once using os.path.dirname.


> 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/.


> In c20902656d842a54f09fd2562c1f24e614962eb3, was http_proxy not passed?
> I am regenerating the environment before running tools, but I'm not
> doing it before running wget, so it should be preserved. If it wasn't,
> let me know and I'll look into it.

Yes, http_proxy was not passed to wget, directly or indirectly. So I
added that commit to explicitly add it to the environment before calling
wget.


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/simple-cdd-devel/attachments/20150123/4355911e/attachment.sig>


More information about the Simple-cdd-devel mailing list