Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1169663 - Build stops with "Could not execute scratch_build: There are unpushed changes in your repo" when there are no unpushed changes in the current branch
Summary: Build stops with "Could not execute scratch_build: There are unpushed changes...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpkg
Version: 22
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: cqi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-02 06:54 UTC by Brad Hubbard
Modified: 2017-01-07 00:21 UTC (History)
9 users (show)

Fixed In Version: rpkg-1.47-5.fc25 rpkg-1.47-5.fc24 rpkg-1.47-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-07 00:21:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
rpkg patch to fix the issue (2.08 KB, application/mbox)
2014-12-03 09:12 UTC, Boris Ranto
no flags Details

Description Brad Hubbard 2014-12-02 06:54:51 UTC
Description of problem:

[kernel]$ rhpkg -v --debug --dist rhel-6.5 scratch-build --arches x86_64 --target test
Creating repo object from /home/brad/working/src/dist-git/kernel
Could not execute scratch_build: There are unpushed changes in your repo
[kernel]$ git status
On branch private-brad-test
Your branch is up-to-date with 'origin/private-brad-test'


Version-Release number of selected component (if applicable):
rhpkg-1.19-1.fc20.noarch

How reproducible:
100% for me

Steps to Reproduce:
1. Create a branch
2. Push changes
3. Try to build using "--dist" flag

Actual results:
Could not execute scratch_build: There are unpushed changes in your repo

Expected results:
Successful build

Additional info:

Boris Ranto identified the commit that introduced the problematic behaviour.
https://git.fedorahosted.org/cgit/rpkg.git/commit/?id=b947d5b16492bd1ca1668b44b0964cd5edd6b8f8

Comment 1 Boris Ranto 2014-12-02 07:33:41 UTC
Quoting from the e-mail conversation:

"""The problem is that the branch_merge property is now set to <dist> if --dist flag is supplied via command line (see load_branch_merge function). This means that rhpkg will use the remote branch associated with the --dist flag (in this case origin/rhel-6.5) to get the comparison of the committed data, i.e. it will compare origin/<dist> to <active_branch> instead of origin/<active_branch> to <active_branch>. This essentially means that if you commit anything to your private branch and use the dist flag then you get the error message because your private branch won't be in sync with the remote branch associated with the --dist flag and this is definitely a bug."""


I wonder whether this can be fixed in load_branch_merge (are there any uses of branch_merge that depend on its current behaviour?) or whether the patch needs to be reverted in order to fix it.

Comment 2 Boris Ranto 2014-12-03 09:12:09 UTC
Created attachment 964066 [details]
rpkg patch to fix the issue

I debugged it a bit more and the problem is that branch_merge is always overridden by dist attribute (if it is set) while it should be overridden only if the branch_merge attribute could not have been found.

I'm attaching the patch that fixes the problem.

Comment 3 Jon Thomas 2015-01-22 14:21:55 UTC
fyi, with the patch I get a failure earlier in the process:


rhpkg -v --dist=mrg-rhel-6 prep
Creating repo object from /home/jrthomas/dwa/condor
Could not execute prep: local variable 'merge' referenced before assignment

Comment 4 Boris Ranto 2015-01-22 20:21:25 UTC
Yeah, there is the bug if you work on local branches that should be fixed. It should suffice to move the last two lines to the second (last) 'try:' code block.

You can push the branch upstream (rhpkg -u origin <your_branch>) and it should work just fine. If you want to perform a build you might need to set a build target though:

rhpkg --dist=mrg-rhel-6 build --scratch --target=<some_brew_target>

'brew list-targets' will show you all the available build targets.

Comment 5 Jaroslav Reznik 2015-03-03 17:05:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Fedora End Of Life 2016-07-19 20:20:44 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 cqi 2016-07-21 08:45:13 UTC
Could you try this again? This should be fixed in rhpkg in commit bdf970ea89b8. Reopen this bug as it could also happen in fedpkg.

