PDA

View Full Version : dpkg-repack


bhobjj
03-05-2007, 03:11 PM
dpkg-repack can be used to recreate a debian package from an installed program:
http://www.debian-administration.org/articles/499



Here (http://zgp.org/pipermail/linux-elitists/2007-March/011847.html) is a fine hack to use dpkg-repack for undoing an upgrade.

Michael Dominok ml.linux-elitists at dominok.net
Thu Mar 1 17:31:24 UTC 2007

* Previous message: [linux-elitists] Show Us The Code
* Next message: [linux-elitists] Show Us The Code
* Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Am Donnerstag, den 01.03.2007, 01:54 -0500 schrieb Greg Folkert:
> Huh? I am sorry, Debian has this already.
>
> dpkg-repack is available.

A handy little tool. My usual upgrade-procedure is:

mkdir /root/lib/upgrades/`date +%Y-%m-%d` ; cd /root/lib/upgrades/`date
+%Y-%m-%d`

dpkg-repack `apt-get -s upgrade | grep "^Inst" | awk '{ print $2 }'`

or

dpkg-repack `apt-get -s dist-upgrade | grep "^Inst" | awk '{ print$2 }'`

respectively.

So if anything goes wrong i only have to

cd /root/lib/upgrades/`date +%Y-%m-%d`

and

dpkg -i *



Cheers

Michael

bluesdog
03-07-2007, 02:59 PM
At some time I must have installed dpkg-repack, but I don't recall when, or why.

Didn't know anything about it until your posting. Thanks!

jjmac
03-08-2007, 08:26 AM
Howdy,

dpkg-repack has been a gem on many an occasion.

Yes, it's a very usefull tool, and very light on install space. It basically just reverses out of the data-base --- i think it just uses the relevant files in /var/lib/dpkg/info for and recreates a deb package for the package name supplied as a cli option. Along with any modifications.

Excellant for transfering packages across discs.

The 'equiv' packahe is also worth looking at too if not already. Ch 4 (i think) of the Apt-HowTo covers it quite well.

There is quite a lot of good stuff salted away in the docs if a person should actually go looking and it also reflects the design principle of deb as being orientated towards customisation, as well as overall stability.

jm