#106 Renaming a spec file in a newer version causes the build to fail
Closed 6 years ago Opened 6 years ago by jschwart.

It's about this COPR: https://copr.fedorainfracloud.org/coprs/jschwart/firefox-allext/builds/

I first submitted 52.1 with a spec file named: firefox-allext-copr.spec
Then I submitted 52.2 with a spec file named: firefox-allext.spec

This causes the second build to fail.


Thanks for the report.

Then I submitted 52.2 with a spec file named: firefox-allext.spec

You've renamed the package; thus copr should create completely new dist-git repository (module) in such case.

Yes, the problem is probably that the old spec file was kept in the in dist-git repository while it should have been removed as no longer present in the new src.rpm. We will continue to investigate the problem.

Yes, the problem is probably that the old spec file was kept in the in dist-git repository while it should have been removed

Nope, you never know what files you can and can not remove from dist-git repo ... so please don't remove anything... The issue is that detecting dist-git module name is over-engineered for unexplained reasons (at least so far nobody explained why we parse the Name).

Simply, 'FOO.spec' should be imported into 'FOO.git'. Mistakenly importing BAZ.spec with broken 'Name: FOO' now just inadvertedly damages valid FOO's dist-git repo...

Metadata Update from @clime:
- Issue assigned to clime

6 years ago

Simply, 'FOO.spec' should be imported into 'FOO.git'. Mistakenly importing
BAZ.spec with broken > 'Name: FOO' now just inadvertedly damages valid FOO's
dist-git repo...

Btw. I know that such issues might happen (especially during SCL development).
@clime, could you please defense the idea about parsing spec file first before fixing?

Yeah, I'm ignored again (commit fc3cd97 and 8c89826). @clime let's please at least review the opt-out knob https://pagure.io/copr/copr/pull-request/107 otherwise I'm forced to do downstream patching. We can discuss on today's meeting what are the real reasons for the 'Name' parsing hack ...

@clime answered the "why" question, thanks: We want to stay backward compatible with previous copr-dist-git version. But the code is actually not backward compatible -- previously, if you imported [1] SRPM, dist-git would go and import the code into 'sclo-postgresql96-postgresql'. But now you (newly) import into 'postgresql'...

[1] https://copr-be.cloud.fedoraproject.org/results/%40db-sig/sclo-postgresql96/epel-6-x86_64/00582330-postgresql/sclo-postgresql96-postgresql-9.6.3-9.el6.src.rpm

IOW: Previously we imported from 'Name' baked into SRPM, but now we import from 'Name' expanded on dist-git. Those are completely different things.

It's about this COPR: https://copr.fedorainfracloud.org/coprs/jschwart/firefox-allext/builds/
I first submitted 52.1 with a spec file named: firefox-allext-copr.spec
Then I submitted 52.2 with a spec file named: firefox-allext.spec
This causes the second build to fail.

Fixed by https://pagure.io/copr/copr/c/0513a8464c6075a5aa5082f3671211474dfcd301?branch=master.

Metadata Update from @clime:
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata