Package candidate version override not working
Dear maintainers,
I am unable to install a specific version of a package with python-apt. For some reason package object lets me override the candidate version. However, once I try to install the selected version, cache.commit() just returns true instead of installing the package.
Here is my python and python-apt versions installed:
root@server1033:~# apt-cache policy python-apt
python-apt:
Installed: 1.1.0~beta1ubun
root@server1033:~# apt-cache policy python3.5
python3.5:
Installed: 3.5.2-2ubuntu0~
I have verified the package is not installed and still the cache.commit() doesnt install it. Here is the code that fails. Im showing you in an ipython3 terminal
root@server1033:~# ipython3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
Type "copyright", "credits" or "license" for more information.
IPython 2.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import apt
In [2]: package_name = 'zfs'
In [3]: version = '0.7.8.
In [4]: cache = apt.cache.Cache()
In [5]: package = cache[package_name]
In [6]: package.
Out[6]: False
In [7]: package.versions
Out[7]: <VersionList: ['0.7.8.
In [8]: candidate = package.
In [9]: package.candidate = candidate
In [10]: package.
In [11]: package.
Out[11]: False
In [12]: cache.commit()
Out[12]: True
Im trying to install a specific version of a package with python-apt.
I tried this article I found in the internet https:/
Please advise.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Enmanuel Hernandez for more information if necessary.