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

Error if use mirror scheme #3

Closed
sgqy opened this issue Dec 17, 2019 · 2 comments
Closed

Error if use mirror scheme #3

sgqy opened this issue Dec 17, 2019 · 2 comments

Comments

@sgqy
Copy link

sgqy commented Dec 17, 2019

In /etc/apt/sources.list.
If I use deb mirror://mirrors.ubuntu.com/mirrors.txt focal main, it fails:

2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Executing external command: test -e /etc/apt/sources.list.d/official-package-repositories.list
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Constructing subprocess.Popen object ..
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Joining synchronous process using subprocess.Popen.communicate() ..
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Got return code 1 from synchronous process (test -e /etc/apt/sources.list.d/official-package-repositories.list).
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Executing external command: cat /etc/apt/sources.list
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Constructing subprocess.Popen object ..
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Joining synchronous process using subprocess.Popen.communicate() ..
2019-12-18 00:13:53 aya-NH50 executor.process[7612] DEBUG Got return code 0 from synchronous process (cat /etc/apt/sources.list).
2019-12-18 00:13:53 aya-NH50 apt_smart.cli[7612] ERROR Encountered unexpected exception! Aborting ..
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/cli.py", line 211, in main
    callback()
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/cli.py", line 231, in report_available_mirrors
    have_bandwidth = any(c.bandwidth for c in updater.ranked_mirrors)
  File "/usr/local/lib/python3.7/dist-packages/property_manager3/__init__.py", line 784, in __get__
    value = super(custom_property, self).__get__(obj, type)
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/__init__.py", line 387, in ranked_mirrors
    mirrors = sorted(self.available_mirrors, key=lambda c: c.sort_key, reverse=True)
  File "/usr/local/lib/python3.7/dist-packages/property_manager3/__init__.py", line 784, in __get__
    value = super(custom_property, self).__get__(obj, type)
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/__init__.py", line 131, in available_mirrors
    if self.release_is_eol:
  File "/usr/local/lib/python3.7/dist-packages/property_manager3/__init__.py", line 784, in __get__
    value = super(custom_property, self).__get__(obj, type)
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/__init__.py", line 475, in release_is_eol
    logger.debug("Checking whether %s is EOL ..", self.release)
  File "/usr/local/lib/python3.7/dist-packages/property_manager3/__init__.py", line 784, in __get__
    value = super(custom_property, self).__get__(obj, type)
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/__init__.py", line 444, in release
    return coerce_release(self.distribution_codename)
  File "/usr/local/lib/python3.7/dist-packages/property_manager3/__init__.py", line 784, in __get__
    value = super(custom_property, self).__get__(obj, type)
  File "/usr/local/lib/python3.7/dist-packages/apt_smart/__init__.py", line 295, in distribution_codename
    raise EnvironmentError("Failed to determine the distribution codename using apt's package resource list!")
OSError: Failed to determine the distribution codename using apt's package resource list!

It works if I use general url such as:
deb http://archive.ubuntu.com/ubuntu/ focal main

@martin68
Copy link
Owner

@sgqy Sorry for late response. Yes, mirror:// is not taken into consideration yet. I'll fix it in next few days. Thanks for feedback!

martin68 added a commit that referenced this issue May 31, 2020
@martin68
Copy link
Owner

@sgqy Sorry for late fix, I've released new version 7.1.3, pls update & test. I'm closing this issue, pls reopen it if you find any related problem. THX!

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