Bug 841516 - fedpkg scratch-build error message should be improved to tell you how to do a scratch build without pushing
Summary: fedpkg scratch-build error message should be improved to tell you how to do a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: cqi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-19 09:29 UTC by Richard W.M. Jones
Modified: 2017-01-07 00:21 UTC (History)
4 users (show)

Fixed In Version: fedpkg-1.26-3.fc25 fedpkg-1.26-3.fc24 fedpkg-1.26-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-07 00:21:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-07-19 09:29:52 UTC
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 17:52:32 UTC
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 19:44:17 UTC
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 19:51:48 UTC
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 09:33:20 UTC
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 10:08:17 UTC
Before pushing, please use ``scratch-build --srpm`` to make a scratch build.

Comment 7 Richard W.M. Jones 2016-08-23 10:19:00 UTC
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 10:22:27 UTC
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 11:19:40 UTC
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 09:08:05 UTC
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 07:34:17 UTC
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 06:17:22 UTC
PR: https://pagure.io/rpkg/pull-request/155

Comment 13 cqi 2016-11-28 12:08:32 UTC
Patch is merged in upstream.

Comment 14 Fedora Update System 2016-12-07 13:13:50 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 15 Fedora Update System 2016-12-07 13:15:48 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 16 Fedora Update System 2016-12-07 13:18:48 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 17 Fedora Update System 2016-12-08 04:52:34 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 18 Fedora Update System 2016-12-08 04:56:10 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 19 Fedora Update System 2016-12-08 05:48:31 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 20 Fedora Update System 2016-12-09 11:34:39 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 21 Fedora Update System 2016-12-09 11:38:00 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 22 Fedora Update System 2016-12-09 11:39:57 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 23 Fedora Update System 2016-12-10 03:56:05 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 24 Fedora Update System 2016-12-10 04:28:16 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 25 Fedora Update System 2016-12-10 05:53:15 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 26 Fedora Update System 2016-12-13 00:56:24 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 27 Fedora Update System 2016-12-13 01:05:39 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 28 Fedora Update System 2016-12-13 01:09:56 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 29 Fedora Update System 2016-12-14 02:23:26 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 30 Fedora Update System 2016-12-14 02:23:42 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 31 Fedora Update System 2016-12-14 03:50:13 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 32 Fedora Update System 2016-12-15 23:31:10 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 33 Fedora Update System 2016-12-16 00:26:10 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 34 Fedora Update System 2016-12-16 03:53:44 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 35 Fedora Update System 2016-12-16 12:01:56 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 36 Fedora Update System 2016-12-17 00:51:21 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 37 Fedora Update System 2016-12-19 15:21:49 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 38 Fedora Update System 2016-12-20 08:51:38 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 39 Fedora Update System 2017-01-07 00:21:12 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.