With plain Debian debdelta-upgrade works correctly: it gets a list of upgradeable files, downloads all available deltas, and creates the desired .deb upgrade files. So if packages foo, bar, and baz have available deltas, then debdelta-upgrade will fetch foo, bar, and baz, then quit.

But under Ubuntu distros, (tested with Mint and Lubuntu), when there are several packages with available deltas, debdelta-upgrade fetches only one delta at a time. If run once it fetches foo, then quits; if run again it fetches bar; if run again, it fetches baz.

Under Ubuntu, this kludge works; it fetches all available deltas, by running debdelta-upgrade once for each upgradable package:

apt list --upgradable 2> /dev/null | sed -n '1!s#/.*##p' | \
    xargs -n 1 debdelta-upgrade

But it's much slower than Debian, since each time debdelta-upgrade runs it needs 5 seconds or so to initialize ("updating apt cache") -- if 10 packages need upgrading, that's an added 50 second delay (5 seconds x 10 packages) under Ubuntu variants.

Is there a fix?


This is a problem that keeps bugging me, and this is the only post I can find on the interwebs that queries this issue.

I'm not sure it's working at all. Debdelta is checking which section it's in (main, backports or stable-security), and using a separate debdeltas.debian.net URI for each section.

The script is failing at the line:


...this is because delta_uri_base returns none in Ubuntu.

delta_uri_from_config appears to be parsing /etc/debdelta/sources.conf which contains lots of Debian specific entries for the Debian archives - and no relevant sections for Ubuntu.

So, for example we find that the origin it is looking for is:

    origin.origin : 
    origin.label :Ubuntu
    origin.archive: bionic-updates

Looking at the /etc/debdelta/sources.conf:

   [main debian archive]

   [backports debian archive]
   Origin=Debian Backports
   Label=Debian Backports

   [stable security debian archive]

There are no sections that match. With no corresponding entry, there is no URI to get the delta from. This means that the delta-queue for upgrades does not get filled, and so it won't loop through to generate deltas for each one.

What's not clear to me at the moment, is why it generates a single .deb in /var/cache/apt/archives/ at all.

As far as I can see, to fix it, someone needs to host an Ubuntu specific debdelta instance, and correct the sources file. It looks like long ago, someone tried this, but I've not heard of anyone doing this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.