Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPi repo + buster-backports cause cmake upgrade/downgrade loop #245

Closed
MichaIng opened this issue May 9, 2021 · 2 comments
Closed

RPi repo + buster-backports cause cmake upgrade/downgrade loop #245

MichaIng opened this issue May 9, 2021 · 2 comments

Comments

@MichaIng
Copy link

MichaIng commented May 9, 2021

With #238 the cmake package from Debian Buster backports have been added to the RPi APT repository, which makes perfectly sense to provide the implied benefits to Raspbian users.

On Debian repo images, like Raspberry Pi OS 64-bit or when installing Debian + the RPi repo on an RPi with buster-backports enabled, this however causes a strange error. It looks like a bug in APT itself, but it should be easy and fast to prevent it by changing the RPi repo.

Replicate

  1. Apply these APT sources:
    deb https://deb.debian.org/debian/ buster main
    deb https://deb.debian.org/debian/ buster-updates main
    deb https://deb.debian.org/debian-security/ buster/updates main
    deb https://deb.debian.org/debian/ buster-backports main
    deb https://archive.raspberrypi.org/debian/ buster main
    
  2. apt update
  3. apt install cmake: This will pull cmake + cmake-data from the RPi repo.
  4. apt upgrade: This will now offer to upgrade those two packages when confirming a downgrade 🤔. When confirming, the two packages are again pulled from the RPi repo.
  5. apt upgrade: Since above the same packages have been reinstalled, the upgrade/downgrade is again offered.
  6. Comment/remove the buster-backports repo (or the RPi repo) to solve the issue.

This breaks automated apt-get upgrade calls without --allow-downgrade.

It's strange as the version strings from both repos is exactly the same, so APT should not see an upgrade at all. And if it sees one as upgrade, why does it sees it as downgrade in the same turn, that requires a confirmation? Confusing.

Workaround

Appending a suffix like -rpi (or similar, like done in a few other RPi/RPi desktop specific packages) should solve the issue as then the package from the RPi repo should be undoubtedly seen as the newer version, so that it is installed and then no upgrade is offered anymore.

@MichaIng
Copy link
Author

The issue shouldn't be present anymore since Debian backports ships cmake v3.18.4 now. I'll leave the issue open just in case a general solution via version suffix or so, to prevent such upgrade looks in the future, wants to be found.

@MichaIng
Copy link
Author

I'll mark this as closed. With an RPi OS Bullseye release and the actual issue solved with newer cmake package versions, this lost its importance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant