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