Commit Graph

2238 Commits

Author SHA1 Message Date
a7ed02398b spec: fix license tags 2020-01-03 19:33:48 +00:00
915bc8b5ff spec: remove %if 0'd parts
... because they confuse rpmspec.
2020-01-03 19:33:48 +00:00
0954baaf05 Remove AM_INTL_SUBDIR
This macro is no longer exported by gettext.
2020-01-03 19:33:48 +00:00
Anton V. Boyarshinov
54a2ca259c Auto-requies on binaries used in systemd .service files added 2019-12-26 14:09:03 +00:00
9c18a40269 Make %autopatch and %patch accept -pg
* parsePrep.c (doPatch): Change strip argument type to const char *.
(doPatchMacro, doAutopatchMacro): Change opt_p variable type to char *,
change checking of opt_p: it can be either a number or a 'g' symbol
assuming that -pg is a valid option for patch command.
2019-12-15 21:57:32 +00:00
b0a545f593 4.0.4-alt135
- Fixed build with glibc >= 2.28.
2019-11-24 11:58:18 +00:00
90d5486688 Check for cookie_io_functions_t provided by stdio.h
Do not check for libio.h, it's not included anyway.
Check for cookie_io_functions_t and conditionalize
on HAVE_COOKIE_IO_FUNCTIONS_T instead.
2019-11-24 11:58:18 +00:00
5133ad68aa setcmp: use 'm' instead of 'a' as the assignment-allocation modifier
Support for the 'm' modifier was added to glibc starting with version 2.7,
programs should use that modifier instead of 'a'.
2019-11-24 11:58:18 +00:00
fdd98a7997 Replace all uses of _IO_off64_t with off64_t
Mechanically substitute _IO_off64_t with off64_t using
$ git grep -Fwl _IO_off64_t |xargs -r sed -i s/_IO_off64_t/off64_t/g

This follows glibc-2.28~574 and fixes build with glibc >= 2.28.
2019-11-24 11:58:18 +00:00
9977eae223 4.0.4-alt134
- Backported RPMTAG_VCS support from rpm.org.
2019-11-01 16:16:23 +00:00
Colin Walters
8e0d85c61e Add 'VCS' key
Spec files have a lot of metadata about a project.  However one of the
most key components is the upstream version control system which was
notably lacking.

Resolve this by adding a "VCS" key.  There is no specification
for contents of this key, given that the set of version control
systems (and features thereof) are not well-defined.  However,
recommendations are:

 * git: This URL should be in a form that can be passed to "git clone",
   with the additional feature that an optional fragment identifier "#foo"
   denotes a branch or tag.
2019-11-01 16:16:23 +00:00
ee9e17c3ad 4.0.4-alt133
- Added %autopatch support.
2019-10-03 21:19:34 +03:00
efe5536cfe build: add %autopatch support
%autopatch is a directive to apply all patches, it supports -p<num> and
-F<num> options

%autopatch was initially introduced in rpm.org with version 4.11 but with
different implementation.
2019-10-03 21:14:18 +03:00
Gleb Fotengauer-Malinovskiy
ba5873f889 4.0.4-alt132
- Added %_pointer_size, %_is_ilp32, and %_is_lp64 macros.
2019-05-11 17:26:56 +03:00
Gleb Fotengauer-Malinovskiy
3dfc13a782 Add %_pointer_size, %_is_ilp32, and %_is_lp64 macros 2019-05-11 17:26:56 +03:00
Gleb Fotengauer-Malinovskiy
8a97cf8dca installplatform: disable glob; disallow undefined variables; fail on error 2019-05-11 17:08:40 +03:00
9b9737913f 4.0.4-alt131
- Fixed syntax check regression introduced in the latest release.
2019-04-19 05:10:27 +00:00
1b6d0ed4c2 parseBits: fix regression introduced by the latest fix 2019-04-19 05:08:33 +00:00
d21fe32b27 4.0.4-alt130
- %configure: added --disable-silent-rules.
- Disallowed Provides specifying version ranges.
- Disallowed syntax errors in qualifiers of Requires and BuildRequires tags.
2019-04-16 18:46:34 +00:00
988b7b0106 parseBits: disallow syntax errors and unknown qualifiers
The previous attempt to fail build in case of syntax errors
and unknown dependency qualifiers made in commit
rpm-4.8.0-beta1-385-gbf2bc18ebb325f081ade65adc2fbb6858f0b8396
missed the following classes of erroneous dependencies:

