Ubuntu 22.04.1:apt-offline get --bundle 选项不起作用

Ubuntu 22.04.1:apt-offline get --bundle 选项不起作用

--捆绑文件.zip选项不起作用。我做错了什么?

Ubuntu 22.04.1

~ $ apt-offline set --update --upgrade offline.sig
~ $ apt-offline get offline.sig --bundle offline.zip

Fetching APT Data

Downloading http://security.ubuntu.com/ubuntu/dists/jammy-security/Release.gpg                                                             
http://security.ubuntu.com/ubuntu/dists/jammy-security/Release.gpg done                                                             
Exception in thread Thread-1 (run):#############] 100.0% of 0 KiB
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineLib.py", line 691, in run
    if threading.currentThread().guiTerminateSignal:
  File "/usr/lib/python3.10/threading.py", line 1449, in currentThread
    warnings.warn('currentThread() is deprecated, use current_thread() instead',
DeprecationWarning: currentThread() is deprecated, use current_thread() instead

Downloaded data to offline.zip

如你看到的--bundle 离线.zip实际上并没有下载除 PGP 签名之外的任何东西。

-d 目录选项工作正常。

答案1

遇到了完全相同的问题。通过编辑我的threading.py 文件 (/usr/lib/python3.10/threading.py),找到每次调用 warnings.warn() 函数的时间并注释掉这些行,我能够解决这个问题。

虽然这不是正确的修复,但它确实为我启动了正确的下载过程。

相关内容