Bug 675140 - koji should be able to download a scratch build
Summary: koji should be able to download a scratch build
Alias: None
Product: Fedora
Classification: Fedora
Component: koji
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Adam Williamson
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-02-04 12:53 UTC by Petr Machata
Modified: 2019-02-07 12:58 UTC (History)
26 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2016-05-23 21:09:08 UTC
Type: ---

Attachments (Terms of Use)

Description Petr Machata 2011-02-04 12:53:32 UTC
Description of problem:
Koji can't download a scratch build.

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

How reproducible:

Steps to Reproduce:
1. Pick a scratch build
   e.g. http://koji.fedoraproject.org/koji/taskinfo?taskID=2760766
   (Which is actually a task.  If there is actual build available, I don't know what it's number is.)
2. issue "koji download-build 2760766"
Actual results:
No such build: 2760766

Expected results:
Starts downloading packages.

Comment 1 Steve Tyler 2011-04-04 17:03:21 UTC
Thanks for opening this bug.

There is a script to download scratch builds.
Why not package it with koji-utils?


$ download-scratch.py --help
Usage: download-scratch.py [options] task-ID [task-ID...]

  -h, --help   show this help message and exit
  --arch=ARCH  Only download packages of the given arch (may be specified
               multiple times)

Example usage:
$ download-scratch.py 2971231 --arch=x86_64

What is the "official" way to download scratch builds from Koji?
David Malcolm
Tue, 16 Mar 2010 11:58:26 -0700

Here is a patch to koji submitted by lkundrak on 09/09/10 22:24:21:

[PATCH] Add option to get task output to download-build
download-build --task to get rpms given a task id, analogously to what is done for build id. Makes it possible to easily get packages from a scratch build.

See also:

koji download-build for scratch builds

Comment 2 Steve Tyler 2011-04-05 09:23:22 UTC
Jiri Moskovcak has written a scratch downloader with a GUI:

(In reply to comment #10)
> [1] abrt has so many packages, I thought it would good to use koji to download
> them. Instead, there is:
> Bug 675140 - koji should be able to download a scratch build

- I wrote a scratch downloader, you can download it here:

the usage is: 
./koji_downloader -u <user who owns the build> -t <task_id>

so in this case:

./koji_downloader -u npajkovs -t 2971231

Copied from Bug 692590, Comment 13.

Comment 3 Jaroslav Škarvada 2012-07-30 12:18:25 UTC
Please fix it, it is really annoying that koji can't do it out of the box. This feature if implemented should save me considerable amount of time. There is also https://fedorahosted.org/koji/ticket/237

Comment 4 Ivan Romanov 2012-10-10 01:36:55 UTC
it is affected me too.

Comment 5 Jeff Peeler 2013-01-15 17:23:14 UTC
FWIW, koji-download-scratch is packaged in fedora-review.

Comment 6 Fedora End Of Life 2013-04-03 18:08:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

Comment 7 Karel Zak 2015-02-10 09:23:07 UTC
4 years old report, 19 people in CC, the same issue opened 3 years ago on koji upstream (the report contains a patch!):

... guys, it's pretty difficult to stay polite, really.

Comment 9 Milan Broz 2015-06-05 08:10:42 UTC
This is quite important feature!

Is there at least a plan when downloading of scratch build could appear in tools?

I see no response (ditto for ticket in comment#7), it would be nice to know if we should still write ugly scripts or there is a hope than the feature will be merged eventually.


Comment 10 Adam Williamson 2015-07-30 19:19:35 UTC
Milan: you can at least install fedora-review and use koji-download-scratch . Note its defaults are a bit different from koji's: it downloads log files and debuginfo packages. (I've just sent sochotni a patch to make those optional).

But it would be nice to get this merged, so we'd only need one tool and the behaviour would be consistent (and we wouldn't need to install all of fedora-review and its deps just to download scratch builds).

Comment 11 Milan Broz 2015-07-31 09:26:14 UTC
Well, for years I ended with this crazy script (and the whole point of this bug is avoid such a constructions... :)

wget -q -O - "$URL" | grep 'href="[^"]*\.rpm"' | wget -l0 -nd -A .rpm -F -i - -B "$URL/index.html"

Comment 12 Adam Williamson 2015-07-31 09:38:06 UTC
Dennis merged the #237 patch today. I'll probably send a patch to make it behave more similarly to download-build in a couple of ways tomorrow.


Comment 13 Pavol Babinčák 2015-09-03 09:19:04 UTC
Reassigning to Adam: https://bugzilla.redhat.com/show_bug.cgi?id=675140#c12

Comment 14 Victor Costan 2015-11-11 19:16:18 UTC
Please implement this. I got asked to test out a scratch build in response to a bug [1], and it took a while to figure out why the koji CLI tool wouldn't fetch it for me.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1275593

Comment 15 Adam Williamson 2015-11-11 19:49:56 UTC
It's already in git, just needs package builds...

Comment 16 Victor Costan 2015-11-12 06:11:48 UTC
Thank you for clarifying! Please consider my comment to say "please ship this" instead.  I think and hope that making testing easier will get Fedora more testers.

Comment 17 Mike McCune 2016-03-28 22:18:06 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions

Comment 18 Dan Callaghan 2016-05-23 20:50:57 UTC
It looks like this new command got renamed to download-task, and is released in 1.10.1... Should this bug be closed?

Comment 19 Richard W.M. Jones 2016-05-23 21:09:08 UTC
Looks like it.

Note You need to log in before you can comment on or make changes to this bug.