You are not logged in.

#1 2008-08-17 08:50:53

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Several question about SVN PKGBUILDs

I'd like to make a PKGBUILD for an SVN version of a program. I have just looked at existing PKGBUILDs and now there are  several questions:

* Why are PKGBUILDs made for particular revision? PKGBUILDs for the latest revision would not require maintainance and would be more useful for users... (IMHO)

* Why does everyone make 'svn co' in their PKGBUILDs and not 'svn export'? I don't think that users will commit their changes under anonymous account anyway... (that will be 98% impossible)

Offline

#2 2008-08-17 09:06:37

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Several question about SVN PKGBUILDs

Lazer wrote:

* Why are PKGBUILDs made for particular revision? PKGBUILDs for the latest revision would not require maintainance and would be more useful for users... (IMHO)

Because you have to put one version when you write the PKGBUILD.
Besides, it indicates that the maintainer of the PKGBUILD tested this particular revision.
It is impossible to know if the PKGBUILD or the package will still work correctly at a future revision (there could be changes in the build system, other compilation problems, new bugs in the software, etc...)

That said, makepkg by default will update the revision automatically when you run it. But this can be prevented with --holdver :
      --holdver    Prevent automatic version bumping for development PKGBUILDs

* Why does everyone make 'svn co' in their PKGBUILDs and not 'svn export'? I don't think that users will commit their changes under anonymous account anyway... (that will be 98% impossible)

Uh?
$ svn -h co
checkout (co): Check out a working copy from a repository.

PS : have a look at /usr/share/pacman/PKGBUILD-svn.proto from abs package for a prototype of a svn pkgbuild.

Last edited by shining (2008-08-17 09:08:05)


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2008-08-17 10:59:09

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: Several question about SVN PKGBUILDs

I always manually fetch a specific revision for my SVN PKGBUILDs, because that way I know they work. If a user wants a newer revision he can bump the version number and flag the package out of date.

Offline

#4 2008-08-17 11:06:39

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Several question about SVN PKGBUILDs

catwell wrote:

I always manually fetch a specific revision for my SVN PKGBUILDs, because that way I know they work. If a user wants a newer revision he can bump the version number and flag the package out of date.

Not sure what you mean by manually fetch.
As I said above, just use makepkg --holdver


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2008-08-17 11:13:56

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Re: Several question about SVN PKGBUILDs

shining wrote:

Uh?
$ svn -h co
checkout (co): Check out a working copy from a repository.

And what? I mean, when you do 'svn co' you get some SVN configuration information with the files. And that information is absolutely unnecessary. So why not do just 'svn export'?

shining wrote:

That said, makepkg by default will update the revision automatically when you run it

I did not know that. Thank you. I think, my first question is now solved.

Offline

#6 2008-08-17 11:17:30

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Several question about SVN PKGBUILDs

Lazer wrote:
shining wrote:

Uh?
$ svn -h co
checkout (co): Check out a working copy from a repository.

And what? I mean, when you do 'svn co' you get some SVN configuration information with the files. And that information is absolutely unnecessary. So why not do just 'svn export'?

What about updating? Did you look at the prototype?

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2008-08-17 11:20:39

Lazer
Banned
Registered: 2007-08-02
Posts: 111

Re: Several question about SVN PKGBUILDs

shining wrote:
Lazer wrote:
shining wrote:

Uh?
$ svn -h co
checkout (co): Check out a working copy from a repository.

And what? I mean, when you do 'svn co' you get some SVN configuration information with the files. And that information is absolutely unnecessary. So why not do just 'svn export'?

What about updating? Did you look at the prototype?

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

I was too lazy. Now I understand. Sorry and thanks.

Offline

#8 2008-08-18 13:42:28

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: Several question about SVN PKGBUILDs

shining wrote:

Not sure what you mean by manually fetch.

I just meant using svn -r $pkgver instead of just svn in the PKGBUILD. Yes, it's not anything "manual" in fact.

Offline

#9 2008-08-18 13:44:51

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Several question about SVN PKGBUILDs

catwell wrote:
shining wrote:

Not sure what you mean by manually fetch.

I just meant using svn -r $pkgver instead of just svn in the PKGBUILD. Yes, it's not anything "manual" in fact.

Oh of course. You should always follow the PKGBUILD-svn prototype smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB