[Rpm-metadata] createrepo/__init__.py

Seth Vidal skvidal at linux.duke.edu
Tue Jan 29 02:38:49 UTC 2008


 createrepo/__init__.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7ab1a2a502821f4bc5e8bad0773013ba8f2cbf7f
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Jan 28 21:37:22 2008 -0500

    swap around the filename creation order so it doesn't make leaves files around

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index e26961f..3efad56 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -532,7 +532,7 @@ class MetaDataGenerator:
                 os.unlink(resultpath)
 
                 if self.conf.unique_md_filenames:
-                    csum_compressed_name = '%s-%s.bz2' % (good_name, db_compressed_sums[ftype])
+                    csum_compressed_name = '%s-%s.bz2' % (db_compressed_sums[ftype], good_name)
                     csum_result_compressed =  os.path.join(repopath, csum_compressed_name)
                     os.rename(result_compressed, csum_result_compressed)
                     result_compressed = csum_result_compressed
@@ -573,7 +573,7 @@ class MetaDataGenerator:
             if self.conf.baseurl is not None:
                 location.newProp('xml:base', self.conf.baseurl)
             if self.conf.unique_md_filenames:
-                res_file = '%s-%s.xml.gz' % (ftype, csum)
+                res_file = '%s-%s.xml.gz' % (csum, ftype)
                 orig_file = os.path.join(repopath, file)
                 dest_file = os.path.join(repopath, res_file)
                 os.rename(orig_file, dest_file)
@@ -581,7 +581,7 @@ class MetaDataGenerator:
             else:
                 res_file = file
 
-            file = res_file #???
+            file = res_file 
             
             location.newProp('href', os.path.join(self.conf.finaldir, file))
 



More information about the Rpm-metadata mailing list