You are not logged in.

#1 2008-02-06 16:36:49

dufresnep
Member
Registered: 2008-02-03
Posts: 14

makepkg would be better if ...

Well, I may be puting my foot in my mouth as I am far from being an expert at packaging.

makepkg would be better if rather than directly call build() to compile and package, the process would be separated in
2 distincts functions: compile() and package(). compile() would be called as the normal user, and package() would be called in fakeroot environment.

An other possible change (which I am more hesitant) would be to automatically call CVS and or SVN (etc.) to get source code BEFORE unpacking the archives.

-Why have compile() and package() as distinct function?
-Because some programs need to combine different archives (libraries), and require to copy files around (.h and .a or .so files) in the src directory before compiling. Now, this make the copied files be own by root because of fakeroot. When you rebuild, you get errors because you have not the right to overwrite the copied files, moreover, to erase src, you have to become root. Running compile() as normal user, and package() in fakeroot environment more closely follows what a packager would do without makepkg.

-Ok, why do you want to have makepkg get source code by revision-control software by itself rather than write it yourself?
-Well, my problem is linked to the previous. You cannot svn checkout over a directory that contains the libraries, but you can svn checkout, then decompress libraries over in the same directory. Now, source files (in which I have tar libraries) are decompress before SVN checkout, which make it impossible to have libraries decompress over SVN checkout. But if makepkg was to get source itself, it could get source, and THEN, decompress sources (libraries) that would sit nicely in the source directories, making it less necessary to copy files around
-If we use compile() and package(), then you could simply copy the libraries manually in compile without problems, no?
-indeed, not ideal, but yes it should work fine.

Offline

#2 2008-02-06 18:30:30

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

Re: makepkg would be better if ...

The first point is indeed more interesting, and besides there is already a patch for it:
http://git.neptune-one.net/pacman?a=com … 3c6960269c

It didn't get much interest when it was first submitted, but it will be looked at again.

The second one looks less interesting and with a more limited usage.
But if you care, you should put it as a feature request on bugs.archlinux.org rather (pacman section).
It's of course even better if there is a patch included also smile


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

Offline

Board footer

Powered by FluxBB