You are not logged in.

#1 2009-08-26 13:48:48

majiq
Member
Registered: 2009-03-06
Posts: 259

Metainfo in .pkg.tar.gz

I recently had cause to manually tweak a package after I had made it. I realized that I needed a script in /etc/profile.d/ that I didn't include. I didn't want to remake the whole thing because it's an svn install and I do try to keep the source clean by copying it into a new folder and building from there. So I referenced the wiki and the forums for how to manually edit a package and didn't find much (maybe I'm not looking hard enough/well enough).

Anyway, the building packages wiki says

Typically, the resulting package file is a file called foo.pkg.tar.gz.

In fact, it is no more than a gzipped tar archive or 'tarball' which contains:
    * The files to install
    * .PKGINFO: contains all the metadata needed by pacman to deal with packages, dependencies, etc.
    * .FILELIST: lists all the files of the archive. It's used in order to uninstall the software or to check for file conflicts.
    * .INSTALL: a file used to execute commands after the install/upgrade/remove stage. (This file is present only if specified in the PKGBUILD.)

However, I untarred the package and I only found .PKGINFO and the files. I understand not having a .INSTALL because I don't make use of pre_install() or post_install(), but there is no .FILELIST. Is that from an older version of the setup? Or was the file hidden away?


By the way, ought I make a wiki page for manually editing a made package? It's simple, if you know where to look, but if you're not comfortable with playing with things and reading bash it might be painful.

Offline

#2 2009-08-26 13:57:55

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

Re: Metainfo in .pkg.tar.gz

.FILELIST is obsolete - that was back in pacman 2.x days.

I can understand you not wanting to rebuild just to add a file, but editing packages after building is generally not recommended. makepkg's -R/--repackage flag would be a better option here.

Offline

#3 2009-08-26 14:26:10

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: Metainfo in .pkg.tar.gz

Well, the makepkg -R doesn't touch the build() function, though, and really what I would've needed to do was skip most of the build() function until the end. I think there are some cases that might merit it. I could think it handy to modify an internal configuration file here or there without having to build the beast (the one-and-a-half-hour-to-compile beast in my case).

Why is it not recommended? Is it because there's no solid record of what was done, then?

Offline

#4 2009-08-26 15:04:04

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

Re: Metainfo in .pkg.tar.gz

majiq wrote:

Well, the makepkg -R doesn't touch the build() function, though, and really what I would've needed to do was skip most of the build() function until the end. I think there are some cases that might merit it. I could think it handy to modify an internal configuration file here or there without having to build the beast (the one-and-a-half-hour-to-compile beast in my case).

Why is it not recommended? Is it because there's no solid record of what was done, then?

exactly.

afaik, if you use separated build() and package() function, you can simply edit the package() function and run makepkg -R


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

Offline

#5 2009-08-26 22:52:22

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Metainfo in .pkg.tar.gz

Yes, I discovered the -R flag to makepkg last night after recompiling 'amanda' 3 times over a slow network because I kept fscking up a 'cp' command in the package() function!

If you have separate build() and package() functions in the PKGBUILD, then you can run makepkg -R to just run the package() part without having to go through the svn co and compile etc smile

Last edited by fukawi2 (2009-08-26 22:52:44)

Offline

Board footer

Powered by FluxBB