diff options
-rw-r--r-- | catalyst/base/genbase.py | 21 | ||||
-rw-r--r-- | catalyst/defaults.py | 1 | ||||
-rw-r--r-- | catalyst/main.py | 4 | ||||
-rw-r--r-- | doc/catalyst-config.5.txt | 27 | ||||
-rw-r--r-- | etc/catalyst.conf | 12 |
5 files changed, 8 insertions, 57 deletions
diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py index 2dc8bad0..08076460 100644 --- a/catalyst/base/genbase.py +++ b/catalyst/base/genbase.py @@ -15,19 +15,14 @@ class GenBase(): contents = path + ".CONTENTS" if os.path.exists(contents): os.remove(contents) - if "contents" in self.settings: - contents_map = self.settings["contents_map"] - if os.path.exists(path): - with io.open(contents, "w", encoding='utf-8') as myf: - keys = {} - for i in self.settings["contents"].split(): - keys[i] = 1 - array = sorted(keys.keys()) - for j in array: - contents = contents_map.contents(path, j, - verbose=self.settings["VERBOSE"]) - if contents: - myf.write(contents) + + contents_map = self.settings["contents_map"] + if os.path.exists(path): + with io.open(contents, "w", encoding='utf-8') as myf: + contents = contents_map.contents(path, '', + verbose=self.settings["VERBOSE"]) + if contents: + myf.write(contents) def gen_digest_file(self, path): digests = path + ".DIGESTS" diff --git a/catalyst/defaults.py b/catalyst/defaults.py index 570fc4df..e60980d3 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -35,7 +35,6 @@ valid_config_file_values.extend([ "compression_mode", "compressor_arch", "compressor_options", - "contents", "DEBUG", "decompressor_search_order", "digests", diff --git a/catalyst/main.py b/catalyst/main.py index 0fb8a682..ba6e3fcc 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -68,10 +68,6 @@ def parse_config(config_files): if key in myconf: conf_values[key] = myconf[key] - if "contents" in myconf: - # replace '-' with '_' (for compatibility with existing configs) - conf_values["contents"] = myconf["contents"].replace("-", '_') - if "envscript" in myconf: log.info('Envscript support enabled.') diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt index 76ac4a29..220bb528 100644 --- a/doc/catalyst-config.5.txt +++ b/doc/catalyst-config.5.txt @@ -26,7 +26,6 @@ and empty lines are interpreted as comments. For example: # /etc/catalyst/catalyst.conf digests="auto" -contents="auto" envscript="/etc/catalyst/catalystrc" options="autoresume bindist kerncache pkgcache seedcache snapcache" @@ -57,32 +56,6 @@ supported options below. Adding them all may take a long time. (example: `md5 sha1 sha512 whirlpool`). See the *SUPPORTED HASHES* section for a list of supported hashes. -*contents*:: -Create a `.CONTENTS` file listing the contents of the file. If this -variable is empty, no `.CONTENTS` will be generated at all. Supported -values: -+ --- -auto:: -Strongly recommended - -tar-tv:: -Do `tar tvf FILE` - -tar-tvz:: -Do `tar tvzf FILE` - -tar-tvy:: -Do `tar tvyf FILE` - -isoinfo-l:: -Do `isoinfo -l -i FILE` - -isoinfo-f:: -Do `isoinfo -f -i FILE`. 'isoinfo-f' is the only option not chosen -by the automatic algorithm. --- - *envscript*:: Environment script location, which allows users to set options such as HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment diff --git a/etc/catalyst.conf b/etc/catalyst.conf index dd34fae3..a3c22049 100644 --- a/etc/catalyst.conf +++ b/etc/catalyst.conf @@ -14,18 +14,6 @@ # tiger160, whirlpool digests="blake2 sha512" -# Creates a .CONTENTS file listing the contents of the file. Pick from any of -# the supported options below: -# auto - strongly recommended -# tar_tv - does 'tar tvf FILE' -# tar_tvz - does 'tar tvzf FILE' -# tar_tvy - does 'tar tvyf FILE' -# isoinfo_l - does 'isoinfo -l -i FILE' -# isoinfo_f - does 'isoinfo -f -i FILE' -# 'isoinfo_f' is the only option not chosen by the automatic algorithm. -# If this variable is empty, no .CONTENTS will be generated at all. -contents="auto" - # distdir specifies where your distfiles are located. This setting should # work fine for most default installations. distdir="/var/cache/distfiles" |