apt-offline get: IndexError: índice da lista fora do intervalo

apt-offline get: IndexError: índice da lista fora do intervalo

Estou tentando atualizar um computador no Ubuntu 16 sem internet de outro computador no Ubuntu 18. No computador Ubuntu16 eu fiz:

$ sudo apt-offline set ~/offline-data.sig

Então mudei para meu Ubuntu18 com o arquivo .sig e tentei usar o apt-offline, mas recebi este erro ao tentar baixar os pacotes:

$ apt-offline get -d ./OfflineUpgrade/ offline-data.sig
Fetching APT Data
Traceback (most recent call last):
  File "/usr/bin/apt-offline", line 28, in <module>
    main()
  File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 2211, in main
    args.func(args)
  File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 1135, in fetcher
    (ItemURL, ItemFile, ItemSize, ItemChecksum) = stripper(item)
  File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 814, in stripper
    item1 = ''.join(item[1])
IndexError: list index out of range

Meu offline-data.sig fica assim:

'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/InRelease' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_InRelease 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/binary-amd64/Packages.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_binary-amd64_Packages 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/binary-i386/Packages.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_binary-i386_Packages 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/binary-all/Packages.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_binary-all_Packages 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/i18n/Translation-fr_FR.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_i18n_Translation-fr%5fFR 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/i18n/Translation-fr.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_i18n_Translation-fr 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/i18n/Translation-en.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_i18n_Translation-en 0 
'https://esm.ubuntu.com/infra/ubuntu/dists/xenial-infra-security/main/dep11/Components-amd64.yml.xz' esm.ubuntu.com_infra_ubuntu_dists_xenial-infra-security_main_dep11_Components-amd64.yml 0 

Como posso resolver isso?

Responder1

Portanto, o problema veio da escrita diferente do arquivo .sig pelo apt-offline. No meu Ubuntu 16 que o escreveu, o arquivo terminava com várias linhas de texto em branco:

'http://fr.archive.ubuntu.com/ubuntu/dists/xenial-backports/multiverse/dep11/icons-64x64.tar.xz' fr.archive.ubuntu.com_ubuntu_dists_xenial-backports_multiverse_dep11_icons-64x64.tar 0 

Enable UA Infra: ESM to receive additional future security updates.

See https://ubuntu.com/esm or run: sudo ua status

enquanto o Ubuntu 18 que o leu terminou com linhas completas:

'http://at.archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/initramfs-tools-bin_0.130ubuntu3.12_amd64.deb' initramfs-tools-bin_0.130ubuntu3.12_amd64.deb 11156 MD5Sum:43c52cbf0447849d6997b454b4fc8d8d

Então, apagar as últimas linhas resolveu.

informação relacionada