Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#11450 - [k3b-i18n] wrong dependancy k3b>=$pkgver (in PKGBUILD)

Attached to Project: Arch Linux
Opened by solsTiCe (zebul666) - Thursday, 11 September 2008, 17:47 GMT
Last edited by Ronald van Haren (pressh) - Monday, 10 November 2008, 18:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Aaron Griffin (phrakture)
Ronald van Haren (pressh)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

k3b-i18n-1.0.5-1 shows a list of depends like that with pacman -Qi k3b-i18n:
k3b>=$pkgver

there is an error in the PKGBUILD:
- either use " " double quote around k3b-$pkgver so that the shell evaluates it
- or either use single quote (as it is required) but then specify the spec by number i.e. k3b>=1.0.5

This task depends upon

Closed by  Ronald van Haren (pressh)
Monday, 10 November 2008, 18:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in trunk
Comment by solsTiCe (zebul666) - Saturday, 13 September 2008, 11:40 GMT
it is correctly displayed by pacman -Si k3b-i18n because there seems to have difference in the way repo-add and makepkg work!
Comment by Roman Kyrylych (Romashka) - Sunday, 28 September 2008, 15:50 GMT
@ Dan: I couldn't add you to the notification list (bug in Flyspray!), so you're assigned too.
Comment by Dan McGee (toofishes) - Sunday, 28 September 2008, 15:58 GMT
makepkg evaluates the PKGBUILD as a shell script. This means normal shell quoting rules apply- if you use '$foobar' (single quotes), variables will not be expanded.

I'm not sure what the actual bug is here. repo-add never looks at the PKGBUILD, so if for some reason it is eval-ing the $pkgver at that late stage, we have a problem there that needs to be fixed as they should not be evaluated or processed as anything but literals. Regardless, if you are using variables in your dependencies, then don't use single quotes.
Comment by Dan McGee (toofishes) - Sunday, 28 September 2008, 16:07 GMT
This looks like our culprit- Aaron, do you know why you originally evaled the lines as we read them in in repo-add? We should take everything as literals as makepkg handed it to us, shouldn't we?

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index d6d59eb..7c9f790 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -154,7 +154,6 @@ db_write_entry()
local line
for line in $(bsdtar -xOf "$pkgfile" .PKGINFO | \
grep -v "^#" | sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do
- eval "$line"
case "$line" in
group=*) _groups="$_groups$group\n" ;;
depend=*) _depends="$_depends$depend\n" ;;
Comment by Ronald van Haren (pressh) - Monday, 29 September 2008, 10:53 GMT
changed to double quotes in trunk so pacman -Qi will display it correct after next rebuild
Comment by Ronald van Haren (pressh) - Monday, 29 September 2008, 11:23 GMT
changed to double quotes in trunk so pacman -Qi will display it correct after next rebuild

Loading...