- log the rpm2cpio stuff for release notes

This commit is contained in:
Jesse Keating 2007-03-13 20:36:48 -04:00 committed by Jesse Keating
parent 1c54c7edfc
commit 1c45ac7daf
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,6 @@
* Tue Mar 13 2007 Jesse Keating <jkeating@redhat.com>
- log the rpm2cpio stuff for release notes
* Wed Mar 07 2007 Jesse Keating <jkeating@redhat.com>
- Call createrepo ourselves for the tree, not buildinstall's job

View File

@ -167,14 +167,23 @@ class Pungi:
for relnoterpm in relnoterpms:
if pkgname == relnoterpm:
extraargs = [os.path.join(self.topdir, self.config.get('default', 'product_path'), pkg)]
p1 = subprocess.Popen(rpm2cpio + extraargs, cwd=docsdir, stdout=subprocess.PIPE)
subprocess.Popen(cpio, cwd=docsdir, stdin=p1.stdout)
try:
p1 = subprocess.Popen(rpm2cpio + extraargs, cwd=docsdir, stdout=subprocess.PIPE)
(out, err) = subprocess.Popen(cpio, cwd=docsdir, stdin=p1.stdout, stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()
except:
log.error("Got an error from rpm2cpio")
log.error(err)
raise
log.info(out)
# Walk the tree for our files
for dirpath, dirname, filelist in os.walk(docsdir):
for filename in filelist:
for regex in fileres:
if regex.match(filename) and not os.path.exists(os.path.join(self.topdir, filename)):
print "Copying release note file %s" % filename
log.info("Copying release note file %s" % filename)
shutil.copy(os.path.join(dirpath, filename), os.path.join(self.topdir, filename))
self.common_files.append(filename)
@ -183,7 +192,7 @@ class Pungi:
for directory in dirname:
for regex in dirres:
if regex.match(directory) and not os.path.exists(os.path.join(self.topdir, directory)):
print "Copying release note dir %s" % directory
log.info("Copying release note dir %s" % directory)
shutil.copytree(os.path.join(dirpath, directory), os.path.join(self.topdir, directory))