Commit Graph

2 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
232e0e19db Make sure that the generator is only active on merged systems
There are rpms which have files in /usr/bin which would trigger the
condition in the generator, even when building on an unmerged system,
and the package would have Requires:filesystem(unmerged-sbin-symlinks).
The corresponding Provides is actually only generated when filesystem
itself is built with the merge, so effectively the package with the
Requires would become uninstallable.
2024-09-15 16:57:47 +02:00
Zbigniew Jędrzejewski-Szmek
898835da98 Create rpm Requires generator
The generator will generate a Requires on filesystem(unmerged-sbin-symlinks),
i.e. effectively on a new-enough version of _this_ package. This is needed to
solve the following problem:

  as packages are rebuilt in a merged-sbin environment, their payload paths
  change from /usr/sbin to /usr/bin. In all the cases where there were other
  packages that dependended on the old paths via explicit Requires, compat
  Provides on the old path was added along with
  Requires:filesystem(unmerged-sbin-symlinks). This means that those packages
  will not be installed with an older filesystem.rpm. But for packages that
  didn't need this special treatment, no dependency is generated. When they
  are installed into an upgraded environment which still has split-sbin and
  has an older copy of filesystem, the file is moved without the compat
  symlink being created. Thus, any scripts, or systemd service files, etc.,
  referring to the old path are now broken. We need to require a new-enough
  filesystem.rpm to be installed so avoid breakage on such partially upgraded
  systems.
2024-09-10 18:07:19 +02:00