Pungi configuration file.

Joel Andres Granados jgranado at redhat.com
Fri Apr 6 11:30:59 UTC 2007


Hi list:

Been poking at pungi a bit and have found out some strange behavior when 
I used the 0.3.0 version.  When I executed the `pungi -c 
/etc/pungi/pungi.conf` I ran across some python trace back that referred 
to looking for a file.  On further inspection I realized that the 
comments where not being considered as such for the pung.conf file.  At 
http://docs.python.org/dev/lib/module-ConfigParser.html it states that 
the "#" and ";" can be used for comments on the beginning of the line.  
strangely the ";" character can be used as an inline comment but "#" can't.
In
name = value ; comment
"comment" is a comment.  But in
name = value # comment
"comment" is not a comment and name receives a value of "value # comment".
Below is the traceback and a patch that changes all the "#" characters 
of the config file to ";" characters.

I've tested the resulting config file and the values for each variable 
seem to be what I expect.
comments appreciated.
regards.

TRACEBACK:
Traceback (most recent call last):
  File "/usr/bin/pungi", line 182, in <module>
    main()
  File "/usr/bin/pungi", line 100, in main
    mygather = pypungi.gather.Gather(config, pkglist)
  File "/usr/lib/python2.5/site-packages/pypungi/gather.py", line 56, in 
__init__
    self.compsobj.add(self.config.get('default', 'comps'))
  File "/usr/lib/python2.5/site-packages/yum/comps.py", line 339, in add
    infile = open(srcfile, 'rt')
IOError: [Errno 2] No such file or directory: '/etc/pungi/comps-fc7.xml 
# Used to define package groupings and default installs'

DIFF:
diff -ubBr pungi-0.3.0/config/pungi.conf pungi-0.3.0-JG/config/pungi.conf
--- pungi-0.3.0/config/pungi.conf       2007-04-02 23:10:30.000000000 +0200
+++ pungi-0.3.0-JG/config/pungi.conf    2007-04-06 11:24:13.000000000 +0200
@@ -1,20 +1,20 @@
-# Pungi config file
-#
+; Pungi config file
+;
 
 [default]
-product_name = Fedora # The name used during install
-product_path = Fedora # The directory where RPMS go
-iso_basename = F # The first part of the iso file name
-bugurl = http://bugzilla.redhat.com # Used for betanag
-comps = /etc/pungi/comps-fc7.xml # Used to define package groupings and 
default installs
-manifest = /etc/pungi/minimal-manifest # Used to determine what to 
bring in.  Supports Kickstart syntax
-yumconf = /etc/pungi/yum.conf.x86_64 # Used to determine where to 
gather packages from
-destdir = /srv/pungi/Fedora # Top level compose directory, must be clean
-cachedir = /srv/pungi/cache # Cache used for repeat runs
-arch = x86_64 # What arch to compose (must be same arch as system)
-version = development # Used both in install and part of the dest tree
-flavor = Custom # Further define a given cut of the package set
-discs = 1 # Number of discs needed to fit data.
-#cdsize = 4608.0 Not used if disc count is 1
-getsource = Yes # Used to determine if we want source packages or not
+product_name = Fedora ; The name used during install
+product_path = Fedora ; The directory where RPMS go
+iso_basename = F ; The first part of the iso file name
+bugurl = http://bugzilla.redhat.com ; Used for betanag
+comps = /etc/pungi/comps-fc7.xml ; Used to define package groupings and 
default installs
+manifest = /etc/pungi/minimal-manifest ; Used to determine what to 
bring in.  Supports Kickstart syntax
+yumconf = /etc/pungi/yum.conf.x86_64 ; Used to determine where to 
gather packages from
+destdir = /srv/pungi/Fedora ; Top level compose directory, must be clean
+cachedir = /srv/pungi/cache ; Cache used for repeat runs
+arch = x86_64 ; What arch to compose (must be same arch as system)
+version = development ; Used both in install and part of the dest tree
+flavor = Custom ; Further define a given cut of the package set
+discs = 1 ; Number of discs needed to fit data.
+;cdsize = 4608.0 Not used if disc count is 1
+getsource = Yes ; Used to determine if we want source packages or not




More information about the buildsys mailing list