Re: python-apt create_pin question

2022-01-17 Thread Antonio Russo
On 1/17/22 02:54, Michael Lange wrote: (...) > > So maybe this argument is case sensitive and changing "origin" into > "Origin" may fix the issue? > Hello Michael, Thanks for the suggestion. Unfortunately it does not work. I had actually dug into the source a tiny bit before posting: Unlike

Re: python-apt create_pin question

2022-01-17 Thread Michael Lange
Hi, On Fri, 14 Jan 2022 08:09:30 -0700 Antonio Russo 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', '

Re: python-apt create_pin question

2022-01-15 Thread Andrei POPESCU
On Vi, 14 ian 22, 08:09:30, Antonio Russo wrote: > > Hello! > > I'm trying to use apt_pkg to get a "best candidate" for a package, but with > slightly different constraints than I have set up in /etc/apt/preferences.d. > > I am trying to use Policy.create_pin to do so, but cannot seem to get it