make -d/--database the default
authorSeth Vidal <skvidal@fedoraproject.org>
Fri, 28 May 2010 19:36:15 +0000 (15:36 -0400)
committerSeth Vidal <skvidal@fedoraproject.org>
Fri, 28 May 2010 19:36:15 +0000 (15:36 -0400)
add --no-database in case someone somewhere needs to do that

createrepo/__init__.py
genpkgmetadata.py

index 0911ba11cdf40bb6c778ad99be33b8e9d576995e..41e8db83404aee13f128d12989afb6f7cac6523d 100644 (file)
@@ -77,7 +77,7 @@ class MetaDataConfig(object):
         self.max_delta_rpm_size = 100000000
         self.update_md_path = None
         self.skip_stat = False
-        self.database = False
+        self.database = True
         self.outputdir = None
         self.file_patterns = ['.*bin\/.*', '^\/etc\/.*', '^\/usr\/lib\/sendmail$']
         self.dir_patterns = ['.*bin\/.*', '^\/etc\/.*']
index 5c9f6be9bdbfbf72698d4a2efc2739536b582432..108c68f9c15e1d889b2a316348d2c0c3e29f3a47 100755 (executable)
@@ -64,8 +64,10 @@ def parse_args(args, conf):
     parser.add_option("-C", "--checkts", default=False, action="store_true",
         help="check timestamps on files vs the metadata to see " \
            "if we need to update")
-    parser.add_option("-d", "--database", default=False, action="store_true",
-        help="create sqlite database files")
+    parser.add_option("-d", "--database", default=True, action="store_true",
+        help="create sqlite database files: now default, see --no-database to disable")
+    parser.add_option("--no-database", default=False, dest="nodatabase", action="store_true",
+        help="do not create sqlite dbs of metadata")
     # temporarily disabled
     #parser.add_option("--database-only", default=False, action="store_true",
     #  dest='database_only',
@@ -145,7 +147,10 @@ def parse_args(args, conf):
 
     if opts.simple_md_filenames:
         opts.unique_md_filenames = False
-
+    
+    if opts.nodatabase:
+        opts.database = 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