From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-catalyst+bounces-3629-garchives=archives.gentoo.org@lists.gentoo.org>
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 69DA31382C5
	for <garchives@archives.gentoo.org>; Wed, 20 May 2020 03:43:08 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B376CE08ED;
	Wed, 20 May 2020 03:43:07 +0000 (UTC)
Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171])
	(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 AB03CE08ED
	for <gentoo-catalyst@lists.gentoo.org>; Wed, 20 May 2020 03:43:07 +0000 (UTC)
Received: by mail-pl1-f171.google.com with SMTP id a13so768793pls.8
        for <gentoo-catalyst@lists.gentoo.org>; Tue, 19 May 2020 20:43:07 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding;
        bh=Ol4JJXFJkfuK+F86aHRJbnbzN99kJAme2r0DqqQkbE0=;
        b=j5lT16mMpDPNgW/HIYG5xj70e8Z/Rh9UMEGagT/3p5NJ0PQRFWGItnaOSB79NSRK/y
         w/j8pTH1nEEyiDpOX3HZpuXNja3S6yHv/BbWURrYq1L6cyT/BCkL9v1l9/eL+iH54sue
         8veY69mOt9p5J+/XaV2pdxGE4KXUo2xo3Q7KX+ECIl6iSy0E9ZDH0pUqHo4gR1RZeYrg
         E7ti9EQ7/P5asbF1CLR4RCcJUCsW/0EPCM4r1xNEItkGCq4Rl6e3kNCbBcsDUhFApWKs
         xCdzZf6WwXpkDApekboWgoGF3cybV3rKVug8pduMMFtkLig8lsHJwNYIb/XS+gbHuqUj
         C9ww==
X-Gm-Message-State: AOAM533SY/420NCc9t0vSaUb+uNbh3Npyy5wdeJ2Wo5CgLdV0ZDYAx0Y
	z1XAchOrY6dE+VzuRc+rg88ofxUs
X-Google-Smtp-Source: ABdhPJyZe2wHgziC9s3/CZftNw2FpJCZE4NqmVgEZLodLN4C5tHqN4jXbBW58nrIDyr3HNCyVwG1uQ==
X-Received: by 2002:a17:90a:8c85:: with SMTP id b5mr2783246pjo.187.1589946186330;
        Tue, 19 May 2020 20:43:06 -0700 (PDT)
Received: from localhost ([134.134.137.77])
        by smtp.gmail.com with ESMTPSA id 2sm769533pfz.39.2020.05.19.20.43.05
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 19 May 2020 20:43:05 -0700 (PDT)
From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH 13/21] catalyst: Remove support for source_matching="loose"
Date: Tue, 19 May 2020 20:42:18 -0700
Message-Id: <20200520034226.2870937-13-mattst88@gentoo.org>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200520034226.2870937-1-mattst88@gentoo.org>
References: <20200520034226.2870937-1-mattst88@gentoo.org>
Precedence: bulk
List-Post: <mailto:gentoo-catalyst@lists.gentoo.org>
List-Help: <mailto:gentoo-catalyst+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-catalyst+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-catalyst+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-catalyst.gentoo.org>
X-BeenThere: gentoo-catalyst@lists.gentoo.org
Reply-to: gentoo-catalyst@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Archives-Salt: 77bb954a-0e90-4bae-8388-0e3793f74411
X-Archives-Hash: 903b602619c03b3cc593407f416041e2

This does not seem like a useful feature to me.

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 catalyst/base/stagebase.py |  3 ---
 catalyst/defaults.py       |  1 -
 catalyst/support.py        |  6 +++---
 etc/catalyst.conf          | 12 ------------
 4 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f39895fe..febaf969 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -130,8 +130,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                                         decomp_opt=self.settings["decomp_opt"])
         self.accepted_extensions = self.decompressor.search_order_extensions(
             self.settings["decompressor_search_order"])
-        log.notice("Source file specification matching setting is: %s",
-                   self.settings["source_matching"])
         log.notice("Accepted source file extensions search order: %s",
                    self.accepted_extensions)
         # save resources, it is not always needed
@@ -409,7 +407,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 normpath(self.settings["storedir"] + "/builds/" +
                          self.settings["source_subpath"]),
                 self.accepted_extensions,
-                self.settings["source_matching"] in ["strict"]
             )
             log.debug('Source path returned from file_check is: %s',
                       self.settings["source_path"])
diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 412cb956..14f671fe 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -45,7 +45,6 @@ confdefaults = {
     "repos": "%(storedir)s/repos",
     "sharedir": "/usr/share/catalyst",
     "shdir": "%(sharedir)s/targets",
-    "source_matching": "strict",
     "storedir": "/var/tmp/catalyst",
     "target_distdir": "/var/cache/distfiles",
     "target_pkgdir": "/var/cache/binpkgs",
diff --git a/catalyst/support.py b/catalyst/support.py
index c4a5c797..a6a6854a 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -59,7 +59,7 @@ def cmd(mycmd, env=None, debug=False, fail_func=None):
                             print_traceback=False)
 
 
-def file_check(filepath, extensions=None, strict=True):
+def file_check(filepath, extensions=None):
     '''Check for the files existence and that only one exists
     if others are found with various extensions
     '''
@@ -73,8 +73,8 @@ def file_check(filepath, extensions=None, strict=True):
         ".CONTENTS") and not x.endswith(".CONTENTS.gz") and not x.endswith(".DIGESTS")]
     if len(files) == 1:
         return files[0]
-    if len(files) > 1 and strict:
-        msg = "Ambiguos Filename: %s\nPlease specify the correct extension as well" % filepath
+    if len(files) > 1:
+        msg = "Ambiguous Filename: %s\nPlease specify the correct extension as well" % filepath
         raise CatalystError(msg, print_traceback=False)
     target_file = None
     for ext in extensions:
diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index f64fe971..d33be15f 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -50,18 +50,6 @@ envscript="/etc/catalyst/catalystrc"
 # (These options can be used together)
 options="autoresume bindist kerncache pkgcache seedcache"
 
-# source_matching specifies how catalyst will match non-specific file names
-# if the filename is not found as an exact match.
-# ie: a filename without the extension specified.  "/path/to/foo"
-#
-# possible values are:
-#   "strict" meaning if more than one file of that name is present with any
-#            file extension, then it will raise an exception.
-#   "loose"  meaning it will search for an existing filename with an added
-#            extension from an ordered list of extensions determined from the
-#            decompressor_search_order specification in the spec file or (default)
-source_matching="strict"
-
 # port_logdir is where all build logs will be kept. This dir will be automatically cleaned
 # of all logs over 30 days old. If left undefined the logs will remain in the build directory
 # as usual and get cleaned every time a stage build is restarted.
-- 
2.26.2