I see nothing in these reasons that prevents a package of the files from being
created.
AFAIK any directory can be packaged, so technically taking the directory
I want to add, packaging it and
putting it on the tree is possible. The only argument for the "add
files without packaging" process is lazyness.
IMHO it is sometimes easier to just tell pungi "please add this
directory to the iso". Compared to the additional
process of creating a package. Moreover the user might have to learn
how exactly to do this, taking up more time.
(not that learning how to package is a waist of time, but some people
might not really need it :)
I'm not saying no to the feature yet, I just need to think about it a bit and
what it means to pungi.
What I propose is a simple (I think its simple:) patch to address this
issue. Give the user the possibility to add *one*
directory to the tree. This directory contains whatever and is
specified in the config file as extra_dir.
Patch is attached
comments greatly appreciated
Regards
--
Joel Andres Granados
diff -ur -x .hg pungi/pungi pungi_ks/pungi
--- pungi/pungi 2007-05-30 16:03:58.000000000 +0200
+++ pungi_ks/pungi 2007-05-31 13:52:36.000000000 +0200
@@ -113,7 +113,7 @@
if opts.do_all or opts.do_buildinstall:
mypungi.doBuildinstall()
- mypungi.doGetRelnotes()
+ mypungi.addExtraFiles()
if opts.do_all or opts.do_packageorder:
mypungi.doPackageorder()
diff -ur -x .hg pungi/pypungi/pungi.py pungi_ks/pypungi/pungi.py
--- pungi/pypungi/pungi.py 2007-05-30 16:03:58.000000000 +0200
+++ pungi_ks/pypungi/pungi.py 2007-05-31 14:59:30.000000000 +0200
@@ -145,12 +145,16 @@
# run the command
self._doRunCommand(pkgorder, output=pkgorderfile)
pkgorderfile.close()
+
+ def addExtraFiles(self):
+ """ It adds extra files to the tree.
+
+ It adds files from rpm packages as defined by relnotepkgs,
relnotefilere and
+ relnotedirre.
+ It also adds the directory specified in extra_dir and all its
subdirectories.
+ """
- def doGetRelnotes(self):
- """Get extra files from packages in the tree to put in the topdir of
- the tree."""
-
-
+ # Lets add the files from the packages.
docsdir = os.path.join(self.workdir, 'docs')
relnoterpms = self.config.get('default', 'relnotepkgs').split()
@@ -204,6 +208,14 @@
shutil.copytree(os.path.join(dirpath, directory),
os.path.join(self.topdir, directory))
+ #Lets add the directory
+ if self.config.has_option('default', 'extra_dir'):
+ srcDir = self.config.get('default', 'extra_dir')
+ dstDir = os.path.join(self.topdir,os.path.split(srcDir)[1])
+ log.info("Trying to copy %s to %s." %(srcDir, dstDir))
+ if os.path.isdir(srcDir) and not
os.path.isdir(dstDir):shutil.copytree(srcDir, dstDir)
+ else:pass
+
def doSplittree(self):
"""Use anaconda-runtime's splittree to split the tree into appropriate
sized chunks."""
--
Fedora-buildsys-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list