aboutsummaryrefslogtreecommitdiffstats
path: root/mini-dinstall
diff options
context:
space:
mode:
authorLibravatarChristoph Goehre <chris@sigxcpu.org>2010-05-29 18:38:31 +0200
committerLibravatarChristoph Goehre <chris@sigxcpu.org>2010-05-30 19:15:38 +0200
commitbdd0029697de1a7d596f169634413c0f89f0e6e4 (patch)
tree7d14e32625c8c21882a5361b40b9b93909cc4dca /mini-dinstall
parentdb1a6cdfd7a445997e3b7188ffb85a6c933d072f (diff)
allow to disable 'db' option in apt-ftparchive
Closes: #513847
Diffstat (limited to 'mini-dinstall')
-rwxr-xr-xmini-dinstall12
1 files changed, 10 insertions, 2 deletions
diff --git a/mini-dinstall b/mini-dinstall
index 36c3d47..70ca221 100755
--- a/mini-dinstall
+++ b/mini-dinstall
@@ -94,6 +94,7 @@ def usage(ecode, ver_only=None):
print " -b, --batch\t\tDon't daemonize; run once, then exit"
print " -r, --run\t\tProcess queue immediately"
print " -k, --kill\t\tKill the running mini-dinstall"
+ print " --no-db\t\tDisable lookups on package database"
print " --help\t\tWhat you're looking at"
print " --version\t\tPrint the software version and exit"
sys.exit(ecode)
@@ -101,7 +102,7 @@ def usage(ecode, ver_only=None):
try:
opts, args = getopt.getopt(sys.argv[1:], 'vqc:dnbrk',
['verbose', 'quiet', 'config=', 'debug', 'no-log',
- 'no-act', 'batch', 'run', 'kill', 'help', 'version', ])
+ 'no-act', 'batch', 'run', 'kill', 'no-db', 'help', 'version', ])
except getopt.GetoptError, e:
sys.stderr.write("Error reading arguments: %s\n" % e)
usage(1)
@@ -124,6 +125,7 @@ no_act = 0
debug_mode = 0
run_mode = 0
kill_mode = 0
+nodb_mode = 0
no_log = 0
batch_mode = 0
custom_config_files = 0
@@ -155,6 +157,8 @@ for key, val in opts:
run_mode = 1
elif key in ('-k', '--kill'):
kill_mode = 1
+ elif key in ('--no-db'):
+ nodb_mode = 1
def do_and_log(msg, function, *args):
try:
@@ -1081,7 +1085,11 @@ class ArchiveDirIndexer(threading.Thread):
return apply(os.path.join, [self._name] + list(args))
def _make_indexfile(self, dir, type, name):
- cmdline = ['apt-ftparchive', type, dir, '--db', '%s.db' %dir]
+ if nodb_mode:
+ cmdline = ['apt-ftparchive', type, dir]
+ else:
+ cmdline = ['apt-ftparchive', type, dir, '--db', '%s.db' %dir]
+
self._logger.debug("Running: " + string.join(cmdline, ' '))
if no_act:
return