Requires(,) -- erroneously treated as Requires(),
Requires(;) -- erroneously treated as Requires(),
Requires(,pre) -- erroneously treated as Requires(),
Requires(;pre) -- erroneously treated as Requires(),
Requires(pre,) -- erroneously treated as Requires(pre),
Requires(pre,,postun) -- erroneously treated as Requires(pre),
Requires(pre,,junk) -- erroneously treated as Requires(pre),
Requires(pre;postun) -- erroneously treated as Requires(pre),
Requires(pre;junk) -- erroneously treated as Requires(pre).

Found by code inspection.

Fixes: bf2bc18ebb32 ("Always fail build on unknown dependency qualifiers")

(cherry picked from rpm.org commit aafb861846db97d78964e98d603b4e6cd88ed3ae)

The two last cases listed above have already been fixed by commit
f7280d8302.
2019-04-16 18:46:34 +00:00
a765b58010 parseRCPOT: reject Provides containing logical operator < or >
Disallow those types of Provides that specify version ranges
because Provides are not compatible with version ranges.
2019-04-16 18:46:34 +00:00
37bfd938fd %configure: add --disable-silent-rules
It's always annoying when important information such as compilation
options used for build is not available in build logs just because
silent build rules are enabled by default.

Fix this for the case of build rules generated by configure
by disabling silent rules.
2019-04-16 18:46:34 +00:00
Ivan Zakharyaschev
52a00bd293 4.0.4-alt129
- Fixed deps optimization "due to repentancy": if subpkg A requires subpkg B,
  and B has a dependency on C, a weaker dependency on C is removed from A
  (say, without an epoch or disttag).
2019-02-27 07:30:19 +03:00
Ivan Zakharyaschev
4bf78baf6c interdep.c: fix the optimization ("due to repentancy") of a non-identical dep
compare_deps() was simply called with a wrong argument (an illegal value
for this parameter); so it returned a meaningful result only if
the compared deps were identical. (Always, since the inception in f5ed7f870a .)

Example where the dep was not optimized out:

Name: test-epoch-repentancy
Version: 1
Release: alt1

Summary: test-epoch-repentancy

License: public domain
Group: Other

Requires: %name-sub = %EVR
Requires: foo = 1-alt1

BuildArch: noarch

%description
%summary

%package sub
Summary: sub
Group: Other

Requires: foo = 0:1-alt1

%description sub
%summary

%files
%files sub

%changelog
* Wed Feb 27 2019 Ivan Zakharyaschev <imz@altlinux.org> 1-alt1
- initial build for ALT Linux Sisyphus.

(cherry picked from commit 492396b532660f4debc46e96eb306f07a3261d66)

# Conflicts:
#	build/interdep.c
2019-02-27 07:30:19 +03:00
Ivan Zakharyaschev
3cec7c6d8c reqprov.c: fix a comment (after the disttag handling was inserted) 2019-02-27 07:30:19 +03:00
Ivan Zakharyaschev
b2e5528c36 4.0.4-alt128
- Reverted one of the changes (for disttag-unaware tools compatibility)
  from 4.0.4-alt127 (useful in rare cases, but bad for external dependencies
  on virtual Provides when interpreted by the old rpm):
  + %EVR macro (for intersubpackage deps) upgraded to include %disttag
