You are not logged in.

#1 2009-10-19 14:45:35

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Weird AUR error when uploading PKGBUILD for kde-qt-git

I was trying yesterday to upload my kde-qt-git PKGBUILD

http://aur.archlinux.org/packages.php?ID=31297

but, for _realver, I had a series of grep echo commands to find the version from files within srcdir.

BUT AUR, if I try to upload it with this variable enabled (not commented) it thinks that there is no build function (build () { .... } )

but ... there is one build function as well as a package function.

Why does AUR get "confused" ?

Offline

#2 2009-10-20 05:15:47

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Weird AUR error when uploading PKGBUILD for kde-qt-git

For security reason, the AUR doesn't source PKGBUILD.  So your _realver was probably confusing it.  Maybe it was taking _realver to be $(echo, skipping the rest of the line, and the mismatched parenthesis broke the parsing.

Offline

#3 2009-10-20 05:45:56

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Weird AUR error when uploading PKGBUILD for kde-qt-git

flamelab wrote:

BUT AUR, if I try to upload it with this variable enabled (not commented) it thinks that there is no build function (build () { .... } )
...
Why does AUR get "confused" ?

The AUR seems to parse ALL pound signs as comment symbols.  I noticed this a while back when I tried using bash syntax like ${pkgver##*_} and ${depends[@]/#/lib32-}.  It seemed to start after they fixed FS#13122, but I never (re)opened a ticket since these uses didn't seem too common.

As far as I can tell, Snowman is right.  When you uncomment the line, it thinks that the rest of the line is a comment (starting from the first pound sign), so it only sees this:

_realver=$(echo `/bin/grep '^

At that point, everything gets screwed up because the $( isn't closed properly.

Last edited by tdy (2009-10-20 05:51:36)

Offline

#4 2009-10-20 19:48:49

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Weird AUR error when uploading PKGBUILD for kde-qt-git

Is it possible if I add a slash  --> \, that it isn't parsed as comment ? (example \# , instead of # alone)

Last edited by flamelab (2009-10-20 19:49:07)

Offline

#5 2009-10-20 21:42:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Weird AUR error when uploading PKGBUILD for kde-qt-git

flamelab wrote:

Is it possible if I add a slash  --> \, that it isn't parsed as comment ? (example \# , instead of # alone)

You could try but I don't think it'll work.  It intreprets everything after _realver= as a fixed string, i.e no backslash-escaping. So it will probably set:
_realver=$(echo `/bin/grep '^\
then assume the rest of the line as a comment.

Offline

Board footer

Powered by FluxBB