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

Re: Don't replace manpages_1.46-1_all.deb (for SPARC)



On Wed, Dec 26, 2001 at 11:04:50AM -0800, Karsten M. Self wrote:
> on Wed, Dec 26, 2001 at 11:23:43AM -0600, Colin Watson
> (cjwatson@debian.org) wrote:
> > As Karsten said, it's been reported a few times. I believe 'dpkg -i
> > --force-overwrite /var/cache/apt/archives/manpages_1.46-1_all.deb' is
> > safe.
> 
> Or the following steps, which will remove the offending manpage, back up
> the current copy of the package, and install a modified one.
> 
> I'm still newish at modifying packages, if anyone sees something wrong
> here, speak up.
> 
>     $ cd /tmp
>     $ cp /var/cache/apt/archives/manpages_1.46-1_all.deb .
>     $ mv manpages_1.46-1_all.deb manpages_1.46-1_all.deb-bak
>     $ mkdir manpages; cd manpages
>     $ ar -x /var/cache/apt/archives/manpages_1.46-1_all.deb
>     $ rm ./usr/share/man/man8/ld.so.8.gz
>     $ cd /tmp
>     $ dpkg-deb --build manpages_1.46-1 manpages
>     $ dpkg -i manpages_1.46-1 manpages_1.46-1.deb

'ar -x foo.deb' gives you debian-binary, control.tar.gz, and data.tar.gz
in the current directory. Also, if you're going to use 'dpkg-deb
--build', you need control.tar.gz unpacked in a directory called DEBIAN.

Better would be something like this:

  [in some temporary directory]
  $ ar x manpages_1.46-1_all.deb
  $ gunzip data.tar.gz
  $ tar -f data.tar --delete ./usr/share/man/man8/ld.so.8.gz
  $ gzip data.tar
  $ ar r manpages_1.46-1_all.deb data.tar.gz
  [etc.]

Of course, you'll have to put manpages on hold after this or the
packaging system will probably try to replace it with the version in the
Debian archive. Alternatively, you could download the source, remove
that file, add an entry to the top of debian/changelog with the version
number increased by 0.0.1, and rebuild.

I've certainly been known to use a method much like yours for a quick
hack when I think rebuilding from source will be time-consuming. It's
particularly useful for fixing the sort of broken preinst script that
occurred in libdb2-util recently.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: