Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13842 - Building packages of already installed programs
Summary: Building packages of already installed programs
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-13 08:26 UTC by Andrew Johnson
Modified: 2011-10-30 22:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Johnson 2003-01-13 08:26:14 UTC
It might be nice to have a feature that would allow for the building of a
portage-style tbz2 package based on what's already installed on the filesystem
Something like this, for example:
awk '/^obj / { print $2}' /var/db/pkg/net-www/lynx-2.8.4.1c/CONTENTS | xargs tar
cvjf /usr/src/lynx-2.8.4.1c.tar.bz2

Should make a tarball of the files that make up the currently installed lynx.
I'm sure, however, that the tbz2 packages that portage uses contain other
information (dependency information, etc). Indeed, I tried using the resulting
package and it didn't seem to work.

This would be quite useful. If you're wondering, here are my main reasons:
For safe and fast rollback in case of disaster, and for a very quick method of
building a bunch of packages from an already installed system. While it's smart
to use --buildpkg when emerging, I (and i'm sure others) don't always remember
to do it, or started using it only recently. So before emerging something like a
new version of glibc, it would be useful to be able to take a snapshot of the
currently installed glibc and pack it up into a portage-style tbz2. If the
system was unbootable after installing the new glibc, it seems to me that it
would be as simple as booting to the LiveCD, merging in the tbz2 that was just
made, and cleaning out the faulty version of glibc with emerge -C.

(Note I do NOT mean compile the currently installed version from source and
package it into a tbz2 file, which can be done by re-emerging a program with the
--usepkg flag or by using 'ebuild <ebuildfile> package'. I mean take a snapshot
of the program from the already compiled files as they exist on the filesystem.
I'm not aware of a straightforward way to do this, but if there is i'd be
interested in hearing about it. Otherwise it'd be a nice enhancement :-)
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2003-01-13 11:52:37 UTC
/usr/lib/portage/bin/quickpkg