Hi again,
So I'm back on my let's-update-.discinfo kick.
This patch adds a new file to scripts/ called 'maketreeinfo.py', which works similarly to makestamp.py. It creates a file called .treeinfo, which is like .discinfo except:
1) it's in .ini/ConfigParser format, and 2) it contains slightly more information (and removes some unused fields).
The patch also modifies buildinstall to add an optional --variant flag , and to call maketreeinfo.py (*before* creating the boot images - this is intentional, see below)
I left .discinfo in place, because I think it'd be premature to deprecate .discinfo right now.
If this is accepted, my next trick will be to change mk-images* so that they add info to .treeinfo describing the locations of the images they wrote out.
Does this all seem reasonable?
-w
This patch adds a new file to scripts/ called 'maketreeinfo.py', which works similarly to makestamp.py. It creates a file called .treeinfo, which is like .discinfo except:
- it's in .ini/ConfigParser format, and
- it contains slightly more information (and removes some unused
fields).
The patch also modifies buildinstall to add an optional --variant flag , and to call maketreeinfo.py (*before* creating the boot images - this is intentional, see below)
I left .discinfo in place, because I think it'd be premature to deprecate .discinfo right now.
This all sounds good to me.
Does this all seem reasonable?
Could you make maketreeinfo.py not be interactive? If the script's not provided with information it requires, I'd rather see it use a reasonable default or blow up with an informative error message. That way when the tree build is busted the next day, we'll have something in the build logs that helps us straighten things out.
Thanks.
- Chris
On Tue, 2007-02-20 at 13:43 -0500, Chris Lumens wrote:
Could you make maketreeinfo.py not be interactive? If the script's not provided with information it requires, I'd rather see it use a reasonable default or blow up with an informative error message. That way when the tree build is busted the next day, we'll have something in the build logs that helps us straighten things out.
Okay - it's been changed to be non-interactive, and instead just emits warning messages if you don't set flags.
Patch is attached.
-w
On Tue, 2007-02-20 at 17:44 -0500, Will Woods wrote:
Okay - it's been changed to be non-interactive, and instead just emits warning messages if you don't set flags.
Patch is attached.
As a follow-up, here's a patch for the mk-images scripts that makes them emit .treeinfo sections describing the images they are writing out. I've tested it on i386 and it works as expected:
[wwoods@kraid ~]$ cat /srv/pungi/f7-test2/6.91/Desktop/i386/os/.treeinfo [general] family = Fedora timestamp = 1172010898.27 variant = Desktop totaldiscs = 1 version = 6.91 discnum = 1 packagedir = Fedora arch = i386
[images-i586] kernel = images/pxeboot/vmlinuz initrd = images/pxeboot/initrd.img boot.iso = images/boot.iso diskboot.img = images/diskboot.img
[images-xen] kernel = images/xen/vmlinuz initrd = images/xen/initrd.img
Could you all look it over and see if it seems useful and reasonable?
Thanks!
-w
Okay - it's been changed to be non-interactive, and instead just emits warning messages if you don't set flags.
Thanks. I rebuilt anaconda with this yesterday afternoon, as you may have seen me talk about in irc. I also grabbed your other patch that was a followup to this one.
- Chris
On Wed, 2007-02-21 at 09:59 -0500, Chris Lumens wrote:
Okay - it's been changed to be non-interactive, and instead just emits warning messages if you don't set flags.
Thanks. I rebuilt anaconda with this yesterday afternoon, as you may have seen me talk about in irc. I also grabbed your other patch that was a followup to this one.
Awesome. There was a thinko in the first part of the patch, though:
Index: maketreeinfo.py =================================================================== RCS file: /usr/local/CVS/anaconda/scripts/maketreeinfo.py,v retrieving revision 1.1 diff -u -r1.1 maketreeinfo.py --- maketreeinfo.py 20 Feb 2007 22:52:43 -0000 1.1 +++ maketreeinfo.py 21 Feb 2007 23:00:42 -0000 @@ -63,7 +63,7 @@
if data["variant"] is None: print >> sys.stderr, "--variant missing, but that's OK." - data["version"] = "" + data["variant"] = ""
if data["version"] is None: print >> sys.stderr, "--version missing! This is probably bad!"
D'oh. Hope that helps. This patch should mean really cool things for automated installer testing. Thanks for applying it.
-w
Index: maketreeinfo.py
RCS file: /usr/local/CVS/anaconda/scripts/maketreeinfo.py,v retrieving revision 1.1 diff -u -r1.1 maketreeinfo.py --- maketreeinfo.py 20 Feb 2007 22:52:43 -0000 1.1 +++ maketreeinfo.py 21 Feb 2007 23:00:42 -0000 @@ -63,7 +63,7 @@
if data["variant"] is None: print >> sys.stderr, "--variant missing, but that's OK."
- data["version"] = ""
- data["variant"] = ""
if data["version"] is None: print >> sys.stderr, "--version missing! This is probably bad!"
D'oh. Hope that helps. This patch should mean really cool things for automated installer testing. Thanks for applying it.
Applied.
- Chris
anaconda-devel@lists.stg.fedoraproject.org