[arch-projects] [dbscripts] [GIT] Official repo DB scripts branch master updated. 20131102-59-g36b71d3

Eli Schwartz eschwartz at archlinux.org
Thu Feb 15 20:09:57 UTC 2018

On 02/15/2018 02:04 PM, Luke Shumaker wrote:
>> -	[ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT} ] && return 1
>> -	[ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT}.sig ] && return 1
>> +	[[ -f ${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}${PKGEXT} ]] && return 1
>> +	[[ -f ${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}${PKGEXT}.sig ]] && return 1
> You don't want to do that here.  In dbscripts, PKGEXT is a glob
> pattern--it needs to be "unquoted"; and `[[ ... ]]`'s magic-quoting
> breaks that.  The closing-quote coming before ${PKGEXT} was quite
> intentional.

Seems like an easy thing to fix, we always use .pkg.tar.xz and using a
glob there seems quite ugly.
(What happens if it magically matches two files? The POSIX [ construct
explodes and burns your house down.)

But what you're saying is that check_pkgrepos should never fail even if
the package already exists, since it doesn't exist with a literal ? char
-- this should be caught by test/cases/db-update.bats in
@test "update same any package to different repositories fails"

And that test does not fail... looks like it needs to test the case
where the second package is renamed...

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-projects/attachments/20180215/748c7fde/attachment.asc>

More information about the arch-projects mailing list