Hello Ritesh,

- 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.


Hmmm. I was under the impression that this functionality (that of what
archive backend) was left out to the mirror admins. In today's day,
though, the standard practise is to simply use what the master node
serves.

I believe so. It may depend on which mirror I was directed to, and perhaps it was bad luck I got one using XZ. However, if there is a chance of this happening, then either apt-offline in the offline machine should ensure it supports XZ, or the apt-offline in the online machine should make the necessary arrangements to ensure the offline machine is able to handle the archives (e.g. repacking them with a supported backend).

This appears to be much more trouble than it's worth, which is why my suggestion was to just ensure the python-lzma package becomes required.


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.


For quite some time, Debian has enabled to install Recommends, by
default. That is why I marked it as a Recommends, so that it remains
flexible for users who don't use the lzma based backend.

Can you please check if you have explicitly disabled installation of
Recommends in your setup ?

As I said earlier, my use case has the implication that I can not connect the computer, ever. Not even to install apt-offline.

The way I bootstrapped apt-offline (in a brand-new Debian system) was by downloading its .deb, and the .debs of all the *depended* packages, and installed them with dpkg -i in the offline machine. This is how I missed python-lzma.

It's okay to keep it in Recommends. I like to keep things simple, too, and often skip the recommended packages when they appear to make no sense to me. I respect that. The alternative here is to let the user know when the missing package is making a difference, and what are its consequences. I do think it deserves being a Depend, though, if XZ is commonly used to compress the archives, since that undermines apt-offline's operation.

Alternatively, if python-lzma is not installed, apt-offline running from the online machine could download its package anyway, giving the user a choice to install it when needed, even while offline. This avoids a situation where a user has infrequent access to the Internet and the lack of this package blocks the user until the next Internet access (but since it's the package lists themselves that are compressed with XZ and APT will not function without them, this is a chicken-and-egg problem, in which the user has to know they need to dpkg -i python-lzma.deb before populating the APT database with apt-offline).

Notwithstanding, including it in Depends only solves a symptom. The real problem was the lack of error detail.

I could have easily installed python-lzma, if only I knew _that_ was the problem.


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.

I have added the following warning. Will backport some time for
Stretch. Let's keep this bug open until then. If you don't see activity
on this bug report in the next 2 months, please do ping.


rrs@priyasi:~/rrs-home/devel/apt-offline/apt-offline (master)$ ./apt-
offline install /var/tmp/upgrade.zip
WARN: lzma module unavailable
WARN: Please install python lzma module for APT lzma backend

Yup, I believe that mitigates the problem.
I was considering changing the code this weekend and creating a pull request, but it may no longer be needed. I might still add some more lines to the verbose log, though, if you agree!

Thank you for your attention!
Valmiky Arquissandas

Reply via email to