[Rpm-metadata] 2 commits - createrepo/__init__.py docs/createrepo.8 genpkgmetadata.py

skvidal at osuosl.org skvidal at osuosl.org
Mon Feb 8 17:12:06 UTC 2010


 createrepo/__init__.py |    2 +-
 docs/createrepo.8      |    6 +++++-
 genpkgmetadata.py      |    7 ++++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 0813c4fa3dcb911d92208a5a791c6e31b7d2eee6
Merge: b86b9e6... 99d956f...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Feb 8 12:12:21 2010 -0500

    Merge branch 'master' of ssh://createrepo.baseurl.org/srv/projects/createrepo/git/createrepo
    
    * 'master' of ssh://createrepo.baseurl.org/srv/projects/createrepo/git/createrepo:
      Add missing space in --checkts help string.
      Ignore *.py[co].
      Remove outdated comment about --baseurl.

commit b86b9e66b5f9fee25b529bc54348e0e47824ce25
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Feb 8 12:11:17 2010 -0500

    - make --unique-md-filenames the default
    - add simple-md-filenames to be able to disable the above if desired

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 0ffe6cb..4ec2d51 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -95,7 +95,7 @@ class MetaDataConfig(object):
         self.directory = None
         self.directories = []
         self.changelog_limit = None # needs to be an int or None
-        self.unique_md_filenames = False
+        self.unique_md_filenames = True
         self.additional_metadata = {} # dict of 'type':'filename'
         self.revision = str(int(time.time()))
         self.content_tags = [] # flat list of strings (like web 2.0 tags)
diff --git a/docs/createrepo.8 b/docs/createrepo.8
index 80c4464..ff1aab0 100644
--- a/docs/createrepo.8
+++ b/docs/createrepo.8
@@ -81,7 +81,11 @@ Output time based profiling information.
 .IP "\fB\--changelog-limit\fP CHANGELOG_LIMIT"
 Only import the last N changelog entries, from each rpm, into the metadata
 .IP "\fB\--unique-md-filenames\fP"
-Include the file's checksum in the metadata filename, helps HTTP caching
+Include the file's checksum in the metadata filename, helps HTTP caching (default)
+
+.IP "\fB\--simple-md-filenames\fP"
+Do not include the file's checksum in the metadata filename.
+
 .IP "\fB\--distro\fP"
 Specify distro tags. Can be specified more than once. Optional syntax specifying a
 cpeid(http://cpe.mitre.org/) --distro=cpeid,distrotag
diff --git a/genpkgmetadata.py b/genpkgmetadata.py
index cf3dcd9..8923841 100755
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@ -94,6 +94,9 @@ def parse_args(args, conf):
         default=None, help="only import the last N changelog entries")
     parser.add_option("--unique-md-filenames", dest="unique_md_filenames",
         help="include the file's checksum in the filename,helps with proxies",
+        default=True, action="store_true")
+    parser.add_option("--simple-md-filenames", dest="simple_md_filenames",
+        help="do not include the file's checksum in the filename,helps with proxies",
         default=False, action="store_true")
     parser.add_option("--distro", default=[], action="append",
         help="distro tag and optional cpeid: --distro" "'cpeid,textname'")
@@ -135,7 +138,9 @@ def parse_args(args, conf):
         errorprint(_('--split and --checkts options are mutually exclusive'))
         sys.exit(1)
 
-
+    if opts.simple_md_filenames:
+        opts.unique_md_filenames = False
+        
     # let's switch over to using the conf object - put all the opts into it
     for opt in parser.option_list:
         if opt.dest is None: # this is fairly silly


More information about the Rpm-metadata mailing list