Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/, catalyst/base/, etc/
Date: Thu, 21 May 2020 20:25:41
Message-Id: 1589939377.adfb01ca3a36e74f500e384177404563023aa12b.mattst88@gentoo
1 commit: adfb01ca3a36e74f500e384177404563023aa12b
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 16 21:53:11 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed May 20 01:49:37 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=adfb01ca
7
8 catalyst: Remove support for source_matching="loose"
9
10 This does not seem like a useful feature to me.
11
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 catalyst/base/stagebase.py | 3 ---
15 catalyst/defaults.py | 1 -
16 catalyst/support.py | 6 +++---
17 etc/catalyst.conf | 12 ------------
18 4 files changed, 3 insertions(+), 19 deletions(-)
19
20 diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
21 index f39895fe..febaf969 100644
22 --- a/catalyst/base/stagebase.py
23 +++ b/catalyst/base/stagebase.py
24 @@ -130,8 +130,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
25 decomp_opt=self.settings["decomp_opt"])
26 self.accepted_extensions = self.decompressor.search_order_extensions(
27 self.settings["decompressor_search_order"])
28 - log.notice("Source file specification matching setting is: %s",
29 - self.settings["source_matching"])
30 log.notice("Accepted source file extensions search order: %s",
31 self.accepted_extensions)
32 # save resources, it is not always needed
33 @@ -409,7 +407,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
34 normpath(self.settings["storedir"] + "/builds/" +
35 self.settings["source_subpath"]),
36 self.accepted_extensions,
37 - self.settings["source_matching"] in ["strict"]
38 )
39 log.debug('Source path returned from file_check is: %s',
40 self.settings["source_path"])
41
42 diff --git a/catalyst/defaults.py b/catalyst/defaults.py
43 index 412cb956..14f671fe 100644
44 --- a/catalyst/defaults.py
45 +++ b/catalyst/defaults.py
46 @@ -45,7 +45,6 @@ confdefaults = {
47 "repos": "%(storedir)s/repos",
48 "sharedir": "/usr/share/catalyst",
49 "shdir": "%(sharedir)s/targets",
50 - "source_matching": "strict",
51 "storedir": "/var/tmp/catalyst",
52 "target_distdir": "/var/cache/distfiles",
53 "target_pkgdir": "/var/cache/binpkgs",
54
55 diff --git a/catalyst/support.py b/catalyst/support.py
56 index c4a5c797..a6a6854a 100644
57 --- a/catalyst/support.py
58 +++ b/catalyst/support.py
59 @@ -59,7 +59,7 @@ def cmd(mycmd, env=None, debug=False, fail_func=None):
60 print_traceback=False)
61
62
63 -def file_check(filepath, extensions=None, strict=True):
64 +def file_check(filepath, extensions=None):
65 '''Check for the files existence and that only one exists
66 if others are found with various extensions
67 '''
68 @@ -73,8 +73,8 @@ def file_check(filepath, extensions=None, strict=True):
69 ".CONTENTS") and not x.endswith(".CONTENTS.gz") and not x.endswith(".DIGESTS")]
70 if len(files) == 1:
71 return files[0]
72 - if len(files) > 1 and strict:
73 - msg = "Ambiguos Filename: %s\nPlease specify the correct extension as well" % filepath
74 + if len(files) > 1:
75 + msg = "Ambiguous Filename: %s\nPlease specify the correct extension as well" % filepath
76 raise CatalystError(msg, print_traceback=False)
77 target_file = None
78 for ext in extensions:
79
80 diff --git a/etc/catalyst.conf b/etc/catalyst.conf
81 index f64fe971..d33be15f 100644
82 --- a/etc/catalyst.conf
83 +++ b/etc/catalyst.conf
84 @@ -50,18 +50,6 @@ envscript="/etc/catalyst/catalystrc"
85 # (These options can be used together)
86 options="autoresume bindist kerncache pkgcache seedcache"
87
88 -# source_matching specifies how catalyst will match non-specific file names
89 -# if the filename is not found as an exact match.
90 -# ie: a filename without the extension specified. "/path/to/foo"
91 -#
92 -# possible values are:
93 -# "strict" meaning if more than one file of that name is present with any
94 -# file extension, then it will raise an exception.
95 -# "loose" meaning it will search for an existing filename with an added
96 -# extension from an ordered list of extensions determined from the
97 -# decompressor_search_order specification in the spec file or (default)
98 -source_matching="strict"
99 -
100 # port_logdir is where all build logs will be kept. This dir will be automatically cleaned
101 # of all logs over 30 days old. If left undefined the logs will remain in the build directory
102 # as usual and get cleaned every time a stage build is restarted.