Re: [arch-projects] [dbscripts] [PATCH v2 5/5] Globally set $PKGEXT to a bash extended glob representing valid choices.

2018-02-19 Thread Luke Shumaker
On Mon, 19 Feb 2018 15:11:45 -0500, Eli Schwartz via arch-projects wrote: > +# Check if a file exists, even if the file uses wildcards > +is_globfile() { > + [[ -f $1 ]] > +} > + Dave's comment on my version of this patchset applies equally to this version: > Frankly, this function name and

[arch-projects] [dbscripts] [PATCH v4] test: db-update: verify that PKGEXT(S) is treated as a glob

2018-02-19 Thread Luke Shumaker
From: Luke Shumaker Commit b61a714 introduced a regression that in a db-functions function called by db-update, config:PKGEXT is treated like a fixed string, instead of as a glob. Because of inadequacy of the test-suite, this did not cause a test failure.

Re: [arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Eli Schwartz via arch-projects
On 02/19/2018 10:24 PM, Luke Shumaker wrote: > The glob I was using it for wasn't PKGEXT(s), it was the '*' that's > right there in the argument! Right, that's why I replied to myself with "Actually, it would tend to help if we had the actual candidate filenames here. Hmm..." Context: I wrote a

Re: [arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Luke Shumaker
Eli Schwartz wrote: > > > if [[ -n ${BUILDDIR} ]]; then > > cache=${BUILDDIR}/$(__getCheckSum PKGBUILD) > > - if [[ -d ${cache} ]]; then > > + if __isGlobfile "${cache}"/*"${PKGEXT}"; then > > cp -Lv ${cache}/*${PKGEXT}{,.sig} ${pkgdest} > >

[arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Luke Shumaker
From: Luke Shumaker This has the test change PKGEXT the second time it tries to release the package. Currently, this causes the tests to fail. That's a good thing; it's checking for the regression where db-functions:check_pkgrepos isn't treating PKGEXT as a glob. Without

Re: [arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Eli Schwartz via arch-projects
On 02/19/2018 06:31 PM, Luke Shumaker wrote: > From: Luke Shumaker > > This has the test change PKGEXT the second time it tries to release the > package. Currently, this causes the tests to fail. That's a good thing; > it's checking for the regression where

Re: [arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Eli Schwartz via arch-projects
On 02/19/2018 09:12 PM, Eli Schwartz wrote: > On 02/19/2018 08:47 PM, Eli Schwartz wrote: >> On 02/19/2018 06:31 PM, Luke Shumaker wrote: >>> From: Luke Shumaker >>> >>> This has the test change PKGEXT the second time it tries to release the >>> package. Currently, this

Re: [arch-projects] [dbscripts] [PATCH v2 3/5] db-update: replace external find command with bash globbing

2018-02-19 Thread Luke Shumaker
On Mon, 19 Feb 2018 15:11:43 -0500, Eli Schwartz via arch-projects wrote: > --- a/db-update > +++ b/db-update > @@ -9,9 +9,14 @@ if (( $# >= 1 )); then > fi > > # Find repos with packages to release > -if ! staging_repos=($(find "${STAGING}" -mindepth 1 -type f -name > "*${PKGEXTS}" -printf

Re: [arch-projects] [dbscripts] [PATCH v2 2/8] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Dave Reisner
On Sun, Feb 18, 2018 at 12:17:30PM -0500, Luke Shumaker wrote: > From: Luke Shumaker > > This has the test change PKGEXT the second time it tries to release the > package. Currently, this causes the tests to fail. That's a good thing; > it's checking for the regression

Re: [arch-projects] [dbscripts] [PATCH v2 5/5] Globally set $PKGEXT to a bash extended glob representing valid choices.

2018-02-19 Thread Luke Shumaker
On Mon, 19 Feb 2018 15:11:45 -0500, Eli Schwartz via arch-projects wrote: > Document the fact that this has *always* been some sort of glob, and > update the two cases where this was (not!) being evaluated by bash > [[ ... ]], to use a not-elegant-at-all proxy function is_globfile() to > evaluate

[arch-projects] [dbscripts] [PATCH v2 3/5] db-update: replace external find command with bash globbing

2018-02-19 Thread Eli Schwartz via arch-projects
Don't bother emitting errors. bash doesn't show globbing errors if it cannot read a directory to try globbing there. And the former code never aborted on errors anyway, as without `set -o pipefail` the sort command swallowed the return code. Signed-off-by: Eli Schwartz

[arch-projects] [dbscripts] [PATCH v2 2/5] Fix overloading PKGEXT to mean two things.

2018-02-19 Thread Eli Schwartz via arch-projects
PKGEXT is a makepkg variable referring to a fixed filename suffix, but we were also using it to mean a bash glob referring to candidate filenames. This is wrong, so rename it to PKGEXTS which is more descriptive of its purpose. Exclude the testsuite from this change, as the testsuite actually

[arch-projects] [dbscripts] [PATCH v2 0/5] Fix ambiguous uses of $PKGEXT

2018-02-19 Thread Eli Schwartz via arch-projects
Comes with fancy checkmarks from travis saying that the testsuite passed: https://github.com/archlinux/dbscripts/commits/pkgext-real-wildcards Eli Schwartz (5): Use even more bashisms. Fix overloading PKGEXT to mean two things. db-update: replace external find command with bash globbing

[arch-projects] [dbscripts] [PATCH v2 5/5] Globally set $PKGEXT to a bash extended glob representing valid choices.

2018-02-19 Thread Eli Schwartz via arch-projects
The current glob `*.pkg.tar.?z` is both less restrictive and more restrictive than makepkg, as it accepts any valid unicode character. To be more exact, it's almost completely orthogonal to the one in makepkg. makepkg only accepts .tar.gz, .tar.bz2, .tar.xz, .tar.lzo, .tar.lrz, and .tar.Z and

[arch-projects] [dbscripts] [PATCH v2 1/5] Use even more bashisms.

2018-02-19 Thread Eli Schwartz via arch-projects
Catch some cases that were missed in the previous run. Signed-off-by: Eli Schwartz --- This patch is new + refactor some changes from: ftpdir-cleanup,sourceballs: replace external find command with bash globbing cron-jobs/devlist-mailer | 6 +++---

Re: [arch-projects] [dbscripts] [PATCH v2 3/5] db-update: replace external find command with bash globbing

2018-02-19 Thread Eli Schwartz via arch-projects
On 02/19/2018 04:53 PM, Luke Shumaker wrote: > Isn't [[ -d ]] there redundant? If globbing gave us $dir/file, of > course $dir is a directory! True. I think I still had that in from some point where I hadn't enabled nullglob yet. > Meanwhile, this dropped the `-type f` check, though I'm not

Re: [arch-projects] [dbscripts] [PATCH v2 5/5] Globally set $PKGEXT to a bash extended glob representing valid choices.

2018-02-19 Thread Eli Schwartz via arch-projects
On 02/19/2018 04:59 PM, Luke Shumaker wrote: > Is there a reason you reject '.pkg.tar' (no compression, which makepkg > accepts)? I don't think there is any utility in supporting uncompressed packages in dbscripts. Anyone who wants to customize this in a non-Arch Linux deployment is free to do