Bug 1211978 - mock does not use "yum-deprecated" if yum >= 3.4.3-505 is installed
Summary: mock does not use "yum-deprecated" if yum >= 3.4.3-505 is installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedBlocker
: 1208912 1210398 1213859 1214432 1214902 1216164 1217700 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-15 10:50 UTC by Daniel Mach
Modified: 2015-06-20 21:13 UTC (History)
24 users (show)

Fixed In Version: mock-1.2.10-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-01 16:51:16 UTC
Type: Bug


Attachments (Terms of Use)

Description Daniel Mach 2015-04-15 10:50:33 UTC
Reproducer:
$ mock -r fedora-22-x86_64 --rebuild <srpm>

It ends with an error caused by missing 'yum resolvedep' command, which is not part of dnf:
http://dnf.readthedocs.org/en/latest/cli_vs_yum.html#no-resolvedep-command

Workaround:
put following line into mock config:
config_opts['package_manager'] = 'dnf'

Comment 1 Radek Holy 2015-04-15 13:35:03 UTC
This is really unfortunate. I wonder whether we could avoid this big mistake.

1) DNF does not provide the "resolvedep" command. On the other hand, looking into the code of mock, mock does not need the command if it uses DNF.

2) YUM bumped just release number when it renamed "/usr/bin/yum" to "/usr/bin/yum-deprecated". On the other hand, I don't know whether CLI changes must be reflected in the package version somehow. I mean from point of view of version semantics.

3) Mock nevertheless requires just "yum >= 2.4" so any version change could not prevent a breakage of the affected system.

4) Neither dnf-yum nor the latest yum does Conflicts: with mock to prevent the breakage. On the other hand, neither DNF nor YUM does conflict with mock from the point of view of the Conflicts: tag.

So, we should definitely let mock know about this change in advance but either doing that it could not prevent breakage of systems with an old mock and the latest YUM. Now, I can only express my apologies.

Because of the reasons above, I think that the only correct solution in this situation is to fix mock so that it uses "/usr/bin/yum" if yum < 3.4.3-505 is installed and "/usr/bin/yum-deprecated" otherwise.

Comment 2 Miroslav Suchý 2015-04-15 16:21:11 UTC
Yum is called on host. So this only happen if your host machine is F22+.
So the solution can probably to ship config /etc/mock/site-defaults.cfg for F22+ with:
config_opts['yum_command'] = '/usr/bin/yum-deprecated'

Radek, yum-deprecated will be only F22+. Older Fedoras and RHELs will never get /usr/bin/yum-deprecated. Just want to make sure. Can you confirm?

Comment 3 Radek Holy 2015-04-16 07:11:30 UTC
(In reply to Miroslav Suchý from comment #2)
> Yum is called on host. So this only happen if your host machine is F22+.
> So the solution can probably to ship config /etc/mock/site-defaults.cfg for
> F22+ with:
> config_opts['yum_command'] = '/usr/bin/yum-deprecated'

Just in case: I assume that you've noticed that the executable is called 'yum-deprecated' only with yum-3.4.3-505+. I mean e.g. this patch may break e.g. Rawhide systems with an old YUM version. But maybe it's OK to assume that no system with F22+ has yum < 3.4.3-505... Or maybe you are also going to require the newest YUM... Anyway, it's up to you. I just wanted to be sure that you've noticed that.

> Radek, yum-deprecated will be only F22+. Older Fedoras and RHELs will never
> get /usr/bin/yum-deprecated. Just want to make sure. Can you confirm?

Yes, that's the plan, AFAIK.

Comment 4 Miroslav Suchý 2015-04-16 11:34:35 UTC
Yes,
  config_opts['yum_command'] = '/usr/bin/yum-deprecated'
do that job.

Fixed in:
* 0e41ca4 on F22+ use yum-deprecated instead of yum [RHBZ#1211978]

Comment 5 Miroslav Suchý 2015-04-20 15:28:40 UTC
*** Bug 1210398 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Suchý 2015-04-20 15:30:20 UTC
*** Bug 1208912 has been marked as a duplicate of this bug. ***

Comment 7 Miroslav Suchý 2015-04-21 15:57:01 UTC
*** Bug 1213859 has been marked as a duplicate of this bug. ***

Comment 8 Adam Williamson 2015-04-21 17:01:35 UTC
Why don't we fix mock to use dnf instead of yum? The whole point of deprecating yum is that things aren't supposed to use it any more, not just that they switch over to use the yum-deprecated command.

Comment 9 Miroslav Suchý 2015-04-21 18:08:52 UTC
Because it is not easy.
We already switched mock to use DNF for rawhide (F23+). We decided (after lot of discussion) to *not* use DNF for F22 because all F22 packages was already built by yum, so it can bring some regression and unexpected differences (koji use yum, local builds using mock would use DNF). Therefore we - just after branching of F23 - switched mock to use DNF for mock. Just to have some initial feedback before we deploy that change on Koji. And the plan is (pretty soon) start building F23 using DNF on Koji too.

The presence of /usr/bin/yum-deprecated in F22 was quite unexpected (to me). Therefore this bug.
I am working on other mock bugs right now and I expect new mock release within one week.

Comment 10 Miroslav Suchý 2015-04-23 05:19:35 UTC
*** Bug 1214432 has been marked as a duplicate of this bug. ***

Comment 11 Radek Holy 2015-04-24 09:09:53 UTC
*** Bug 1214902 has been marked as a duplicate of this bug. ***

Comment 12 Miroslav Suchý 2015-04-28 17:51:49 UTC
*** Bug 1216164 has been marked as a duplicate of this bug. ***

Comment 13 David Gay 2015-04-28 21:48:02 UTC
Discussed at the 2015-04-28 blocker review meeting.[1] Voted as RejectedBlocker.

We're not aware of any case where this bug affects release-critical or critpath components, so it could be fixed as a regular update if necessary.

[1]: http://meetbot.fedoraproject.org/fedora-blocker-review/2015-04-28/

Comment 14 Fedora Update System 2015-04-29 13:16:57 UTC
mock-1.2.8-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc22

Comment 15 Fedora Update System 2015-04-29 13:17:21 UTC
mock-1.2.8-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc21

Comment 16 Fedora Update System 2015-04-29 13:18:01 UTC
mock-1.2.8-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc20

Comment 17 Fedora Update System 2015-04-29 13:19:26 UTC
mock-1.2.8-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.el7

Comment 18 Fedora Update System 2015-04-29 13:26:04 UTC
mock-1.2.8-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.el6

Comment 19 Fedora Update System 2015-04-29 19:19:11 UTC
Package mock-1.2.8-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.2.8-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6057/mock-1.2.8-1.el7
then log in and leave karma (feedback).

Comment 20 Michael Simacek 2015-05-01 09:37:19 UTC
*** Bug 1217700 has been marked as a duplicate of this bug. ***

Comment 21 Fedora Update System 2015-05-01 16:51:16 UTC
mock-1.2.8-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-05-02 18:08:55 UTC
mock-1.2.8-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2015-05-12 20:47:10 UTC
mock-1.2.8-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2015-06-04 11:42:27 UTC
mock-1.2.10-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.10-1.el7

Comment 25 Fedora Update System 2015-06-04 11:43:06 UTC
mock-1.2.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.10-1.el6

Comment 26 Fedora Update System 2015-06-20 21:10:50 UTC
mock-1.2.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2015-06-20 21:13:44 UTC
mock-1.2.10-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.