[arch] makepkg -T (distilling packages from installed packages or making packages from already installed packages)

Essien Ita Essien arch@archlinux.org
Mon, 01 Nov 2004 17:32:17 +0100


Hi guys... now this is a very interesting one.

I have this patch to Makepkg, that allows you to create a package from
an already installed package. 

I also have attached a screenshot of makepkg -T in action. Note the
first makepkg command was the unpatched one in /usr/bin/makepkg, the
second one, is the patched one, in the current directory.

Huh?

Okay... One weekend, i was broke, and couldn't go to a cyber cafe to
browse and get packages. I had cleared my /var/cache/packman/pkg and i
needed mawk,  and some other package to work on creating an ALE target
for colinux (umm... ALE is not dead, just reallly dragging b/cos of
work :( )

I wanted to pull out my hair when i discovered that i knew almost all
Pacman did, and how it worked, and i had Mawk already installed on my
system. So theoritcally, i could create the mawk-X.Y-Z.pkg.tar.gz from
the current installation using a series of (suprise suprise!!) pacman
-Ql and pacman -Qi

So off i went and I got a nice package. My only problem is that some
information, is not ALWAYS included or available from pacman -Qi

Check the ISSUES attachment for some issues i have (ummm... Judd, could
you implement the second point? :) )

I've attached the patch. to test, you SHOULD copy 'makepkg' to another
folder, apply the patch and run './makepkg -T
package-name-to-be-distilled' that should create it, and leave it in the
pwd. you can compare the versions by installing that to an alternat
chrooted environment. or run pacman -Qi 'installed-package-name' and
pacman -Qip '/path/to/newly-distilled-packagename'

I have a png screenshot of a console with me testing the patch out at
http://datavibe.net/~essiene/screenshots/makepkg.png

Lemme know if this is usefull to anyother person. Now all i have to
figure out is how to bribe Judd that this is useful enuff :D (sshhhh!!!
this is not to get to his ears :P )

Cheers,

Essien
-- 
Essien Ita Essien <essiene@datavibe.net>