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

Re: Manipulating .debs

On Sat, Dec 07, 2002 at 11:56:54AM -0700, Bob Proulx wrote:
> Stig Are M. Botterli <samb@mo.himolde.no> [2002-12-07 17:37:33 +0000]:
> > I wanted to remove a dependency from a debian package. I took it apart and
> > edited the control-file, and put it back together. However, dpkg wouldn't
> > recognize it as a debian package. 'file' reports it as a "current ar
> > archive", while it reports the original .deb as a Debian binary package. So
> > the question is, how do I 'brand' (ie give it the correct magic number) my
> > manipulated .deb-file as a debian package?
> Debian uses the oldest ar format so that it is compatible with newer
> ar programs which read both the old format and the new format.
> Therefore you would need to use the old ar program to repack the .deb.
> Unfortunately off of the top of my head I don't know where that old
> format program is that debian uses for that purpose.  This is
> documented somewhere in the debian packaging manual.

ar works. It's all in the order of the files. To make a working .deb
"ar r foo.deb debian-binary control.tar.gz data.tar.gz". There is no
special option for new/old format to worry about. If the order of the
files in the archive is wrong, you get a "current ar archive". If the
order is correct, you get "Debian binary package (format 2.0), uses gzip


Reply to: