8

As I write this, the lxqt packages on debian unstable are currently broken, and apt dist-upgrade removed them because they're incompatible with an upgraded qt5. This meant I lost my only desktop environment, and the machine booted to an sddm with no choices for session type.

The short term fix (having recovered my system using debian snapshots) is to use apt-mark hold lxqt to block dist-upgrade from any changes to the lxqt package.

I would like a permanent fix instead -- eventually the lxqt debian maintainers will update their packages, and there'll be a new lxqt available that is compatible with the available libqt5core5t64, but because I have used apt-mark hold, dist-upgrade will not upgrade to it.

How can I make apt consider lxqt to be "system-critical" (as it does for things like libc), so it continues allowing upgrades for it, but does not allow it to be uninstalled by a dist-upgrade?

1 Answer 1

9

“System-critical” packages are those marked essential and any packages they depend on (the latter are known as transitively essential). To make apt consider lxqt as system-critical, you can create a dependency package and make that essential.

To do this, install the equivs package, and run

equivs-control essential-lxqt.control

Then edit essential-lxqt.control:

  • change the Package: line to Package: essential-lxqt
  • after the Package: line, add Priority: required and Essential:yes
  • uncomment the Depends: line and change it to Depends: lxqt

To build the package, run

equivs-build essential-lxqt.control

and install the resulting package.

For future reference, you may want to run apt upgrade instead of apt dist-upgrade; that will upgrade and install new packages as necessary, without ever removing any package. apt dist-upgrade is only necessary if apt upgrade indicates that it’s unable to upgrade one or more packages; in such circumstances, run apt upgrade anyway (to upgrade what it can upgrade), then apt dist-upgrade, but check what the latter is going to do before letting it process (so don’t run apt -y dist-upgrade).

2
  • 2
    AAAAH I was so close! Your answer appeared while I was in the process of editing the question to say I'd used apt-mark hold on an equivs package instead. Apart from not knowing the Essential: yes existed, it was almost word-for-word the same as this answer :) Commented Oct 26, 2024 at 15:03
  • That would work too ;-) — I took your “without using apt-mark hold” title literally! Commented Oct 26, 2024 at 15:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.