- Always fix interpackage deps that need Epoch or Disttag (ALT#36180).
  (This completes the improvement of 4.0.4-alt100.63.)
- Made deps optimization more aware of disttag:
  + build/reqprov.c: made addReqProv() aware of the disttag of
    the package (affects deps optimization).
  + add disttag to struct availablePackage (like buildtime; affects
    rpm -U & interdep.c)
  [rpm-4.13.0.1-alt5 alike]
  + Implemented DistTag support when comparing package versions (with
    help by Vladimir D. Seleznev).
  [rpm-4.13.0.1-alt6 alike]
  + rpmEVRcmp() (and hence rpmRangesOverlap()) made asymmetric w.r.t.
    underspecified release. (Provides: N = V can't anymore satisfy
    Requires: N = V-R.) (with help of Vladimir D. Seleznev)
2019-02-26 23:27:17 +03:00
Ivan Zakharyaschev
475e2b6865 (.spec) listed most source code changes in the changelog 2019-02-26 23:19:51 +03:00
Ivan Zakharyaschev
6f68e5cbc0 Revert "%%EVR macro (for intersubpackage deps) upgraded to include %%disttag (ALT#35930)"
This reverts commit 66e8bff6e4.
2019-02-26 23:19:51 +03:00
Ivan Zakharyaschev
5bc7c3086d build/reqprov.c: made addReqProv() aware of the disttag of the package 2019-02-26 23:19:51 +03:00
Ivan Zakharyaschev
e805931cf3 remark: we don't print the disttag 2019-02-26 23:19:51 +03:00
Ivan Zakharyaschev
3c72c222d5 lib/depends.c: remark: There is no psp->problems->byDisttag. (TODO?) 2019-02-26 23:19:51 +03:00
Ivan Zakharyaschev
2b320b142d lib/psm.c: make runScript() print the disttag on errors 2019-02-26 23:19:51 +03:00
Ivan Zakharyaschev
9dfcf26d97 lib/psm.c: print disttag to syslog if available 2019-02-26 23:19:50 +03:00
Ivan Zakharyaschev
dfb710403d lib/depends.c: make headerMatchesDepFlags() aware of the disttag of the header 2019-02-26 23:19:50 +03:00
Ivan Zakharyaschev
ef382d2a80 add disttag to struct availablePackage (like buildtime; affects rpm -U & interdep.c) 2019-02-26 23:19:50 +03:00
Ivan Zakharyaschev
6be20da468 headerNVR() replaced by the new header{NVRD,Name{,Version}}() in trivial cases
These are the cases where even the release was not needed (so, the
disttag is not needed, too), or one case where the filename is
contructed (and it doesn't include the disttag).

Now grep -Ee 'headerNVR[^D]' will show the remaining non-trivial
cases, where adapting to disttags may be needed.
2019-02-26 23:16:13 +03:00
Ivan Zakharyaschev
fa7947df25 4.0.4-alt128 [rpm-4.13.0.1-alt5 alike]
- Implemented DistTag support when comparing package versions (with
  help by Vladimir D. Seleznev). (It's necessary for the correctness
  of checking dependencies after we introduced parseEVRD().)
  (Affects rpmbuild, too, when optimizing deps.)
- Dirty hacked to make upgrade packages between branches possible (by
  Vladimir D. Seleznev; probably, dead code for rpm-build without rpm-install.)
[rpm-4.13.0.1-alt6 alike]
- rpmEVRcmp() (and hence rpmRangesOverlap()) made asymmetric w.r.t.
  underspecified release. (Provides: N = V can't anymore satisfy
  Requires: N = V-R. Affects rpmbuild, too, when optimizing deps.)
  (with help of Vladimir D. Seleznev)
- rpmRangesOverlap() optimized (can run ca. 30% faster).
2019-02-26 22:17:52 +03:00
69ddb1de4c lib/psm.c: hack to make upgrade packages between branches possible
(cherry picked from commit c5c67cf171246d433290cb5b917ce3b6a8638880)
2019-02-26 22:17:52 +03:00
e624792819 lib/depends.c: make rpmRangesOverlap() handle DistTag
In a constraint (Requires, Conflicts), some components of E:V-R:D may
be unspecified; here are the sensible possibilities:

V
E:V-R
E:V-R:D

Remember that the DistTag represents the ID of a particular build. (V
represents a particular upstream version. E:V-R represents a
particular source package release.)

To satisfy a requirement, only the specified components must be
checked.

So, if the requirement doesn't specify a DistTag, then we don't have
to check the DistTag to satisfy it.

If the requirement does specify a DistTag, then if it is an "equals"
requirement, then only the same DistTag can satisfy it. (I.e., we want
that particular build.)

A "less" (or "greater") requirement of a DistTag basically makes no
sense, because the build IDs are not ordered. So, such a requirement
cannot be satisfied, if it has come to checking the DistTag, i.e. the
EVRs have been equal. (It cannot be satisfied by a package with an
equal EVR and any DistTag value, but can be satisfied by a package
with EVR which is strictly less or greater.)

What does the last part mean for "Requires" and "Conflicts"?

Requires: N>E:V-R:D would have the same effect as Requires: N>E:V-R

Conflicts: N>E:V-R:D would have the same effect as Conflicts: N>E:V-R

i.e., a conflict would not disallow packages with the specified E:V-R,
but a different DistTag. (We can't do any better, unless there is a
"not-equals" type of requirement in RPM.)

Commit message author: Ivan Zakharyaschev <imz@altlinux.org>

Commit is based on 6cb615d6112a2ca841481d8153ba652d512a2f23 of

git://git.altlinux.org/gears/r/rpm.git
(cherry picked from commit d169679410a0d02a731addb8b526ecbc8a3a56fc)
2019-02-26 22:17:52 +03:00
Ivan Zakharyaschev
ee2e436b00 Merge branch 'predisttag-fixes' into _BUILD/alt
# Conflicts:
#	rpm-4_0.spec
2019-02-26 22:17:43 +03:00
Ivan Zakharyaschev
83ebf31ee5 build/interdep.c: always fix interpackage deps that need Epoch or Disttag
This completes the intention of de77ec4556
"build/interdep.c: fix interpackage dependencies automatically":

> ...This change also downgrades "dependency needs Epoch" error to warning
> because it automatically adds strict dependencies.

However, the dependency pkg1->pkg2 was not fixed (if it needed an epoch
or disttag) if pkg1 was already considered to have a strict transitive
dependency on pkg2 (perhaps, via another pkg3: if pkg1->pkg3 and
pkg3->pkg2 deps have already been fixed and added as strict ones).

Then, if pkg3 was a part of a cycle, the pkg1->pkg2 dep wasn't
optimized out. So, it was left untouched, not in the nice format of a
strict dep (i.e., missing an epoch or a disttag).

This was not dangerous, because the strictness was guaranteed by the
transitive dependency, but it was not nice, and was inconvenient for
tools which happen to compare the dep versions as whole strings (say,
for rpm and apt optimizations, or for disttag-unaware old rpm or apt).
2019-02-26 22:15:18 +03:00
Ivan Zakharyaschev
bb367d71cc (.spec) typo 2019-02-26 22:15:18 +03:00
Ivan Zakharyaschev
7f30a1fa42 [rpm-4.13.0.1-alt6 alike] (.spec) update changelog
- rpmEVRcmp() (and hence rpmRangesOverlap()) made asymmetric w.r.t.
  underspecified release. (Provides: N = V can't anymore satisfy
  Requires: N = V-R. Look out for unmets!)
  (with help of Vladimir D. Seleznev)
- rpmRangesOverlap() optimized (can run ca. 30% faster).
2019-02-26 22:15:12 +03:00
Ivan Zakharyaschev
e9f11c0720 rpmEVRcmp(A,B) made asymmetric wrt underspecified release
(Analoguous to the change in rpm-4.13-alt6
cfa573f99fbabf7610cec1fb0ee1993f9640b090,
made with help of Vladimir D. Seleznev <vseleznv@altlinux.org>.)

Unchanged (wanted) behavior: On the side of Requires (B), a missing
("underspecified") release means that the relative order of A and B
(result of comparison) is determined only by the speicified components
(epoch, version):

  such B is equal to any A with an equal epoch and version (and any release);
  such B is greater than A if B's epoch-version is greater than A's;
  etc.

A similar treatment of an underspecified release on the side of
Provides (A) was unwanted and it has been changed now:

  a B with a non-empty release can't be equal to such A (with a
  missing release);
  namely, a B with a non-empty release is greater than an A with equal
  epoch-version and no release.

Example of a satisfied dependency (worked before and works now):

  Provides: N = V-R
  Requires: N = V

Example of an unsatisfied dependency (previously, this satisfied the Requires):

  Provides: N = V
  Requires: N = V-R

We don't want this Requires to be satisfied in this case.
2019-02-26 22:02:56 +03:00
Ivan Zakharyaschev
6162356696 rpmRangesOverlap() optimized with strdupa; simplified this place a bit
Analoguous strdupa optmization in rpm-4.13-alt6 gave around 30%
improvement in speed when using this functions.

Simplfied code (with variables available only in the scope where they
are used and without extra variables whose value is not used anymore)
is simpler to understand and modify.
2019-02-26 22:02:56 +03:00
Ivan Zakharyaschev
90cda281e2 4.0.4-alt127
- Make "new" packages (with disttags) be treated better
  by the "old" disttag-unaware rpm in some cases; primarily those with
  < and/or > Conflicts on another subpackage. This form of Conflicts
  is used to ensure that no subpackages from different releases/builds
  get installed together. (A better way to express this is to add a
  common subpackage that all other subpackages depend on.) This change
  doesn't affect the way the "new" rpm would treat packages with such
  deps (ALT#35930):
  + rewrite < and > dependencies so that they have almost the same meaning when
    treated by old disttag-unaware tools;
  + %EVR macro (for intersubpackage deps) upgraded to include %disttag
    (given the other change, this is only useful for making the rare
    Conflicts: subpkg = %EVR more compatible with disttag-unaware tools).
- checkinstall subpackage added.
2019-02-22 15:59:27 +03:00
Ivan Zakharyaschev
eddfb9267b don't touch unrealistic deps, when filling insignificant disttags for compatibility
Not touched:

Requires: x < E:V-R[:D]
Obsoletes: x > E:V-R[:D]
Requires: x > E:V-R:D (with a disttag)

There are actually no such dependencies in Sisyphus now.
2019-02-22 15:59:27 +03:00
a5bed9a6e4 Rewrite "x < E:V-R[:D]" and "x > E:V-R[:D]" deps for compatibility with disttag-unaware tools
With this change, there are not so many failing tests from
rpminstall-tests-1.0-alt4 (or equivalently from the predisttag branch
there) when run in a system with an "old" rpm and the "new" rpm-build

$ rpm -q rpm --lastchange
* Пт окт 05 2018 Gleb F-Malinovskiy <glebfm@> 4.13.0.1-alt4
- Add _allow_deps_with_beginning_dot macro to allow dependencies
  beginning with a dot character in spec file (vseleznv@).
$ ./makeme.sh -j4 SHORT=1
...
XFailed tests:
installable_dummyDisttag_with_reqEqualEpoch (external/strict-old-old dep & future pkg)
noninstallable_dummyDisttag_with_conflEqualEpoch (external/strict-old-old dep & future pkg)
installable_virtDummyDisttag_with_reqEqualEpoch (external/strict-old-old dep & future pkg)
noninstallable_virtDummyDisttag_with_conflEqualEpoch (external/strict-old-old dep & future pkg)
installable_dummyDisttag_with_reqEqual (elusive external/strict-old-old dep & future pkg)
noninstallable_dummyDisttag_with_conflEqual (elusive external/strict-old-old dep & future pkg)
installable_virtDummyDisttag_with_reqEqual (elusive external/strict-old-old dep & future pkg)
noninstallable_virtDummyDisttag_with_conflEqual (elusive external/strict-old-old dep & future pkg)
obsoleted_dummyDisttag_with_obsolEqualEpochDisttag (unrealistic obsoleting disttag)
obsoleted_dummyDisttag_with_obsolEqualDisttag (unrealistic obsoleting disttag)
installable_provVR3Disttag_with_reqEq_VR3 (elusive external/strict-old-old dep & future pkg)
Failed tests:
noninstallable_provOnlyV_with_reqVR
noninstallable_provOnlyV_before_reqVR
installable_provOnlyV_with_conflVR
installable_provOnlyV_before_conflVR

Except for the underspecified Provides problem, the insteresting cases
are the cases of a = dependency.

We can think of a Conflicts: subpkg = E:V-R, which wouldn't work,
but many such cases (if there are any) must be mitigated by the change
of the value of %%EVR to include the disttag (in another commit).

So, the "old" and "new" rpm behave much more similar w.r.t. to the
packages built by the new rpm-build. (This is what we wanted.)
2019-02-22 13:55:30 +03:00
Ivan Zakharyaschev
e3b9fe1253 files.c: more const qualifiers at appropriate places 2019-02-21 14:18:39 +03:00
Ivan Zakharyaschev
66e8bff6e4 %%EVR macro (for intersubpackage deps) upgraded to include %%disttag (ALT#35930)
%EVR was introduced to be used in spec-files for intersubpackage
(strict) dependencies.

What if we write (when substituting %%EVR) E:V-R:D into dependencies
instead of the previously written E:V-R? Will the interpretation of
these dependencies by rpm change (when installing packages) in a good
or bad way in any cases?

The "dependencies" can be Requires, Conflicts, Obsoletes.

rpm-build already produces packages which include disttags (D), and
Provides in the form of E:V-R:D, and strict intersubpackage
dependencies of such form (Requires; generated automatically).
Intersubpackage Requires in the form "< %EVR" or "> %EVR" don't make
sense. So, the interesting cases this change can affect are:

* Conflicts of the form "< %EVR" or "> %EVR" or "= %EVR" (the last one
must be quite rare);

* Obsoletes of the form "< %EVR" ("= %EVR" makes little sense;
"> %EVR" looks strange because it's about obsoleting packages from future).

The rpm program can be "new" (which knows how to compare E:V-R:Ds with
disttags; since 4.13.0.1-alt5) or "old" (does not yet know it;
4.13.0.1-alt4 or earlier).
(rpm-build already produces "new" packages, i.e., with disttags.)

The "new" rpm program is considered to be the correct reference way to
treat disttags. According to it, the presence of a disttag in a < or >
dependency cannot affect its interpretation (whether it is satisfied
by another package). Adding a disttag to a = dependency would simply
make it more strict (and that's what rpm-build already does under the
hood for intersubpackage deps). So, E:V-R:D deps are OK for the "new"
rpm.

So, what about about the "old" rpm?

Let's pay attention to the cases where the "old" rpm behaves
differently from the "new" rpm.

Such differences can be demonstrated by running
rpminstall-tests-1.0-alt2.M70P.1 in a system with an "old" rpm and a
"new" rpm-build (that can produce packages with disttags).

Here are the interesting failed test cases without disttag in the dependencies
(like before the change made by this commit), i.e. with dependencies
in the form E:V-R written in Conflicts or Obsoletes:

* installable_dummyDisttag_with_conflGreaterEpoch (and similar ones)

$ rpm -qp RPMS/dummyDisttag/noarch/dummy-1-alt1.noarch.rpm --provides
dummy = 1-alt1:zzz+777.66
$ rpm -qp RPMS/conflGreaterEpoch/noarch/conflGreaterEpoch-1-alt1.noarch.rpm --conflicts
dummy > 0:1-alt1
$ rpm -i RPMS/dummyDisttag/noarch/dummy-1-alt1.noarch.rpm RPMS/conflGreaterEpoch/noarch/conflGreaterEpoch-1-alt1.noarch.rpm
error: Failed dependencies:
	dummy > 0:1-alt1 conflicts with conflGreaterEpoch-1-alt1.noarch

NOT OK (ALT#35930): this form of Conflicts is used to ensure that no
subpackages from different releases/builds get installed together.

* noninstallable_dummyDisttag_with_conflEqualEpoch (and similar ones)

$ rpm -qp RPMS/conflEqualEpoch/noarch/conflEqualEpoch-1-alt1.noarch.rpm --conflicts
dummy = 0:1-alt1
$ rpm -i RPMS/dummyDisttag/noarch/dummy-1-alt1.noarch.rpm RPMS/conflEqualEpoch/noarch/conflEqualEpoch-1-alt1.noarch.rpm

succeeds

NOT OK: this form of conflicts could be used to declare conflicting subpackages.

Here are the interesting failed test cases with disttag in the
dependencies (like after the change made by this commit), i.e. with
dependencies in the form E:V-R:D written in Conflicts or Obsoletes:

* installable_dummy_with_conflLessEpochDisttag (and similar ones),

$ rpm -qp RPMS/dummy/noarch/dummy-1-alt1.noarch.rpm --provides
dummy = 1-alt1
$ rpm -qp RPMS/conflLessEpochDisttag/noarch/conflLessEpochDisttag-1-alt1.noarch.rpm --conflicts
dummy < 0:1-alt1:zzz+777.66
$ rpm -i RPMS/dummy/noarch/dummy-1-alt1.noarch.rpm RPMS/conflLessEpochDisttag/noarch/conflLessEpochDisttag-1-alt1.noarch.rpm
error: Failed dependencies:
	dummy < 0:1-alt1:zzz+777.66 conflicts with conflLessEpochDisttag-1-alt1.noarch

OK: dummy-1-alt1.noarch.rpm is from another build (if built with the
"new" rpm-build, it would include the disttag in Provides). This form
of Conflicts is used to ensure that no subpackages from different
releases/builds get installed together. The difference in behavior
with the "new" rpm is explained by that the "new" rpm cannot
(unfortunately) detect this subtle mismatch.

* nonobsoleted_dummy_with_obsolLessEpochDisttag (and similar ones)

(like the previous case)

$ rpm -qp RPMS/obsolLessEpochDisttag/noarch/obsolLessEpochDisttag-1-alt1.noarch.rpm --obsoletes
dummy < 0:1-alt1:zzz+777.66
$ rpm -i RPMS/dummy/noarch/dummy-1-alt1.noarch.rpm RPMS/obsolLessEpochDisttag/noarch/obsolLessEpochDisttag-1-alt1.noarch.rpm
$ rpm -q dummy
package dummy is not installed

OK

* nonobsoleted_dummyDisttag_with_obsolLessEpochDisttag (and similar ones)

$ rpm -qp RPMS/dummyDisttag/noarch/dummy-1-alt1.noarch.rpm --provides
dummy = 1-alt1:zzz+777.66
$ rpm -qp RPMS/obsolLessEpochDisttag/noarch/obsolLessEpochDisttag-1-alt1.noarch.rpm --obsoletes
dummy < 0:1-alt1:zzz+777.66
$ rpm -i RPMS/dummyDisttag/noarch/dummy-1-alt1.noarch.rpm RPMS/obsolLessEpochDisttag/noarch/obsolLessEpochDisttag-1-alt1.noarch.rpm
$ rpm -q dummy
package dummy is not installed

NOT OK, but very improbable (the real name of the subpackage must be
the same as the obsoleted name of an older package, but the obsoleting
package is a different subpackage; so, it's improbable that one keeps
the old name of a subpackage, but wants to obsolete it with another
subpackage).

So, introducing this change to the %EVR value would make the new
packages be treated better by the "old" rpm; even the treatment in the
cases where the behavior is different from the behavior of the "new"
rpm is good (except for one improbable case).
2019-02-19 21:55:21 +03:00