[SOLVED] Trying to understand APT Pinning

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
S3NTYN3L
Level 1
Level 1
Posts: 6
Joined: Fri Sep 27, 2019 5:36 pm

[SOLVED] Trying to understand APT Pinning

Post by S3NTYN3L » Sun Nov 10, 2019 1:58 pm

I'm running Mint Tina (Bionic) and everything is up to date.
I (was) desperately in need of libinput10 from Disco to get my touchpad working properly.
This requires a few dependencies to also be upgraded from Disco also and breaks one or two others otherwise.

To make a long story short, here's what ultimately gets things working:

Code: Select all

Download and install "manually":
libc6_2.29-0ubuntu2_amd64.deb
libc6-amd64-cross_2.29-0ubuntu2cross1_all.deb
libc6-dbg-amd64-cross_2.29-0ubuntu2cross1_all.deb
libc6-dev_2.29-0ubuntu2_amd64.deb
libc-bin_2.29-0ubuntu2_amd64.deb
libc-dev-bin_2.29-0ubuntu2_amd64.deb
libinput10_1.12.6-1_amd64.deb
libinput-bin_1.12.6-1_amd64.deb
locales_2.29-0ubuntu2_all.deb

Remove via Synaptic's "Fix Broken Packages" dialog:
libc6-dbg_2.27-3ubuntu1
Then, running update/upgrade via apt/apt-get no longer complains about dependencies and/or broken packages.

But I'm wondering if there's a better way and this leads me to the very dated Pinning How-To from Ubuntu.

Right away, I'm stuck at Step 1.
It says I need to edit /etc/apt/apt.conf or /etc/apt/apt.conf.d/01ubuntu.
With: APT::Default-Release "bionic";

Regardless, this file doesn't exist and I cannot find any line even remotely similar in any file within /etc/apt/.

This then leads me to the "Recommended Alternative" on that same page.
It just plain doesn't work and complains about/alludes to the "Default Release" line described above.

Sooo, what's the solution here?
Do I just leave things as they are, be thankful I've got things working and pray it doesn't break?
Last edited by S3NTYN3L on Sun Nov 10, 2019 8:16 pm, edited 1 time in total.

gm10
Level 20
Level 20
Posts: 10174
Joined: Thu Jun 21, 2018 5:11 pm

Re: Trying to understand APT Pinning

Post by gm10 » Sun Nov 10, 2019 2:34 pm

Nothing in your post is actually about pinning.

Suggest you roll back using timeshift, then add the Eoan repo instead because Disco is nearly end of life. The proper command to use would then be:

Code: Select all

apt install libinput10/eoan -t eoan
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

S3NTYN3L
Level 1
Level 1
Posts: 6
Joined: Fri Sep 27, 2019 5:36 pm

Re: Trying to understand APT Pinning

Post by S3NTYN3L » Sun Nov 10, 2019 3:48 pm

gm10 wrote:
Sun Nov 10, 2019 2:34 pm
Nothing in your post is actually about pinning.
Precisely my point.
That Pinning How-To is all but useless, IMO.
gm10 wrote:
Sun Nov 10, 2019 2:34 pm
then add the Eoan repo instead because Disco is nearly end of life
Where exactly?
In /etc/apt/sources.list as, I think, is usual? (I can do this through the Software Sources > Additional Repositories GUI too, I know).

I should note that, in the Software Sources > Official Repositories GUI, I have Unstable packages (romeo) enabled.
Should I turn it back off? Does it even matter?

Once I rollback the changes I made in my OP in favor of yours, will I need to blacklist things via the Synaptic GUI?

I've got to step out for a bit but I will do this when I return tonight, check for your reply and let you know how it goes.

gm10
Level 20
Level 20
Posts: 10174
Joined: Thu Jun 21, 2018 5:11 pm

Re: Trying to understand APT Pinning

Post by gm10 » Sun Nov 10, 2019 4:14 pm

S3NTYN3L wrote:
Sun Nov 10, 2019 3:48 pm
Where exactly?
In /etc/apt/sources.list as, I think, is usual? (I can do this through the Software Sources > Additional Repositories GUI too, I know).
Oh, I thought you had already done so for disco. Let's see, copy & paste this as a whole into a terminal window:

Code: Select all

sudo tee /etc/apt/sources.list.d/eoan.list <<'EOB'
deb http://archive.ubuntu.com/ubuntu eoan main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu eoan-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu eoan-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu eoan-backports main restricted universe multiverse
EOB
and then this (this is actual pinning to prevent you from updating the whole system to Eoan):

Code: Select all

