I've heard that customizepkg+yaourt can sort of act like portage?, with customized options and all. Can someone please explain the entire process. Also will the dependecies of a package which I'm building be also built or will they be downloaded as packages( which I dont want). I want all the dependencies also to be built from source from the ABS/AUR tree and I dont want pacman to touch the package which I built or it's dependencies when I upgrade the system?..Is all this possible?..If so please do explain the entire process and the procedure to set custom options.
Last edited by mc (2008-08-12 07:45:17)
Hi, you can do much of what you're asking about, but it may not be as automatic as you'd like.
Yaourt is a (command-line) frontend to pacman. It's capable of searching AUR for packages as well as the repos you've specified in /etc/pacman.conf. When you try to install a package from AUR, it will automatically download the PKGBUILD to a temp directory, and run makepkg on it. You can also with a command line switch specify that you want to rebuild a package from the repos from source, and install that.
If you have customizepkg installed, and there's a file named "foo" in your /etc/customizepkg.d/ directory, then whenever you use yaourt to install package foo (whether from the repos or from AUR, whether you specified to build from source or not), yaourt will treat that install request as a "build-from-source" request. Before it runs makepkg, it will apply the changes described in the file /etc/customizepkg.d/foo against foo's PKGBUILD. It will give you the opportunity to inspect/edit the PKGBUILD before running makepkg. (It does this whenever it builds from source, customizepkg need not be present.) Then if you don't abort, it will run makepkg and install the package it built.
Can you tell pacman never to touch that package when you're doing updates? Yes, by putting foo in the IgnorePkg line in /etc/pacman.conf. Nothing does that for you automatically. If you don't do that, and you do "pacman -Syu", and a newer version of foo is available, then pacman will want to overwrite your custom package with the newer version.
However, the beauty of customizepkg is that, if INSTEAD of "pacman -Syu" you do "yaourt -Syu", then when yaourt sees a newer version of foo, if you approve installing it, it will once again download the PKGBUILD, apply the changes you've specified in /etc/customizepkg.d/foo, and so on. So your customized changes persist PLUS you get the newer version. You just need to use yaourt for your regular package management instead of pacman. (Yaourt calls pacman and the pacman libraries behind the scenes.)
The syntax of the /etc/customizepkg.d/* files can be a bit tricky, because you need to be careful with escapes. There's one grep or sed process parsing the file, and the commands its extracting are then passed to a second grep or sed process that operates on the PKGBUILD file. There's almost no documentation. I recommend studying the example files in /etc/customizepkg.d/* closely, read the customizepkg source (it's a script,if I recall rightly), and search/post on the forums for help if you can't wrestle customizepkg into doing what you want.
Profjim, thank you for you're explanation, it helped me to understand how customizepkg works.
NoFromBrooklyn, Please do not keep necrobumping old threads..
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !