Package: apt-offline
Version: 1.7.2

During the initial sync of the APT database in apt-offline (apt-offline install target/ --verbose), apt-offline kept failing with errors like "Failed to sync file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_stretch_main_binary-amd64_Packages".

After debugging, I finally realized that the issue was on a missing python-lzma on the offline machine, failing silently.

Please consider the following:
- In this use case, apt-offline is being used to maintain a reasonably air-gapped machine, which means it was never connected to any network. - This means that the initial APT database update also depended on apt-offline. There was no online database update whatsoever.
- The missing LZMA module was NOT apparent, not even with --verbose
- The following lines in /usr/lib/python2.7/dist-packages/apt_offline_core/AptOfflineLib.py are especially significant, as they are effectively a silent failure:

-------------------
try:
    import lzma
except ImportError:
    modLZMA = False
-------------------

- Considering that, at least in Debian 9, using the default deb.debian.org entry in sources.list, the database files are xzipped (therefore, depending on python-lzma), this is a problem, and the error message is misleading.

Given this scenario, I suggest the Debian package to have python-lzma in Depends instead of Recommends, and/or the upstream apt-offline to present more information if the module lzma is not available, even if only with --verbose, and especially when that is a cause of failure.

I know that the current versions are written in Python 3, but as long as Debian 9 is the current stable, this issue may burn someone else.

Thank you for your attention,
Valmiky Arquissandas

Reply via email to