IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
PreReqs differ from regular requirements, they need special treatment.
Also do not add RPMSENSE_FIND_REQUIRES unnecessarily.
Fixes: 4.0.4-alt122~2 ("addReqProv: implement dep flags merge")
When a stronger requirement is added while a weaker one already exists
with incompatible flags, try to merge these flags to produce a new
stronger requirement.
For example,
"PreReq: %name = %version" + "Requires: %name = %version-%release"
now results to "PreReq: %name = %version-%release", and
"PreReq: %name = %EVR" + "Requires: %name = %EVRD"
now results to "PreReq: %name = %EVRD".
Before this change, thanks to rpmEVRcmp(), compare_deps() used to treat
EVRs with common EV as equal when one had a release and another hand't.
There were some reasons to use this approach, e.g. to decide that
Requires: %name = %version
is weaker than
Requires: %name = %version-%release
it had firstly to consider them as comparable deps. But, as an
unfortunate consequence of that approach, it was deciding that such deps
are equal, so that addReqProv() was unable to replace former with the
latter.
If one of deps has Epoch and another one hasn't,
we first compare them without Epoch, and if it happens
that they are equal, then the dep that has Epoch wins.
When comparing deps whose senses are identical, Epoch needs special
treatment: if one of deps has Epoch and another one hasn't, we first
compare them without Epoch, and if it happens that they are equal,
the dep that has Epoch wins.
%_deps_optimization is now treated as optimization level 0, 1, or 2
(the default is 2). Level 1 will make single-package optimizations.
Level 2 will additionally optimize dependencies between subpackages.
Both "Requires(post): foo" and "Requires: foo" should be kept.
The first dependency is only for %post-script: after the package
is installed, rpm allows to remove "foo" (though apt-get does not).
This is only a quick fix, perhaps the code should be rewritten.
For instance, if with have both "Requires(pre): foo" and
"Requires(post): foo", those can be folded into single
"Requires(pre,post): foo".
Note that this works only for automatic dependencies, because file list
is not ready when specfile dependencies are added. This is okay.
Also note that this will optimize out directory-like dependencies
if the package owns the directory. This is yet okay, but this is
a bit more subtle point.