sudo tee /etc/apt/preferences.d/eoan.pref <<'EOB'
Package: *
Pin: release o=Ubuntu,v=19.10
Pin-Priority: 400
EOB
Usual disclaimers about installing software not meant for your distribution apply. Should be fine though.
S3NTYN3L wrote:
Sun Nov 10, 2019 3:48 pm
I should note that, in the Software Sources > Official Repositories GUI, I have Unstable packages (romeo) enabled.
Should I turn it back off? Does it even matter?
Doesn't matter, there's nothing in there, it's not being used, but I'd turn it off regardless.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

S3NTYN3L
Level 1
Level 1
Posts: 6
Joined: Fri Sep 27, 2019 5:36 pm

Re: Trying to understand APT Pinning

Post by S3NTYN3L » Sun Nov 10, 2019 8:15 pm

gm10 wrote:
Sun Nov 10, 2019 4:14 pm
Oh, I thought you had already done so for disco. Let's see, copy & paste this as a whole into a terminal window:
I did but I wasn't getting anywhere because it kept complaining about APT::Default....
I ended up undoing all of that and downloading the packages in my OP and installing them "manually" with:
sudo apt install all_those_packages
That was the only way I could get it done without apt yelling at me when running sudo apt update && sudo apt upgrade.

OK, so I rolled everything back to before I messed with all of this, rebooted, applied your suggested edits, ran sudo apt update && sudo apt upgrade, and finally, apt install libinput10/eoan -t eoan.

Your way omitted 2 packages, yay! ;)
libc6-amd64-cross_2.29-0ubuntu2cross1_all.deb
libc6-dbg-amd64-cross_2.29-0ubuntu2cross1_all.deb

I rebooted and touchpad is back in business.

sources.list.d/eoan.list and /etc/apt/preferences.d/eoan.pref is where I was going wrong.
The How-To seemed to imply that these files already existed. Couple that with the fact that I wasn't naming them correctly and, well, no wonder I never got it working...

Anyway,
Thanks so much for the concise, straight to the point help!

gm10
Level 20
Level 20
Posts: 10174
Joined: Thu Jun 21, 2018 5:11 pm

Re: [SOLVED] Trying to understand APT Pinning

Post by gm10 » Mon Nov 11, 2019 2:43 am

Hmm? You weren't supposed to name anything, those were two scripts I gave you to set everything up, and I had said to roll back your changes first.

Oh well, you got there in the end. If you left those two files in place you will keep receiving updates to those packages. Note that you could replace the server addresses with those of your local mirror, if you prefer.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

S3NTYN3L
Level 1
Level 1
Posts: 6
Joined: Fri Sep 27, 2019 5:36 pm

Re: [SOLVED] Trying to understand APT Pinning

Post by S3NTYN3L » Tue Nov 12, 2019 12:52 pm

gm10 wrote:
Mon Nov 11, 2019 2:43 am
Hmm? You weren't supposed to name anything,
Yes, I know.
I was talking talking about before I even posted here and was trying to follow the How-To.
IE; the How-To is confusing AF...
gm10 wrote:
Mon Nov 11, 2019 2:43 am
those were two scripts I gave you to set everything up, and I had said to roll back your changes first.
I know.
Again, I did just as you suggested and it all went swimmingly.
gm10 wrote:
Mon Nov 11, 2019 2:43 am
If you left those two files in place you will keep receiving updates to those packages.
Yet again, I rolled everything back and did as you suggested.
IE; those packages never existed on my system.
gm10 wrote:
Mon Nov 11, 2019 2:43 am
Note that you could replace the server addresses with those of your local mirror, if you prefer.
Noted and done. ;)

gm10
Level 20
Level 20
Posts: 10174
Joined: Thu Jun 21, 2018 5:11 pm

Re: [SOLVED] Trying to understand APT Pinning

Post by gm10 » Tue Nov 12, 2019 1:57 pm

All good then. I just had been unsure for a moment whether it was my instructions that had you confused or that Ubuntu wiki article. And I agree that the latter is all over the place.

As you did see from the solution I gave you, it is rather simple, just some parameters added to apt's configuration to give packages from Ubuntu's version 19.10 repositories a priority of 400. The default priority is 500. It's likely self-explanatory at that point, otherwise just ask. ;)
Last edited by gm10 on Tue Nov 12, 2019 3:03 pm, edited 1 time in total.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

S3NTYN3L
Level 1
Level 1
Posts: 6
Joined: Fri Sep 27, 2019 5:36 pm

Re: [SOLVED] Trying to understand APT Pinning

Post by S3NTYN3L » Tue Nov 12, 2019 2:27 pm

Indeed.
So far, so good.

I found man apt_preferences and I'm studying up on it.
I'll get there eventually. ;)

Thanks again.

Post Reply

Return to “Software & Applications”