From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2F53B138350 for ; Fri, 17 Apr 2020 19:52:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 79435E08BD; Fri, 17 Apr 2020 19:52:30 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4B161E08BD for ; Fri, 17 Apr 2020 19:52:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4DDCF34F146 for ; Fri, 17 Apr 2020 19:52:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9380E1E0 for ; Fri, 17 Apr 2020 19:52:26 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1587143027.c6d5b3151d284f62f04fe2999b8c532e9b7323c7.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/, etc/, doc/, catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/genbase.py catalyst/defaults.py catalyst/main.py doc/catalyst-config.5.txt etc/catalyst.conf X-VCS-Directories: doc/ catalyst/base/ catalyst/ etc/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: c6d5b3151d284f62f04fe2999b8c532e9b7323c7 X-VCS-Branch: master Date: Fri, 17 Apr 2020 19:52:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 918de880-ece5-4840-a292-d4a7ee73d0b4 X-Archives-Hash: c2d26144098b17d8eade56cfc3d93aa6 commit: c6d5b3151d284f62f04fe2999b8c532e9b7323c7 Author: Matt Turner gentoo org> AuthorDate: Fri Apr 17 03:38:42 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri Apr 17 17:03:47 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c6d5b315 catalyst: Remove 'contents' config option This option seems completely absurd and on top of that has been completely broken, since contents() has been passed 'j', which is the mode, as the positional argument 'destination'. This only worked because destination is not used in the contents generation and the actual mode parameter has a default argument of 'auto'. So the config option has not worked in a long time and no one has noticed. Signed-off-by: Matt Turner gentoo.org> catalyst/base/genbase.py | 21 ++++++++------------- catalyst/defaults.py | 1 - catalyst/main.py | 4 ---- doc/catalyst-config.5.txt | 27 --------------------------- 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"