#1054665 debdelta: Avoid generating the actual `.deb`

Package:
debdelta
Source:
debdelta
Description:
diff and patch utilities which work with Debian packages
Submitter:
Stefan Monnier
Date:
2023-11-01 14:57:02 UTC
Severity:
normal
#1054665#5
Date:
2023-10-27 16:09:02 UTC
From:
To:
Dear Maintainer,

`debdelta-upgrade` is great at reducing the amount of data downloaded,
but on some of my (weaker) machines, generating the `.deb` files takes
a lot of time, and for no good reason: 99% of the time is spent not
applying the xdelta but (re)compressing the result with `xz`.

So, this wishlist item is to change APT such that we can skip the
generation of the `.deb` file and instead keep the old `.deb` together
with the patch(es) in `/var/cache/apt/archives`.
When APT needs to install the (not created) `.deb`, instead of
unpacking+uncompressing the (not created) `.deb`, it would
unpack+uncompress the old `.deb`, and apply the (set of) patch(es).

Since the old `.deb` + patch(es) is usually larger than
a patched+recompressed `.deb`, we could occasionally "repack" the files
in `/var/cache/apt/archives`, but that would be optional and could be
performed opportunistically in the background, a bit like Git's GC.


        Stefan

#1054665#10
Date:
2023-10-30 07:40:46 UTC
From:
To:
Dear Stefan,

some years ago I did some work in this respect.

debpatch and debdelta-upgrade have an option
  --format unzipped
that will recreate the deb w/o compressing the data part: this is much
faster.

The point is, I do not know if apt will accept those .debs . Maybe apt
may have an option to accept debs even when the size is not what is
expected.

I also experimented with other --format options. One option would write
all new files in the filesystem, the way that
dpkg --unpack
does, so after that, only configuration would be needed; this work is
there but uncomplete.

a.

Il 27/10/23 18:09, Stefan Monnier ha scritto:

#1054665#15
Date:
2023-10-30 07:40:46 UTC
From:
To:
Dear Stefan,

some years ago I did some work in this respect.

debpatch and debdelta-upgrade have an option
  --format unzipped
that will recreate the deb w/o compressing the data part: this is much
faster.

The point is, I do not know if apt will accept those .debs . Maybe apt
may have an option to accept debs even when the size is not what is
expected.

I also experimented with other --format options. One option would write
all new files in the filesystem, the way that
dpkg --unpack
does, so after that, only configuration would be needed; this work is
there but uncomplete.

a.

Il 27/10/23 18:09, Stefan Monnier ha scritto:

#1054665#20
Date:
2023-11-01 14:42:27 UTC
From:
To:
But it would often use a lot more disk space :-(
If we were instead to just keep the original `.deb` together with the
xdelta, it would be in most cases smaller.

I strongly suspect that it would require changes in APT, indeed.


        Stefan

#1054665#25
Date:
2023-11-01 14:42:27 UTC
From:
To:
But it would often use a lot more disk space :-(
If we were instead to just keep the original `.deb` together with the
xdelta, it would be in most cases smaller.

I strongly suspect that it would require changes in APT, indeed.


        Stefan