Bug 841516 - fedpkg scratch-build error message should be improved to tell you how to do a scratch build without pushing
fedpkg scratch-build error message should be improved to tell you how to do a...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: fedpkg (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: cqi
Fedora Extras Quality Assurance
: EasyFix, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-19 05:29 EDT by Richard W.M. Jones
Modified: 2017-01-06 19:21 EST (History)
4 users (show)

See Also:
Fixed In Version: fedpkg-1.26-3.fc25 fedpkg-1.26-3.fc24 fedpkg-1.26-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-06 19:21:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-07-19 05:29:52 EDT
Description of problem:

$ fedpkg build --scratch
Could not execute build: There are unpushed changes in your repo

$ fedpkg scratch-build
Could not execute scratch_build: There are unpushed changes in your repo

It's correct that there are unpushed changes in my repo, but
why should that stop me from doing a scratch build?  After all,
the *point* of the scratch build is to let me test a change
without pushing it.

It should do the equivalent of 'fedpkg srpm' +
'koji build --scratch <disttag> *.srpm'

Version-Release number of selected component (if applicable):

fedpkg-1.9-1.fc17.noarch
Comment 1 Jesse Keating 2012-07-19 13:52:32 EDT
If you were to look at the options available to scratch-build you would find that you can in fact submit an srpm.  You can even cause an srpm to be created on the fly.

fedpkg scratch-build --srpm

Please do take a look at fedpkg scratch-build --help (or man fedpkg).
Comment 2 Richard W.M. Jones 2012-07-19 15:44:17 EDT
Firstly, fedpkg is good, but it's possible here to make it
better.  You could add this information to the error message.

Secondly I *have* read the man page, again just now, and I'm
still none the wiser on how to do this.  I assume from the
previous comment that adding --srpm would have done what I
wanted (including the build)?
Comment 3 Jesse Keating 2012-07-19 15:51:48 EDT
From the man page (same as from the --help)

usage: fedpkg scratch-build [-h] [--arches [ARCHES [ARCHES ...]]] [--md5]
                            [--nowait] [--target TARGET] [--background]
                            [--srpm [SRPM]]

This command will request a scratch build of the package. Without providing an
srpm, it will attempt to build the latest commit, which must have been pushed.
By default all approprate arches will be built.

optional arguments:
  -h, --help            show this help message and exit
  --arches [ARCHES [ARCHES ...]]
                        Build for specific arches
  --md5                 Use md5 checksums (for older rpm hosts)
  --nowait              Don't wait on build
  --target TARGET       Define build target to build into
  --background          Run the build at a low priority
  --srpm [SRPM]         Build from an srpm. If no srpm is provided with this
                        option an srpm will be generated from current module
                        content.


Of note the --srpm section, where it explains how to use it.

I'll grant you that the error output could be better when attempting to build without a push.  I believe that error is coming from the generic build function which all the build options eventually lead into.  Filed that upstream as https://fedorahosted.org/rpkg/ticket/22
Comment 5 Richard W.M. Jones 2016-04-25 05:33:20 EDT
Let's reopen this.  This message still exists and is still as wrong
as ever.

$ fedpkg scratch-build 
Could not execute scratch_build: There are unpushed changes in your repo

fedpkg-1.21-1.fc24.noarch
Comment 6 cqi 2016-08-23 06:08:17 EDT
Before pushing, please use ``scratch-build --srpm`` to make a scratch build.
Comment 7 Richard W.M. Jones 2016-08-23 06:19:00 EDT
The error message is still wrong.  See comment 5.

$ fedpkg scratch-build
Could not execute scratch_build: /home/rjones/d/fedora/grep/f25 has uncommitted changes.  Use git status to see details

fedpkg-1.23-1.fc24.noarch
Comment 8 Lubomír Sedlář 2016-08-23 06:22:27 EDT
How would you change the message?

Technically the error is correct: you are asking fedpkg to do a build from git, but have unpushed changes.

Maybe adding something like this might be enough?

    Use --srpm option if you want to build unpushed content.
Comment 9 Richard W.M. Jones 2016-08-23 07:19:40 EDT
Sure.  Since it's completely non-obvious that "--srpm" means
"yes, really, do a scratch build", it should say that.
Comment 10 cqi 2016-09-08 05:08:05 EDT
I'm wondering why you consider "Could not execute scratch_build: There are unpushed changes in your repo" is wrong in comment 7.
Comment 11 Pavol Babinčák 2016-09-21 03:34:17 EDT
I guess fedpkg can provide a hint like:

Hint: you can create srpm from your local unpushed changes with --srpm (without parameter) which will be then uploaded and submited for a scratch-build.

Or maybe something more readable.
Comment 12 cqi 2016-11-25 01:17:22 EST
PR: https://pagure.io/rpkg/pull-request/155
Comment 13 cqi 2016-11-28 07:08:32 EST
Patch is merged in upstream.
Comment 14 Fedora Update System 2016-12-07 08:13:50 EST
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 15 Fedora Update System 2016-12-07 08:15:48 EST
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 16 Fedora Update System 2016-12-07 08:18:48 EST
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 17 Fedora Update System 2016-12-07 23:52:34 EST
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 18 Fedora Update System 2016-12-07 23:56:10 EST
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 19 Fedora Update System 2016-12-08 00:48:31 EST
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 20 Fedora Update System 2016-12-09 06:34:39 EST
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 21 Fedora Update System 2016-12-09 06:38:00 EST
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 22 Fedora Update System 2016-12-09 06:39:57 EST
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 23 Fedora Update System 2016-12-09 22:56:05 EST
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 24 Fedora Update System 2016-12-09 23:28:16 EST
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 25 Fedora Update System 2016-12-10 00:53:15 EST
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 26 Fedora Update System 2016-12-12 19:56:24 EST
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 27 Fedora Update System 2016-12-12 20:05:39 EST
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 28 Fedora Update System 2016-12-12 20:09:56 EST
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 29 Fedora Update System 2016-12-13 21:23:26 EST
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 30 Fedora Update System 2016-12-13 21:23:42 EST
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 31 Fedora Update System 2016-12-13 22:50:13 EST
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 32 Fedora Update System 2016-12-15 18:31:10 EST
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 33 Fedora Update System 2016-12-15 19:26:10 EST
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 34 Fedora Update System 2016-12-15 22:53:44 EST
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 35 Fedora Update System 2016-12-16 07:01:56 EST
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 36 Fedora Update System 2016-12-16 19:51:21 EST
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 37 Fedora Update System 2016-12-19 10:21:49 EST
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 38 Fedora Update System 2016-12-20 03:51:38 EST
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 39 Fedora Update System 2017-01-06 19:21:12 EST
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.