rpm-software-management / dnf5

Next-generation RPM package management system
Other
256 stars 86 forks source link

Avoid implicit package upgrades with `builddep` #1747

Open praiskup opened 1 month ago

praiskup commented 1 month ago

This looks like an unexpecte change in behavior between DNF4 and DNF5. If dummy.src.rpm does Requires: foo (== BuildRequires), and the package foo = 1.0.0 is installed, while foo = 2.0.0 is available in the repository, dnf builddep dummy.spec should not upgrade 1.0.0 => 2.0.0 - should be a no-op (just like dnf install foo).

Problem discussed in Mock repo: https://github.com/rpm-software-management/mock/issues/1420

praiskup commented 1 month ago

Reproducible with DNF5 from rawhide:


[root@raiskup /]# dnf --version
dnf5 version 5.2.6.2
dnf5 plugin API version 2.0
libdnf5 version 5.2.6.2
libdnf5 plugin API version 2.0

Loaded dnf5 plugins:
  name: builddep
  version: 1.0.0
  API version: 2.0

  name: changelog
  version: 1.0.0
  API version: 2.0

  name: config-manager
  version: 0.1.0
  API version: 2.0

  name: copr
  version: 0.1.0
  API version: 2.0

  name: needs_restarting
  version: 1.0.0
  API version: 2.0

  name: repoclosure
  version: 1.0.0
  API version: 2.0
praiskup commented 1 month ago

I was wrong, at least it is not a difference between DNF4 / DNF5, python3-dnf-plugins-core-4.9.0-1.fc39.noarch also updates with builddep.