#4283 koji download-build doesn't work for scratch build?
Closed: Fixed by tkopecek. Opened by jaruga.

I am using the following RPM packages on Fedora Linux 40.

$ rpm -q fedpkg
fedpkg-1.45-5.fc40.noarch
$ rpm -q koji
koji-1.35.1-2.fc40.noarch

I built the scratch build by the following command.

$ fedpkg --release rawhide scratch-build --srpm --nowait --arches x86_64

Then the build ID is 127490511.
https://koji.fedoraproject.org/koji/taskinfo?taskID=127490511

The x86_64 task ID is 127490525.
https://koji.fedoraproject.org/koji/taskinfo?taskID=127490525

Then it looks koji download-build doesn't work for the scratch build. Is this expected behavior I cannot find the document by the koji download-build --help. If this is expected, I want to see the document includes this thing.

$ koji --debug download-build --arch=x86_64 --arch=noarch 127490511
2025-01-03 12:40:32,194 [DEBUG] koji: Opening new requests session
No such build: 127490511
$ koji --debug download-build --task-id 127490525
2025-01-03 14:07:17,388 [DEBUG] koji: Opening new requests session
No associated builds for task 127490525

The koji download-task works.

$ koji download-task 127490525
Downloading [1/35]: rubygem-rdoc-6.6.3.1-19.fc42.noarch.rpm
[====================================] 100% 462.97 KiB / 462.97 KiB
Downloading [2/35]: ruby-debugsource-3.3.6-19.fc42.x86_64.rpm
[====================================] 100% 3.96 MiB / 3.96 MiB
...
Downloading [35/35]: rubygems-devel-3.5.22-19.fc42.noarch.rpm
[====================================] 100% 14.19 KiB / 14.19 KiB

For non-scratch build such as https://koji.fedoraproject.org/koji/buildinfo?buildID=2602582, the koji download-build works.

$ koji download-build --arch=x86_64 --arch=noarch 2602582
Downloading [1/24]: ruby-doc-3.3.6-18.fc42.noarch.rpm
[====================================] 100% 4.47 MiB / 4.47 MiB
...
Downloading [24/24]: ruby-devel-3.3.6-18.fc42.x86_64.rpm
[====================================] 100% 289.77 KiB / 289.77 KiB

Scratch builds are not imported into the database as builds. They do not have build entries, nor build ids. No command or call that requires a build entry specification will work with a scratch build.

You have already discovered the way to do this -- download-task

Metadata Update from @mikem:
- Custom field Size adjusted to None

Hi, thanks for the answer.

All right. So, what do you think about documenting this topic in the output of the koji download-build --help?

Perhaps #4286

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.35.2

Commit aa54d705 fixes this issue

Metadata Update from @tkopecek:
- Issue tagged with: doc, no_qe

Thanks for fixing this issue! The fix looks great!

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/4283

Please continue any further discussion there.

Metadata
Related Pull Requests