Hi, On Fri, 14 Jan 2022 08:09:30 -0700 Antonio Russo <aeru...@aerusso.net> wrote:
(...) > I am trying to use Policy.create_pin to do so, but cannot seem to get > it working: > > import apt_pkg > > apt_pkg.init() > cache = apt_pkg.Cache(progress=None) > policy = apt_pkg.Policy(cache) > #policy.create_pin('origin', '', 'Debian', -1) > policy.create_pin('origin', 'apt', 'Debian', -1) > policy.init_defaults() (...) > All calls to get_priority return 500---not -1, as I am trying to get > here. > > I must be doing something silly. I'd appreciate any help. just a shot into the dark: According to https://apt-team.pages.debian.net/python-apt/library/apt_pkg.html : "The parameter type refers to one of the strings ‘Version’, ‘Release’, or ‘Origin’. " So maybe this argument is case sensitive and changing "origin" into "Origin" may fix the issue? Best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Not one hundred percent efficient, of course ... but nothing ever is. -- Kirk, "Metamorphosis", stardate 3219.8