Re: [arch-projects] [dbscripts] [PATCH] db-functions: unify the repo-add/repo-remove caller

2018-03-13 Thread Luke Shumaker
On Mon, 26 Feb 2018 17:59:09 -0500, Eli Schwartz via arch-projects wrote: > > Use less duplicated logic, opening the way to more elegantly change > the interface for the repo-add/repo-remove scripts which are themselves > symlinked together and mostly have the same interface. > > Signed-off-by: E

[arch-projects] [dbscripts] [PATCH 5/8] Add "#!/hint/bash" to the beginning of several files.

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker It is a method of notifying text-editors that a file is in Bash syntax without giving it a propper shebang (which would be confusing, as it would suggest that the file should be executable), as well as working across virtually all text-editors (unlike "-*- Mode: Bash -*-" or w

[arch-projects] [dbscripts] [PATCH 3/8] Export TMPDIR, and use mktemp -t instead of making it part of the template

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker --- config| 2 +- db-functions | 2 +- test/cases/db-update.bats | 2 +- test/lib/common.bash | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index 02ade09..2f5dbc6 100644 --- a/config +++ b/config @

[arch-projects] [dbscripts] [PATCH 7/8] Normalize to tab indent.

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker --- cron-jobs/check_archlinux/parse_pkgbuilds.sh | 10 +- cron-jobs/devlist-mailer | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux/parse_pkgbuilds

[arch-projects] [dbscripts] [PATCH 2/8] Use printf-formatters instead of string interpolation on msg, error, etc.

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker --- cron-jobs/ftpdir-cleanup | 8 cron-jobs/integrity-check | 2 +- cron-jobs/sourceballs | 8 db-functions | 6 +++--- db-move | 4 ++-- db-remove | 2 +- db-repo-add | 2 +- db-repo-remove

[arch-projects] [dbscripts] [PATCH 8/8] devlist-mailer: Make LIST and FROM configurable

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker --- config | 5 + cron-jobs/devlist-mailer | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config b/config index d703e7b..fd79b6e 100644 --- a/config +++ b/config @@ -35,6 +35,11 @@ PKGEXTS=".pkg.tar.@(gz|bz2|xz|lzo|lrz|Z)" # A

[arch-projects] [dbscripts] [PATCH 6/8] Consistently use "$(dirname "$(readlink -e "$0")")"

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker This does correct handling of - executing a program by symlink - any weird characters in the full path - I'm sure there's another case I thought about when I originally did this. --- cron-jobs/ftpdir-cleanup | 4 ++-- cron-jobs/integrity-check | 2 +- cron-jobs/update-

[arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker `grep -q` may exit as soon as it finds a match; this is a good optimization for when the input is a file. However, if the input is the output of another program, then that other program will receive SIGPIPE, and further writes will fail. When this happens, it might (bsdtar d

[arch-projects] [dbscripts] [PATCH 0/8] Backports from Parabola

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker These are commits from Parabola's dbscripts that I think are upstreamable. No real theme to them, but because some of them are wide-sweeping (eg. clean up quoting), they are a good base layer to apply before backporting other changes. I've done my best to look over them, but

Re: [arch-projects] [dbscripts] [PATCH 0/8] Backports from Parabola

2018-03-13 Thread Eli Schwartz via arch-projects
On 03/13/2018 09:51 PM, Luke Shumaker wrote: > BTW, now that dbscripts is on GitHub, is that the preferred way of > submitting these? Or is this mailing list still best? It's been on github for quite some time, but I am okay with looking at things in either location. -- Eli Schwartz Bug Wrangle

Re: [arch-projects] [dbscripts] [PATCH 8/8] devlist-mailer: Make LIST and FROM configurable

2018-03-13 Thread Eli Schwartz via arch-projects
On 03/13/2018 09:52 PM, Luke Shumaker wrote: > From: Luke Shumaker TBH we don't even send out integrity check email anymore, do you? -- Eli Schwartz Bug Wrangler and Trusted User signature.asc Description: OpenPGP digital signature

Re: [arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Eli Schwartz via arch-projects
On 03/13/2018 09:52 PM, Luke Shumaker wrote: > From: Luke Shumaker > > `grep -q` may exit as soon as it finds a match; this is a good optimization > for when the input is a file. However, if the input is the output of > another program, then that other program will receive SIGPIPE, and further >

Re: [arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Luke Shumaker
On Tue, 13 Mar 2018 21:52:01 -0400, Luke Shumaker wrote: > > From: Luke Shumaker > > `grep -q` may exit as soon as it finds a match; this is a good optimization > for when the input is a file. However, if the input is the output of > another program, then that other program will receive SIGPIPE

Re: [arch-projects] [dbscripts] [PATCH 1/8] Fix quoting around variables, especially arrays.

2018-03-13 Thread Luke Shumaker
On Wed, 14 Mar 2018 00:11:05 -0400, Eli Schwartz via arch-projects wrote: > > while read line; do > > - pkginfo=(${line}) > > + pkginfo=("${line}") > > That's completely wrong, just look at the next five lines. > > > pkgbase=${pkginfo[0]} > > pkgver

Re: [arch-projects] [dbscripts] [PATCH 8/8] devlist-mailer: Make LIST and FROM configurable

2018-03-13 Thread Luke Shumaker
On Wed, 14 Mar 2018 00:11:40 -0400, Eli Schwartz wrote: > > On 03/13/2018 09:52 PM, Luke Shumaker wrote: > > From: Luke Shumaker > > TBH we don't even send out integrity check email anymore, do you? No, but we have a different cron-job that calls devlist-mailer -- Happy hacking, ~ Luke Shumak

Re: [arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Luke Shumaker
On Wed, 14 Mar 2018 00:11:12 -0400, Eli Schwartz wrote: > > On 03/13/2018 09:52 PM, Luke Shumaker wrote: > > From: Luke Shumaker > > > > `grep -q` may exit as soon as it finds a match; this is a good optimization > > for when the input is a file. However, if the input is the output of > > anoth

Re: [arch-projects] [dbscripts] [PATCH 1/8] Fix quoting around variables, especially arrays.

2018-03-13 Thread Eli Schwartz via arch-projects
On 03/14/2018 12:53 AM, Luke Shumaker wrote: > Part of it is to have a common style. Trying to rectify two codebases > that diverged 7 years ago is rough. When trying to come up with clean > diffs, having to guess "did the other one quote this variable?" makes > it harder. If you can say "always