You are not logged in.

#1 2006-06-20 15:41:21

Largon
Member
From: Czech Republic
Registered: 2004-11-03
Posts: 18
Website

problem with pkgver

Hi, I have an archive stardict-english-czech-latest.tar.bz2. After unpacking there is a directory stardict-english-czech-20060620/. I don't know how to set pkgver. I tried "pkgver=`date +%Y%m%d`" (this archive is updated every day), but then there is a problem with AUR. Any idea?

Offline

#2 2006-06-20 15:47:19

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

Re: problem with pkgver

Don't use the backticks. Use 'pkgver=20060620'
You might want to read  the guidelines:
http://wiki.archlinux.org/index.php/Arc … guidelines

Offline

#3 2006-06-20 16:31:11

Largon
Member
From: Czech Republic
Registered: 2004-11-03
Posts: 18
Website

Re: problem with pkgver

I can't use fixed date, because stardict-english-czech-latest.tar.bz2 refers always to up-to-date files. And there is always only latest archive on the server.

Offline

#4 2006-06-21 10:20:24

Largon
Member
From: Czech Republic
Registered: 2004-11-03
Posts: 18
Website

Re: problem with pkgver

OK, I'll upload it to my server and make fixed date. But it's a stupid solution.

Offline

#5 2006-06-21 10:53:08

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: problem with pkgver

IMO, if there is any stupidity here, it can be attributed to whoever is producing this tarball. If there really are enough changes being made to justify a daily snapshot, they should provide CVS/SVN access, or at least provide access to, say, the last week or two of snapshots.

I reckon your best workaround is to update your PKGBUILD once a week i.e.

pkgver=20060621
pkgver=20060628
pkgver=20060705
etc.

Offline

#6 2006-06-21 13:33:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: problem with pkgver

OK - that last post of mine is rubbish. Sorry about that. :oops:

Here's what you do. Use

pkgname=stardict-english-czech
pkgver=latest

and in the build(), use

cd $startdir/src/$pkgname-`date +%Y%m%d`

It's still not perfect - it will fail if the package is not built on the same day as the tarball is downloaded, or if it's built before 03:48 in the morning (and then there's timezones as well roll ) - but it should work for most users most of the time. If you're putting it in the AUR, include a short explanation in your comments.

The formats above are permitted - backticks cannot be used to set PKGBUILD variables like pkgver etc, but they can be used within the build() function.

Offline

#7 2006-06-21 14:14:36

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: problem with pkgver

tomk wrote:

in the build(), use

cd $startdir/src/$pkgname-`date +%Y%m%d`

How about

cd $startdir/src/$pkgname-[0-9]*

There is probably only one directory with that name in $startdir/src, so you could even drop the [0-9].

Offline

#8 2006-06-21 16:36:33

barebones
Member
Registered: 2006-04-30
Posts: 235

Re: problem with pkgver

How are md5 sums going to work with something like this? Will the user have to update them?

Offline

#9 2006-06-21 17:38:11

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: problem with pkgver

The AUR requires the md5sum field, but in cases like this, it should be left blank - another less-than-perfect solution, but it's unavoidable. There isn't really any point in the user generating them - just leave it blank, makepkg will complain, but it will still build it.

Offline

#10 2006-06-22 13:50:19

Largon
Member
From: Czech Republic
Registered: 2004-11-03
Posts: 18
Website

Re: problem with pkgver

Yesterday I spoke with author and he decided to make stable directory on his server. So it will be sufficient, when I sometimes update PKGBUILD in AUR.

Offline

Board footer

Powered by FluxBB