- make --unique-md-filenames the default
authorSeth Vidal <skvidal@fedoraproject.org>
Mon, 8 Feb 2010 17:11:17 +0000 (12:11 -0500)
committerSeth Vidal <skvidal@fedoraproject.org>
Mon, 8 Feb 2010 17:11:17 +0000 (12:11 -0500)
- add simple-md-filenames to be able to disable the above if desired

createrepo/__init__.py
docs/createrepo.8
genpkgmetadata.py

index 0ffe6cb39191cae1432b19e7120d398011404ca9..4ec2d51e75547acf16ae51bfb6288d865abc661b 100644 (file)
@@ -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)
index 80c446442ec18faf40f163fb8b39230fdde683e3..ff1aab0831f2654f37e1b68bfd67f27392c7cd39 100644 (file)
@@ -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
index cf3dcd9c807d0e460e484268c37c9f9e7a37f36b..8923841e819dfabbe3c05122f04716c575a839c1 100755 (executable)
@@ -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