repo-add --key broken in 6.1.0
This was first reported by @hardfalcon in archlinux/packaging/packages/pacman#17 (closed)
When one runs repo-add
like so:
$ repo-add --sign --key "6F779ADE247A6B8A0F72CC13C047D4F328B52585" /home/custompkgs/custom.db.tar.gz $(makepkg --packagelist)
the script crashes with ERROR: An unknown error has occurred. Exiting...
I have run the script with xtrace enabled (see archlinux/packaging/packages/pacman#17 (comment 170479)) and I think the problem is that it inserts --
as end of arguments and wrongly uses that as the argument to --key
:
+ case $1 in
+ KEY=1
+ shift
+ GPGKEY=--
+ shift
The following commit looks like it could be the culprit 4f43ce3e