Friday, October 13, 2006

How to generate binary packages on the LiveCD

In the LiveCD environment, open a terminal, type:
$ equery files gentoolkit | grep qpkg

to find the correct qpkg command. Then type:
$ /usr/share/doc/gentoolkit-0.2.2/deprecated/qpkg/qpkg -I | less

Copy the output, one page at a time to a textfile, say pkgs.txt. After you finish, open this textfile with vim. Then copy the following string:
$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj

In the command mode, press Shift-Insert repeatedly until all the * at the end of each line disappear. Notice what the last line looks like. For 2006.1 LiveCD, it should be "x11-wm/twm". If somehow it got truncated, press u to get it back. Save the file and exit.
Then mount the relevant directory on the hardisk partition where you're going to install Gentoo, assuming you have already unpacked the snapshot on the LiveCD:
# mount -o bind /mnt/gentoo/usr/portage /usr/portage

Then execute the following command:
# for all x in `cat /path/to/pkgs.txt`; do quickpkg $x; done

Then you should be able to install these binary packages in the chroot environment by issuing commands like "emerge -K packagename".

0 Comments:

Post a Comment

<< Home