rpm-software-management / spec-cleaner

spec-cleaner
BSD 3-Clause "New" or "Revised" License
28 stars 34 forks source link

Replace legacy otherproviders() and packageand() with upstream RPM stuff #241

Closed Conan-Kudo closed 5 years ago

Conan-Kudo commented 5 years ago

Upstream RPM since 4.10 supports using Conflicts to denote swappable providers. This was supposed to be fixed in #208 but it still seems to be in wide use in openSUSE itself.

Also, upstream RPM since 4.13 supports (pkgA and pkgB) as a replacement for packageand(pkgA:pkgB) statements.

Thus, something like Requires: packageand(foo:bar) should change to Requires: (foo and bar).

More details are available from RPM documentation: http://rpm.org/user_doc/boolean_dependencies.html

This also will improve compatibility of openSUSE with non-Zypp package managers when being used to build and maintain openSUSE chroots (such as DNF on Fedora, Mageia, and others).

scarabeusiv commented 5 years ago

We can implement this at a point where majority of the packages stop focus on building with Leap 42.3 (SLE12). I suppose approx within a year.

At the moment the Leap 42.3 is still fully supported and it would not make sense to have automated tool breaking all its packages.

Conan-Kudo commented 5 years ago

@scarabeusiv Couldn't this be implemented and them turned off or on as a rule? Projects that are targeting SUSE Linux 15 or newer should be able to force this...

Conan-Kudo commented 5 years ago

Also, the otherproviders() stuff should be able to go away anyway, since SUSE Linux 12 / openSUSE Leap 42 supports the necessary semantics in Conflicts.

scarabeusiv commented 5 years ago

The otherproviders are removed already by spec-cleaner it is not the tools falut that people do not use it :) so if you would run it on any of the current TW packages it would get auto-removed.