Bug 785234 - fedpkg: wrong build target
Summary: fedpkg: wrong build target
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-01-27 17:47 UTC by Rex Dieter
Modified: 2013-01-10 06:42 UTC (History)
2 users (show)

Fixed In Version: fedpkg-1.9-1.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-03-31 02:57:37 UTC
Type: ---

Attachments (Terms of Use)

Description Rex Dieter 2012-01-27 17:47:15 UTC
Was building a pkg from master/ branch in git today, and was more than a little surprised to see that the build went against f16-updates-candidate target, instead of f17-candidate as I'd expect.

I strongly suspect it had to do with this particular pkg (kdebindings) had only active git branches:  f15, devel , and that fedpkg tries to guess what target to use for master/ based on the latest active branch and adding one? :)

Either way, it ended up getting it wrong in this case, and hopefully can be fixed.

Comment 1 Rex Dieter 2012-01-27 17:49:00 UTC
To be clearer, when I said "active git branches", I guess I really meant "active branches in pkgdb", where pkgdb devel maps to git master/

Comment 2 Jesse Keating 2012-01-27 18:00:57 UTC
oh boo.  How often does this happen where a package will skip a branch like this?  I suppose if it gets retired at some point and brought back...  *sigh*.  I'll have to come up with a different algorithm to find out what master should map to.

Comment 3 Rex Dieter 2012-01-27 18:11:11 UTC
How often?  I'd guess not a lot, may not be worth worrying too much about.

Comment 4 Jaromír Cápík 2012-02-29 13:59:12 UTC

This happens when the remote master branch is switched to a new release, whilst the local master branch stays at the older version. You need to do 'git pull' in order to workaround that (and that's not so easy when some changes have been already made locally), but anyway it isn't nice that the build succeeds with wrong release whilst in fact it is not pushed to the corresponding remote branch.

This really needs to be fixed in fedpkg.


Comment 5 Jesse Keating 2012-03-03 00:38:45 UTC
Hrm, this is a tough one.  I realized that for doing builds, we have an optimization that looks to see if the build has already been done in the system.  To know that, we have to know what the n-v-r of the build would be, which includes the dist macro.  This means that even if we just hardcode the use of 'rawhide' build target for master, we still have to figure out what Fedora that targets.

If we don't do the optimization to see if a build has already been done, then users would have to wait for a koji builder init a chroot to do the scm checkout and srpm creation from SCM before it would know what the n-v-r of the build would be, and /then/ potentially have the build failed.  That could be a waste of many minutes.

I'm going to think on this some more.

Comment 6 Jesse Keating 2012-03-05 22:06:00 UTC
Ok, I've committed something that might help.  If we're doing a real build command, we've already got a koji session opened up.  I can detect that and just query koji for what the rawhide target is pointing to.  This will get us accurate information for what the n-v-r might be.  If we don't already have a koji session, we might be doing offline local work, in which case just look at local data.

It's in commit c97e877e20ac9ddc71a8d34edbf97e2071f5a8d4

Comment 7 Fedora Update System 2012-03-12 23:56:11 UTC
rpkg-1.14-1.fc16,fedpkg-1.9-1.fc16 has been submitted as an update for Fedora 16.

Comment 8 Fedora Update System 2012-03-12 23:56:46 UTC
fedpkg-1.9-1.fc15,rpkg-1.14-1.fc15 has been submitted as an update for Fedora 15.

Comment 9 Fedora Update System 2012-03-12 23:57:16 UTC
fedpkg-1.9-1.fc17,rpkg-1.14-1.fc17 has been submitted as an update for Fedora 17.

Comment 10 Fedora Update System 2012-03-13 17:10:34 UTC
Package fedpkg-1.9-1.fc17, rpkg-1.14-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fedpkg-1.9-1.fc17 rpkg-1.14-1.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2012-03-31 02:57:37 UTC
fedpkg-1.9-1.fc15, rpkg-1.15-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-03-31 03:20:49 UTC
fedpkg-1.9-1.fc16, rpkg-1.15-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2012-04-12 02:06:29 UTC
fedpkg-1.9-1.fc17, rpkg-1.15-1.fc17 has been pushed to the Fedora 17 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.