AUR web interface

Tasklist

FS#13189 - Can't update PKGBUILDs

Attached to Project: AUR web interface
Opened by Gereon Schomber (IncredibleLaser) - Tuesday, 10 February 2009, 18:05 GMT
Last edited by Loui Chang (louipc) - Monday, 16 February 2009, 17:27 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version 1.5.6
Due in Version 1.6.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I can't upload PKGBUILDs or *src.tar.gzs. Whenever I try, I get an internal server error, but I see that AUR works for anyone else. My username is IncredibleLaser at the AUR. Uploading new packages was not tried out. Doesn't work with neither Firefox nor Konqueror.
This task depends upon

Closed by  Loui Chang (louipc)
Monday, 16 February 2009, 17:27 GMT
Reason for closing:  Fixed
Comment by Gereon Schomber (IncredibleLaser) - Wednesday, 11 February 2009, 17:03 GMT
What? That does nothing more than makepkg --source, but it includes useless stuff, like the downloaded sources.. Uploading PKGBUILDs directly worked before. Besides, I've been using the AUR since half a year and it always worked.
Comment by Nicolas Bigaouette (big_gie) - Wednesday, 11 February 2009, 17:07 GMT
Sorry my mistake :)
Wow I never knew about --source. Even though I've been uploading since years too ;)

Maybe it is something in the title on the pkgbuild? From another report, a comment in the name like this:
pkgname=... # this is the name
prevented from uploading to AUR...
Comment by Gereon Schomber (IncredibleLaser) - Wednesday, 11 February 2009, 23:19 GMT
Hmm. It seems to only be this particular package, however, no matter what I do, I can't update it anymore. The package in question is my koffice2.

# Contributor: Gereon Schomber

pkgname=koffice2
pkgver=1.9.98.6
pkgrel=1
pkgdesc="An integrated office Suite"
arch=('i686' 'x86_64')
url="http://www.koffice.org/"
license=('GPL')
depends=('kdelibs>=4.2' 'kdebase>=4.2' \
'kdebase-runtime>=4.2' 'kdepimlibs>=4.2' \
'libwpd' 'lcms')
makedepends=('cmake' 'eigen' 'automoc4')
optdepends=('libpqxx: Postgresql support for Kexi'
'freetds: MS SQL support for Kexi'
'graphicsmagick=1.1: various Krita filters'
'gmm++: various Krita filters')
source=('http://download.kde.org/unstable/koffice-$pkgver/src/koffice-$pkgver.tar.bz2')
conflicts=('koffice2-alpha')
replaces=('koffice2-alpha')

build() {
cd "$srcdir/koffice-$pkgver"
[ -d 'build'] && rm -rf build
mkdir build
cd build
if [ "${CARCH}" = "x86_64" ]; then
if [ "${CXXFLAGS}" != *"-fpic"* ]; then
CXXFLAGS=$CXXFLAGS' -fpic'
fi
fi
cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
make || return 1
make DESTDIR="$pkgdir/" install
}
md5sums=('00a4a0e9e0cfa60bf02a917e2267948c')

It always worked before. Strange thing is, I can't even just upload the version from AUR without modifications. It just doesn't work.
Comment by Gergely (imrehg) - Thursday, 12 February 2009, 11:14 GMT

Yeah, your package does not upload, running a few tests, I think it chokes on the line
CXXFLAGS=$CXXFLAGS' -fpic'
because aur tries to replace $CXXFLAGS with a known variable - and there's none....
Will double-check whether this is indeed the case, and the variable replacement needs to be disable within the build(), or should ignore the parts it cannot do anything about...
I did the last revision of the variable replacement, so better go and check it again...


On the side, some comments about your PKGBUILD:

First, your package wouldn't work at all with makepkg because of this line:
source=('http://download.kde.org/unstable/koffice-$pkgver/src/koffice-$pkgver.tar.bz2')
since the $pkgver variable is not replaced by bash when you are using ' instead of " quotation marks.

Second:
[ -d 'build'] should have a space before the ], since this way it won't work in bash.
Correctly: [ -d 'build' ]
Comment by Gereon Schomber (IncredibleLaser) - Thursday, 12 February 2009, 11:33 GMT
Yeah, I made these changes to check if the file would upload if I changed it. Stupid errors, though (they're not included in the original PKGBUILD). Also, I can confirm it was an issue with this particular line you suggested. Replacing the if-construct with a much more simple [ "${CARCH}" = "x86_64" ] && [ "${CXXFLAGS}" != *"-fpic"* ] && CXXFLAGS="${CXXFLAGS} -fpic" solved it. Is this a bug in the AUR software or a fault on my side?
Comment by Gergely (imrehg) - Thursday, 12 February 2009, 13:46 GMT
Yeah, it is indeed a bug. Not something that would show up very often, but it's there.
The problem was actually an infinite substitution cycle, that I have an idea to eliminate. But putting everything in one line certainly solves it. Glad it worksat the moment, patch will be also prepared soon.
Comment by Nicolas Bigaouette (big_gie) - Thursday, 12 February 2009, 14:40 GMT
Will this work: [ "${CXXFLAGS}" != *"-fpic"* ] ?
I don't know about the * before and after the quotes. Just make sure it does :)
Comment by Gergely (imrehg) - Thursday, 12 February 2009, 15:14 GMT
The problem was the line:
CXXFLAGS=$CXXFLAGS' -fpic'
where AUR interprets it as a parameter substitution into itself - thus infinite substitution cycle. I know how to fix it, just have to get some time tomorrow morning.

[ "${CXXFLAGS}" != *"-fpic"* ] would certainly work for uploading, and since it is inside the build(), AUR doesn't care about it afterwards. Would be useful to discard the whole build() in the beginning, but I couldn't so far come up with a reliable test to find where it ends. Counting the curly brackets doesn't work, because they can be inside commands, and then their number won't necessarily match. Maybe in the end I'll have to look up the bash source to see how on earth they do that... Or ask someone to explain it to me. :)

But coming back to the original problem, the infinite cycle should be eliminated anyway, regardless of the build() issues.
Comment by Gergely (imrehg) - Friday, 13 February 2009, 16:45 GMT
Patch sent to AUR development list.

Loading...