Comment 8 cqi 2016-07-22 07:09:06 UTC
Fixed in https://pagure.io/rpkg/pull-request/76

Comment 9 Fedora Update System 2016-12-07 13:14:09 UTC
fedpkg-1.26-1.fc25 rpkg-1.47-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ea5bded2cf

Comment 10 Fedora Update System 2016-12-07 13:16:04 UTC
fedpkg-1.26-1.fc24 rpkg-1.47-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a383ccbf57

Comment 11 Fedora Update System 2016-12-07 13:19:03 UTC
fedpkg-1.26-1.el7 rpkg-1.47-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 12 Fedora Update System 2016-12-08 04:52:47 UTC
fedpkg-1.26-1.fc24, rpkg-1.47-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a383ccbf57

Comment 13 Fedora Update System 2016-12-08 04:56:21 UTC
fedpkg-1.26-1.fc25, rpkg-1.47-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ea5bded2cf

Comment 14 Fedora Update System 2016-12-08 05:48:44 UTC
fedpkg-1.26-1.el7, rpkg-1.47-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 15 Fedora Update System 2016-12-09 11:35:09 UTC
fedpkg-1.26-2.el7 rpkg-1.47-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 16 Fedora Update System 2016-12-09 11:38:17 UTC
fedpkg-1.26-2.fc24 rpkg-1.47-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a383ccbf57

Comment 17 Fedora Update System 2016-12-09 11:40:13 UTC
fedpkg-1.26-2.fc25 rpkg-1.47-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ea5bded2cf

Comment 18 Fedora Update System 2016-12-10 03:56:18 UTC
fedpkg-1.26-2.fc25, rpkg-1.47-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ea5bded2cf

Comment 19 Fedora Update System 2016-12-10 04:28:27 UTC
fedpkg-1.26-2.fc24, rpkg-1.47-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a383ccbf57

Comment 20 Fedora Update System 2016-12-10 05:53:27 UTC
fedpkg-1.26-2.el7, rpkg-1.47-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 21 Fedora Update System 2016-12-13 00:56:49 UTC
fedpkg-1.26-3.fc25 rpkg-1.47-5.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ea5bded2cf

Comment 22 Fedora Update System 2016-12-13 01:05:55 UTC
fedpkg-1.26-3.fc24 rpkg-1.47-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a383ccbf57

Comment 23 Fedora Update System 2016-12-13 01:10:11 UTC
fedpkg-1.26-3.el7 rpkg-1.47-5.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 24 Fedora Update System 2016-12-14 02:23:38 UTC
fedpkg-1.26-3.fc25, rpkg-1.47-5.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ea5bded2cf

Comment 25 Fedora Update System 2016-12-14 02:23:54 UTC
fedpkg-1.26-3.fc24, rpkg-1.47-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a383ccbf57

Comment 26 Fedora Update System 2016-12-14 03:50:26 UTC
fedpkg-1.26-3.el7, rpkg-1.47-5.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 27 Fedora Update System 2016-12-15 23:31:24 UTC
fedpkg-1.26-3.fc25, rpkg-1.47-5.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2016-12-16 00:26:22 UTC
fedpkg-1.26-3.fc25, rpkg-1.47-5.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 29 Fedora Update System 2016-12-16 03:53:56 UTC
fedpkg-1.26-3.fc24, rpkg-1.47-5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2016-12-16 12:02:12 UTC
fedpkg-1.26-4.el7 rpkg-1.47-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 31 Fedora Update System 2016-12-17 00:51:34 UTC
fedpkg-1.26-4.el7, rpkg-1.47-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 32 Fedora Update System 2016-12-19 15:22:16 UTC
fedpkg-1.26-4.el7 rpkg-1.47-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 33 Fedora Update System 2016-12-20 08:51:51 UTC
fedpkg-1.26-4.el7, rpkg-1.47-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 34 Fedora Update System 2017-01-07 00:21:26 UTC
fedpkg-1.26-4.el7, rpkg-1.47-7.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.