diff options
author | Christoph Goehre <chris@sigxcpu.org> | 2010-05-29 18:38:31 +0200 |
---|---|---|
committer | Christoph Goehre <chris@sigxcpu.org> | 2010-05-30 19:15:38 +0200 |
commit | bdd0029697de1a7d596f169634413c0f89f0e6e4 (patch) | |
tree | 7d14e32625c8c21882a5361b40b9b93909cc4dca | |
parent | db1a6cdfd7a445997e3b7188ffb85a6c933d072f (diff) | |
download | mini-dinstall-bdd0029697de1a7d596f169634413c0f89f0e6e4.tar.bz2 mini-dinstall-bdd0029697de1a7d596f169634413c0f89f0e6e4.tar.xz mini-dinstall-bdd0029697de1a7d596f169634413c0f89f0e6e4.tar.zst |
allow to disable 'db' option in apt-ftparchive
Closes: #513847
-rw-r--r-- | doc/mini-dinstall.1 | 3 | ||||
-rwxr-xr-x | mini-dinstall | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/mini-dinstall.1 b/doc/mini-dinstall.1 index d8df2e9..3a06252 100644 --- a/doc/mini-dinstall.1 +++ b/doc/mini-dinstall.1 @@ -69,6 +69,9 @@ output debugging information to the terminal and to the log \fB\-\-no\-log\fR don't write any information to the logs .TP +\fB\-\-no\-db\fR +disable lookups on package database. \fBapt-ftparchive\fR run without \-\-db option +.TP \fB\-n\fR, \fB\-\-no\-act\fR don't perform any changes; useful in combination with the .B \-v 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 |