Gentoo Archives: gentoo-catalyst

From: nic boet <nic@××××.cc>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] releng catalyst-auto misc cleanups
Date: Sun, 13 Mar 2022 05:55:27
Message-Id: CAPe92hye46P6H0HMWAeS+peFsAYGnbD6o5gHXnkCJ-srRQY2tg@mail.gmail.com
1 Greetings-
2 Please find attached patch for cleanups and bug fixes of releng
3 ./tools/catalyst-auto script.
4 I realize there is more than one issue fixed, and some if not most is
5 cosmetic. Happy to split into multiple patch files, each diff section is
6 unique and is in order as described here.
7
8 ==
9 update copyright header
10 Cosmetic :)
11
12 ==
13 improve send_mail() because it acts more like the logger
14 * output failure events to stdout if verbose set, useful for those without
15 a mailer
16 * do not email if recipient var is undef; allows flexibility for
17 non-releng use cases
18
19 I was trying to troubleshoot why the script kept terminating, I didn't have
20 a mailer setup on that build system yet.
21 Figured it would also be handy to disable broadcasting messages to the
22 gentoo devs if testing or for unofficial user builds
23
24 ==
25 do not source catalyst.conf as it's not bash syntax
26 * non-bash formatted lines are executed; results in several "command not
27 found" errors
28 * instead, parse the file for the specific var
29
30 These errors are cleared
31 /etc/catalyst/catalyst.conf: line 13: digests: command not found
32 /etc/catalyst/catalyst.conf: line 19: envscript: command not found
33 /etc/catalyst/catalyst.conf: line 22: options: command not found
34 /etc/catalyst/catalyst.conf: line 26: autoresume,: command not found
35 /etc/catalyst/catalyst.conf: line 33: bindist,: command not found
36 /etc/catalyst/catalyst.conf: line 39: distcc,: command not found
37 /etc/catalyst/catalyst.conf: line 50: kerncache,: command not found
38 /etc/catalyst/catalyst.conf: line 53: pkgcache,: command not found
39 /etc/catalyst/catalyst.conf: line 57: seedcache,: command not found
40 /etc/catalyst/catalyst.conf: line 66: ]: command not found
41 /etc/catalyst/catalyst.conf: line 87: distcc_hosts: command not found
42
43
44 ==
45 make it more apparent that bash time is not used.
46
47 This will still output "which: no time", with more info now as how to
48 correct
49 which: no time in
50 (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/13/bin)
51
52
53 ==
54 snapshot_cache was removed Apr 2020 catalyst commit
55 6493f3bc534f97468c514a12035b10e3107c4ecf
56 * --preclean would fail as catalyst.conf is invalid
57
58 Storedir now becomes the only var extracted from
59 /etc/catalyst/catalyst.cong using the new catalyst_var() function redefined
60 in this patch
61
62
63 Hope this helps
64 Thank you :)
65
66 --
67
68 Nic

Attachments

File name MIME type
catalyst-auto_misc-cleanups.patch text/x-patch