Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
making tbzs from hd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Kenta
n00b
n00b


Joined: 02 Oct 2002
Posts: 51
Location: Buenos Aires, Argentina

PostPosted: Thu Oct 10, 2002 3:50 am    Post subject: making tbzs from hd Reply with quote

I`ve emerged openoffice 1.01 ( took like 12 hours!!! ), mozilla, java 1.4.0 with gcc 3.2, and guess what, i dont want to emerge them again in case something really bad happens (a.k.a hd crash/burnt, etc...) so, I know there is an option in emerge to make tbz packages ( thats -b ), but I wondering if there is some kind of trick/tool that, from the installed files in my hd, tbz`s packages can be built. ( i was playing with qpkg but....so far...nothing..)
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Oct 10, 2002 3:57 am    Post subject: Reply with quote

Look for the openoffice directory under /var/db/pkg. In it should be a CONTENTS file. cat CONTENTS | awk '{print $2}' and save the result somewhere (it will be a clean list of filenames). Then use tar's -T option to build a tarball containing only those files.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
dreamer3
Guru
Guru


Joined: 24 Sep 2002
Posts: 553

PostPosted: Tue Nov 19, 2002 1:33 pm    Post subject: Reply with quote

Or try quickpkg... you can find it in /usr/lib/portage/bin... It will do EXACTLY what you want to do automatically.

Example:
Code:
quickpkg /var/db/pkg/net-www/mozilla-1.0.1

will create a .tbz of mozilla and place it in /usr/portage/packages.
Back to top
View user's profile Send private message
corporate_gadfly
n00b
n00b


Joined: 21 Sep 2002
Posts: 29

PostPosted: Tue Nov 19, 2002 2:55 pm    Post subject: Reply with quote

dreamer3 wrote:

Example:
Code:
quickpkg /var/db/pkg/net-www/mozilla-1.0.1

will create a .tbz of mozilla and place it in /usr/portage/packages.


Slight correction. Make that /usr/portage/packages/All. Just to be on the safe side, I also use this script to make .tbzs out of "important" packages (gcc|glibc|binutils|ncurses|gettext|texinfo). (it is a blatant rip off of the update-step1.sh script from the Gentoo 1.2 to 1.4rc1 update guide).

Code:
#!/bin/bash

PKGDIR=/usr/portage/packages/All
LOG=/tmp/system-backup-`date +%Y%m%d%H%M`.log

echo "==============================================================" >> $LOG
date >> $LOG
echo "==============================================================" >> $LOG

echo "Backing up packages." >> $LOG
for PACKAGE in `qpkg -I -v -nc | egrep "gcc|glibc|binutils|ncurses|gettext|texinfo" | sed 's:\(.*\):/var/db/pkg/\1:'`
do
        echo "Backing up: $PACKAGE"
        echo "Backing up: $PACKAGE" >> $LOG
        if ! /usr/lib/portage/bin/quickpkg $PACKAGE; then
                echo "Backup of $PACKAGE failed! Exiting."
                echo "Backup of $PACKAGE failed! Exiting." >> $LOG
                exit 1
        fi
done

This way I am assured that I have some semblence of a backup whenever I'm about to emerge -up world and one of these packages pops up in the list.undefined
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum