In an effort to reduce the amount of data downloaded when upgrading between versions of Flightgear, I've looked at debdelta, which makes a binary patch between two versions of a package which will hopefully be smaller than just downloading the original package. Assuming the user has a deb of the currently installed version of the package (which should be stored in /var/cache/apt/archives/), debdelta downloads the binary patch (which will be generated on my server) and patches it into the deb file to make a new deb file for the new version. However, the patching process will require more CPU time.
What this boils down to is that you're trading the need for a good network connection for more CPU time (and more disk space).
If you want to test this out, follow these steps:
- Install debdelta
- Code: Select all
sudo apt install debdelta
- Open up /etc/debdelta/sources.conf. The default file has two entries for Debian; you'll probably want to comment these out or remove them. Add in the following into the file, then save it and close it:
- Code: Select all
[main ubuntu archive]
Origin=LP-PPA-saiarcot895-flightgear-edge
Label=FlightGear Flight Simulator Daily
delta_uri=http://debdeltas.saiarcot895.cloudns.pro/flightgear-edge-deltas
- Run
- Code: Select all
sudo gpg --homedir /etc/debdelta/gnupg/ --keyserver keyserver.ubuntu.com --recv-keys 0x203B47C2C66B784B
- Run
- Code: Select all
sudo apt update
- Run
- Code: Select all
sudo debdelta-upgrade --deb-policy b,e
- Code: Select all
sudo debdelta-upgrade
- Run
- Code: Select all
sudo apt upgrade
As a quick example, I'm on the Flightgear Edge PPA, and it took me about 18 minutes to patch the data files from a 2017.1.0 version to a 2017.2.0 version. Your times will be dependent on what CPU you have (it'll likely be a bit higher).
For reference, here are the binary patch sizes for the data packages, going from 1:2017.1.0~7995+gitea76305+dfsg-0ubuntu1~ppa1 to 1:2017.2.0~8028+git14e41b5+dfsg-0ubuntu1~ppa1:
flightgear-data-ai: 2,259,582 bytes (original deb size of new version is 247,249,786 bytes)
flightgear-data-aircrafts: 5,396 bytes (original deb size of new version is 86,264 bytes)
flightgear-data-base: 3,063,692 bytes (original deb size of new version is 812,468,340 bytes)
flightgear-data-models: 62,536 bytes (original deb size of new version is 119,683,904 bytes)
For the data packages specifically, you would be downloading about 5-6 MB (instead of more than 1 GB) when upgrading between these two versions. The binary patch for the main flightgear package is around 3 MB (going from 2017.1.0 to 2017.2.0), whereas the original deb file is about 5.6 MB.
If all goes well, I'll have debdelta updates for the Stable PPA as well (it's actually already configured, but there are no delta files there because there haven't been any changes).