From 95b28f987f391a548f2ef9a6bde300291ef1f92a Mon Sep 17 00:00:00 2001 From: Krytarik Raido Date: Wed, 17 Jul 2019 03:27:04 +0200 Subject: Add support for override files. Closes: #780972 --- doc/mini-dinstall.conf | 4 ++++ mini-dinstall | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/mini-dinstall.conf b/doc/mini-dinstall.conf index 999a31c..9600996 100644 --- a/doc/mini-dinstall.conf +++ b/doc/mini-dinstall.conf @@ -58,6 +58,10 @@ architectures = all, i386, sparc, powerpc # which puts .debs from each architecture in a separate subdirectory. archive_style = flat +# The basename of an optional pair of override files +# to pass to apt-ftparchive +override_file = override + # Whether or not to mail you about successful installations mail_on_success = yes diff --git a/mini-dinstall b/mini-dinstall index a777b27..bae2d15 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -399,6 +399,7 @@ class DistOptionHandler: 'mail_on_success': ['bool', True], 'tweet_on_success': ['bool', False], 'archive_style': ['str', None], + 'override_file': ['str', None], # Release file stuff 'generate_release': ['bool', False], 'release_origin': ['str', user], @@ -1106,10 +1107,12 @@ class ArchiveDirIndexer(threading.Thread): return os.path.join(*[self._name] + list(args)) def _make_indexfile(self, dir, type, name, arch=None): - cmdline = ['apt-ftparchive', type, dir, + cmdline = ['apt-ftparchive', '-o', 'APT::FTPArchive::AlwaysStat=true', '-o', 'APT::FTPArchive::SHA1=false', - '-o', 'APT::FTPArchive::MD5=false'] + '-o', 'APT::FTPArchive::MD5=false', type, dir] + if self._override_file: + cmdline.append(self._override_file) if arch: cmdline.extend(['--arch', arch]) if not nodb_mode: -- cgit v1.2.3