You are not logged in.

#1 2006-03-22 18:39:00

wain
Member
From: France
Registered: 2005-05-01
Posts: 289
Website

package.install in PKGBUILD

hello !

I think it could be sometimes better to add post_install(), post_upgrade() etc.. functions directly in PKGBUILD. Essentialy for easiest sharing of PKGBUILD.

What do you thing about it ?

Offline

#2 2006-03-22 19:52:09

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: package.install in PKGBUILD

Easier for you, yes, but it would make makepkg more complicated.

makepkg is just a script, and neither the install file nor the PKGBUILD are parsed by makepkg. Both are parsed by bash, which makes it much easier for makepkg,

To add these functions in the PKGBUILD, it would be necessary for makepkg to parse the PKGBUILD and extract those functions manually to put it in the .INSTALL file in the package.

Offline

#3 2006-03-22 21:46:00

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: package.install in PKGBUILD

the problem is that when you go to install the pacakge, you need to have the info from the .install file ready and makepkg doesn't package the PKGBUILD with the package.pkg.tar.gz because its not needed. So, keeping it as a seperate file would make more sense unless makepkg parses the post_upgrade functions and transfers them to a .install which would be a little silly

Offline

#4 2006-03-22 22:42:46

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: package.install in PKGBUILD

brain0 wrote:

To add these functions in the PKGBUILD, it would be necessary for makepkg to parse the PKGBUILD and extract those functions manually to put it in the .INSTALL file in the package.

Indeed. But is that hard? I think not.

I can see the debate from both sides, but I've often thought that having the ability to have it all in one file and let makepkg take care of it to be beneficial for the packagers.

Offline

#5 2006-03-22 23:37:06

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: package.install in PKGBUILD

arooaroo wrote:
brain0 wrote:

To add these functions in the PKGBUILD, it would be necessary for makepkg to parse the PKGBUILD and extract those functions manually to put it in the .INSTALL file in the package.

Indeed. But is that hard? I think not.

In bash? Yes, imho that is hard. The point is that right now, makepkg doesn't even have/need a parser, that's why it is so small and simple (only 800lines of bash). Adding a parser would really blow it.

Offline

#6 2006-03-22 23:44:38

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: package.install in PKGBUILD

brain0 wrote:
arooaroo wrote:
brain0 wrote:

To add these functions in the PKGBUILD, it would be necessary for makepkg to parse the PKGBUILD and extract those functions manually to put it in the .INSTALL file in the package.

Indeed. But is that hard? I think not.

In bash? Yes, imho that is hard. The point is that right now, makepkg doesn't even have/need a parser, that's why it is so small and simple (only 800lines of bash). Adding a parser would really blow it.

Yes, it would only be simplistic if bash had some sort of functionality like "echo $functionName" that would output the body of the function... but it doesn't.  It would be trivial to write a parser to do it, but I don't think anyone agrees there is a need for it.

Offline

#7 2006-03-23 04:02:29

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: package.install in PKGBUILD

makepkg -- makes packages.

PKGBUILD -- build instructions.

package.install -- install specific instructions, depmod etc.

...

I like it how it is.

Offline

#8 2006-03-23 08:57:41

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: package.install in PKGBUILD

I like it how it is now too.
Remember that in many cases there are not only PKGBUILD and package.install, but also package.conf, somestuff.patch, rc.d scripts etc.
So it does not help much to share PKGBUILDs.
But if there will be decision to merge package.install into PKGBUILD - I don't see big problem to implement this.


to live is to die

Offline

#9 2006-03-24 04:41:19

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

Re: package.install in PKGBUILD

Romashka wrote:

I like it how it is now too.
Remember that in many cases there are not only PKGBUILD and package.install, but also package.conf, somestuff.patch, rc.d scripts etc.
So it does not help much to share PKGBUILDs.
But if there will be decision to merge package.install into PKGBUILD - I don't see big problem to implement this.

Agree. And having these function in a seperate file reduce the clutter in the PKGBUILD, making them easier to read, IMHO.

Offline

#10 2006-03-24 06:18:33

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: package.install in PKGBUILD

Snowman wrote:
Romashka wrote:

I like it how it is now too.
Remember that in many cases there are not only PKGBUILD and package.install, but also package.conf, somestuff.patch, rc.d scripts etc.
So it does not help much to share PKGBUILDs.
But if there will be decision to merge package.install into PKGBUILD - I don't see big problem to implement this.

Agree. And having these function in a seperate file reduce the clutter in the PKGBUILD, making them easier to read, IMHO.

+1
The smaller is the PKGBUILD, the easier is to understand... Plus it really doesn't worth it write a complete pars_function to parse it, Less functions = Less bugs wink

Offline

#11 2006-03-24 07:16:00

wain
Member
From: France
Registered: 2005-05-01
Posts: 289
Website

Re: package.install in PKGBUILD

Ok thanks for your replies.
I realize that seperate .install file is annoying for me because makepkg doesn't download it automaticaly like sources files.   roll

Offline

#12 2006-03-24 08:21:24

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: package.install in PKGBUILD

Well, when compiling things from aur, you should just get the tarball, this should include the necessary files (that can't be downloaded during the package building process). Or you could use aurbuild wink


You like cheese? You like peas? You'll love cheezy peas!

Offline

Board footer

Powered by FluxBB