public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/
Date: Sun, 28 Feb 2021 14:39:47 +0000 (UTC)	[thread overview]
Message-ID: <1614202018.483385348b32fab2230f596816b6e1d0b6489962.dilfridge@gentoo> (raw)

commit:     483385348b32fab2230f596816b6e1d0b6489962
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 21:26:58 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 21:26:58 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=48338534

Add option to generate BSD-style tagged hashes (can be verified by modern coreutils)

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/genbase.py | 6 +++++-
 catalyst/defaults.py     | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index c7dd87bc..52418877 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -24,7 +24,11 @@ class GenBase():
                 h.update(data)
 
         filename = os.path.split(filepath)[1]
-        return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
+
+	if self.settings['digest_format'] == 'bsd':
+		return f'# {name.upper()} HASH\n{name.upper()} ({filename}) = {h.hexdigest()}\n'
+	else:
+		return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
 
     def gen_contents_file(self, path):
         c = self.settings['contents_map']

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index ccb0a584..2cede562 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -11,6 +11,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, LIST_XATTRS_OPTIONS
 valid_config_file_values = frozenset([
     "compression_mode",
     "digests",
+    "digest_format",
     "distcc_hosts",
     "distdir",
     "envscript",
@@ -35,6 +36,7 @@ confdefaults = {
     "compressor_options": XATTRS_OPTIONS['linux'],
     "decomp_opt": DECOMPRESSOR_PROGRAM_OPTIONS['linux'],
     "decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER,
+    "digest_format": 'linux',
     "distdir": portage.settings['DISTDIR'],
     "icecream": "/var/cache/icecream",
     'list_xattrs_opt': LIST_XATTRS_OPTIONS['linux'],


             reply	other threads:[~2021-02-28 14:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28 14:39 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-01 19:27 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/ Andreas K. Hüttel
2021-02-20 21:27 Matt Turner
2020-10-30 22:41 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-13 20:36 Matt Turner
2020-01-27 18:52 Rick Farina
2016-05-22  3:34 Mike Frysinger
2016-03-23 16:38 Brian Dolbec
2016-03-21  5:15 Mike Frysinger
2015-10-08 20:02 Brian Dolbec
2015-09-08 14:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26  4:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1614202018.483385348b32fab2230f596816b6e1d0b6489962.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox