Re: [arch-projects] [dbscripts] [PATCH v2 4/8] Correctly treat PKGEXT_glob as a glob

2018-02-18 Thread Luke Shumaker
On Sun, 18 Feb 2018 12:17:32 -0500, Luke Shumaker wrote: > > diff --git a/test/cases/ftpdir-cleanup.bats b/test/cases/ftpdir-cleanup.bats > index 7dfad4a..efc18a8 100644 > --- a/test/cases/ftpdir-cleanup.bats > +++ b/test/cases/ftpdir-cleanup.bats > @@ -13,8 +13,8 @@ __checkRepoRemovedPackage() {

Re: [arch-projects] [dbscripts] [PATCH v2 0/8] PKGEXT fixup

2018-02-18 Thread Luke Shumaker
On Sun, 18 Feb 2018 12:29:31 -0500, Eli Schwartz wrote: > On 02/18/2018 12:17 PM, Luke Shumaker wrote: > > I don't mean to take credit away from Eli by re-working his patches (I > > credit him in the commit messages); I just wanted to make it clearer > > what is accomplished by each change, and

Re: [arch-projects] [dbscripts] [PATCH v2 0/8] PKGEXT fixup

2018-02-18 Thread Eli Schwartz via arch-projects
On 02/18/2018 12:17 PM, Luke Shumaker wrote: > From: Luke Shumaker > > This incorporates and improves on work from 3 previously submitted > patch sets: > > 1. My testcase patch, but > - take Eli's suggestion to simplify db-update.bats > - add another commit so we

[arch-projects] [dbscripts] [PATCH v2 8/8] ftpdir-cleanup, sourceballs: swap out [ -ge 1 ] for (( > 0 ))

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker This is based on a patch by Eli Schwartz --- cron-jobs/ftpdir-cleanup | 2 +- cron-jobs/sourceballs| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup

[arch-projects] [dbscripts] [PATCH v2 7/8] Replace all instances of `find` command with bash globbing

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker This fully removes the use of find from the codebase, and leads to a micro-optimization in a couple cases. Of the 5 instances in these files: - (ftpdir-cleanup) One was unnecessary as `cat` can natively consume all files passed to it (from a glob)

[arch-projects] [dbscripts] [PATCH v2 5/8] config: let PKGEXT_glob be an extglob; have its value match makepkg

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker 1. In order to support PKGEXT_glob being an extglob, we must switch several uses of `find` (in db-update and ftpdir-cleanup) to use bash globbing instead, as `find` can't be made to use extended globbing. In general, this technique requires

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

2018-02-18 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

[arch-projects] [dbscripts] [PATCH v2 4/8] Correctly treat PKGEXT_glob as a glob

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker Several places treated PKGEXT as a fixed string in [[ -f ]] existence checks. Fix that elegantly by introducing an is_globfile function. This fixes the failing db-update.bats "update same any package to same repository fails" test. This is based on a

[arch-projects] [dbscripts] [PATCH v2 0/8] PKGEXT fixup

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker This incorporates and improves on work from 3 previously submitted patch sets: 1. My testcase patch, but - take Eli's suggestion to simplify db-update.bats - add another commit so we don't hit a bug in BATS 2. Renaming PKGEXT->PKGEXT_glob from