Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange failures updating Ubuntu 18.04 #145

Closed
James-Hudson3010 opened this issue May 5, 2021 · 8 comments
Closed

strange failures updating Ubuntu 18.04 #145

James-Hudson3010 opened this issue May 5, 2021 · 8 comments

Comments

@James-Hudson3010
Copy link

I obtaining apt-offline for my offline device from https://packages.ubuntu.com/bionic/all/apt-offline/download

I generated the .sig file by doing:

sudo apt-offline set --update --upgrade ~/offline-data.sig

and have attached the signature file ( offline-data_sig.txt )

Then, I use apt-offline get -d ./offline_data offline-data.sig on a machine connected to the internet (also running Ubuntu 18.04) and it generates a lot of warnings and failures. I have attached the output ( offline_data_get.txt ).

I transfer the contents of offline_data to the offline device and run sudo apt-offline install offline_data/. Perhaps, as expected, a lot of errors are generated. I have attached the output (offline_install.txt)

Is there a better or more correct way to use the tool in my situation?

offline_install.txt

offline_data_get.txt

offline-data_sig.txt

@rickysarraf
Copy link
Owner

The errors reported are fine. They can be ignored. They are warnings as in the display. I think in the latest code, I've already disabled them in normal output.

Now, your .deb downloads are all reported corrupt during install operation. But in the get operation, the logs show them are being properly downloaded.

@rickysarraf
Copy link
Owner

First, you may want to try the latest version from https://packages.debian.org/sid/apt-offline

@rickysarraf
Copy link
Owner

Do you have python3-magic package installed on your system ?

@rickysarraf
Copy link
Owner

Hmmmm.. The python3-magic dependency was added long back in 2017. So there's low possibility of it not being installed.

Can you please share the sample .deb files that have been downloaded ?

@James-Hudson3010
Copy link
Author

James-Hudson3010 commented May 6, 2021

I updated both the online and offline machines (both running Ubuntu 18.04) to apt-offline 1.8.2. I used http://ftp.us.debian.org/debian/pool/main/a/apt-offline/apt-offline_1.8.2-2_all.deb

There are still a lot of errors generated when executing apt-offline --verbose get -d ./offline_data offline-data.sig ... see apt_offline.txt

Do these errors matter?

I attached the .sig file as well.

Yes, I did install python3-magic_0.4.15-1_all.deb

I can provide any further information you need and am willing to test changes to help resolve this issue.

I am hesitant to try sudo apt-offline install offline_data/ until I am sure the errors are irrelevant.

offline-data_sig.txt
apt_offline.txt

@James-Hudson3010
Copy link
Author

Just repeating apt-offline get --verbose -d ./offline_data offline-data.sig with the --verbose flag in the correct location to get the verbose output

apt_offline.txt

@rickysarraf
Copy link
Owner

Sorry for the delay in responding back.

Your output looks fine to me.

let's take below example.

VERBOSE: Stripped item URL is: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.xz
VERBOSE: Stripped item FILE is: us.archive.ubuntu.com_ubuntu_dists_bionic-backports_multiverse_cnf_Commands-all
VERBOSE: Stripped item SIZE is: 0
VERBOSE: Stripped item CHECKSUM is:
VERBOSE: Thread is Thread-1
Downloading http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.xz
VERBOSE: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.xz - 404 - Not Found
VERBOSE: Will still try with other package uris
VERBOSE: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.xz failed. Retry with the remaining possible formats
VERBOSE: Retry download http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.bz2
VERBOSE: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.bz2 - 404 - Not Found
VERBOSE: Will still try with other package uris
VERBOSE: Failed with URL http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.bz2
VERBOSE: Retry download http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.gz
VERBOSE: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.gz - 404 - Not Found
VERBOSE: Will still try with other package uris
VERBOSE: Failed with URL http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.gz
VERBOSE: Retry download http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.lzma
VERBOSE: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.lzma - 404 - Not Found
VERBOSE: Will still try with other package uris
VERBOSE: Failed with URL http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.lzma
ERROR: Giving up on URL http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/cnf/Commands-all.lzma

Given that the data can be available in different compression formats, depending on the remote server, apt-offline cycles through all known formats. If none is available, it then gives up and reports an error. In this example above, it has failed. It has failed for the non-critical data. Many many mirrors do not mirror the extra metadata, which is what you are seeing above.

For example, take the stripped url of the above: http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/multiverse/
You'll notice that the remote server did not mirror/serve the cnf/ folder.

So, it isn't really an error from the objective of getting apt-offline to serve as the offline tool. OTOH, if you purely see from a programmatic point of view, it is a clear error. That's why I keep juggling about whether should this be reported to the user or just be suppressed as a verbose message.

@rickysarraf
Copy link
Owner

With the changes I've pushed as part of #138, this is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants