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
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.
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.
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
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.
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
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.
Could you try this again? This should be fixed in rhpkg in commit bdf970ea89b8. Reopen this bug as it could also happen in fedpkg.
Fixed in https://pagure.io/rpkg/pull-request/76
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
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
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
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
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
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.