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

Re: patch or "sparse package" support under dpkg



On Wed, May 22, 2002 at 12:44:39PM -0700, Aleksey Tsalolikhin wrote:
> On Tue, May 21, 2002 at 10:03:40AM +0100, Colin Watson wrote:
> > Well, to some extent. But there's no reason you can't install another
> > file in its place once it's diverted.
> 
> Manually, right?  But I want to do it with dpkg. :)  
> 
> I want to be able to install letters-1.0p1.deb (to change just one file)
> and then later letters-2.0.deb (replace all the files).

In that case I misunderstood your original spec. Ignore what I said
about dpkg-divert.

> > In that case, you could always just rebuild the letters package from
> > source with the changes ...
> 
> *nod*  What my example omits is the deb actually contains thousands of
> files.  Rebuilding it and installing it just to change tens of files
> is inconvenient, which is why I'm looking into patch packages.
> 
> I am trying to find out if it's possible to build a patch dpkg to do
> incremental upgrade.  (ie to upgrade just one or two files, not all files).

You can unpack the .deb manually and alter files in the tarball. With
the new files in the current directory arranged the way they would be in
the filesystem, do something like this (untested):

  ar x foo.deb data.tar.gz
  gunzip data.tar.gz
  tar -rf data.tar ./my/new/file ./my/other/new/file
  gzip data.tar
  ar r foo.deb data.tar.gz
  sudo dpkg -i foo.deb

Somewhere in there you'll probably also want to unpack control.tar.gz
and fiddle with the control file to change the version number.

The alternative, if you don't want to reinstall the package, is to edit
the files in-place and also (carefully!) edit /var/lib/dpkg/status to
keep track of this (plus /var/lib/dpkg/info/*.list if you're changing
the files owned by each package). You could probably build a tool to do
this automatically and call it a "patch dpkg" if you want, but I don't
believe it currently exists.

You might also want to look at dpkg-repack, which could possibly be
modified to change the version number for you.

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


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: