#147 Use rawhide mock for test build
Closed: Fixed None Opened 11 years ago by vondruch.

It seems that Fedora review is using the "default" mock config for test builds [1]. This is wrong, since the default.cfg may point to whatever configuration. The review should be always done against Rawhide. Thank you for fixing this issue.

[1] https://fedorahosted.org/FedoraReview/browser/src/FedoraReview/mock.py#L66


Basically, the mock configuration is governed by the --mock-config parameter, which is passed verbatim as -r to mock. This in the two next lines in link above.

This said, the default option is of course questionable. However, since users are likely to run a "pure" mock build before running f-r, it does make sense to have the same default as mock. Thoughts?

Actually that is not the "same default". Since I was upgrading F16-F17, the default was to F16 and since it is config(noreplace), it will not get updated. Nowadays, it seems that the default is rawhide for mock [1].

Nevertheless, the Review should be always done for Rawhide, since that is where the package gets imported first. Therefore, Rawhide should be used as a default, no matter how mock is configured.

[1] http://pkgs.fedoraproject.org/cgit/mock.git/tree/mock.spec#n64

default mock config set to fedora-rawhide-x86_64 in bd6009d. Perhaps we could detect current architecture, but it seems excessive

Thank you.

BTW if you are running x86_64, then whatever architecture is chosen is OK IMO, but what about the case if you are running on i386 system? Not sure that it works. So it might be safer to go with i386 ...

I agree that i386 is a much safer default than x86_64.

Besides this I still wonder if this is the right solution. If people edit default.cfg, they do it for a reason (EPEL?) - shouldn't it be respected then? If not, it's really a question of how the mock update is handled, whether default.cfg is updated or not. Anyone who knows?

This default also breaks assertion that if the package builds in mock, it also builds in f-r.

In short, I'm not convinced that fedora-rawhide-whatever is a better default than 'default'. I don't know, really...

EDIT: sloppy reading... sorry. Reading comment:2, isn't here a bug in mock packaging? Shouldn't a default.cfg which is unchanged be updated?

Here is two conflicting objectives: to have f-r to behave like mock, or to use the version imported first. At a second thought, I tend to think that hardcoding rawhide actually is the Right Thing. It's just that I'm s slow learner (and sloppy reader)

OK, I have reverted that commit and scheduled fix for later until we properly decide right way to take

I have reported this issue for practical reasons.

Today, somebody was doing review for me and he came that f-r fails to build the package in mock, although in my review, I linked to build in Koji for Rawhide and I certainly build it locally several times. It turned out, that the f-r was attempting to build the package for F16, due to wrongly set default.cfg, where the package was always intended for Rawhide.

I am using mock extensively, but I did not noticed up until today, that also on my computer, default.cfg points to F16 configuration. Since I am always specifying the Fedora for which I build, I don't care about default. I'd like that people doing review for me would be successful without me helping them.

Point taken. Still, the more I think about this it seems like a bug in mock: default.cfg is not the kind of configuration which should be preserved, since it points to something which might even be removed over time.

I do recognize the problem, for sure. But having an old or danglink symlink as mock's default is a problem of it's own, and should be resolved in that context.

What f-r could do is to have the build root used much more visible: print the root in the report (at bottom), warning user if she's using a non-rawhide default configuration. But besides this, I tend to think that using mock's default as f-r's is actually the Right Way.

That is, as demonstrated here, not to say I can't change my mind.

Filed a mock bug: https://bugzilla.redhat.com/show_bug.cgi?id=858822

No activity in bug for three months. Since I feel we have come to some kind of conclusion (mock update is broken, handle "bad" defaults using visibility and warnings) I'm closing this bug. This is tentative, please reopen again if you feel that current behaviour still is wrong.

There are fixes: the mock version used id printed in report, warnings are issued if the mock config isn't rawhide. No references, sorry...(nothing visible in timeline, to old).

Login to comment on this ticket.

Metadata