[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-repack question



Hugo Vanwoerkom wrote:
> Hi,
> 
> Dpkg-repack creates a .deb out of an already installed package.
> 
> So I wrote a program to do a dpkg -l &>file and with file as input call
> dpkg-repack for each package in file.
> 
> The result is a file with all the installed packages as .debs.
> 
> So you would think that if you reinstalled the whole system with that
> file as /var/cache/apt/archives that he would never need another source
> for a package.
> 
> Wrong! Apt-get starts merrily downloading and ignores the contents of
> /var/cache/apt/archives.
> 
> What's wrong with the .deb that dpkg-repack creates?
> 

The md5sum of your recreated package does not match the md5sum of the
package in the archive (according to the package listing downloaded from
the archive).  Since they both have identical version numbers, apt is
(rightly) convinced that your local versions have been corrupted through
some mechanism and that it must do a fresh download.  An alternative
would be to create local repository [0] from your rebuilt packages and
pin it to higher priority than everything else.

> Potentially this is great because now I have to carry
> /var/cache/apt/archives around all the time when I reinstall new systems
> and if dpkg-repack would work as advertised (I think ;-) ) then I would
> not have to!

-Roberto

[0] http://familiasanchez.net/~roberto/howtos/debrepository

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: