#13 print out more information when lookaside cache is missing
Closed Opened by dustymabe.

Using copr build from a github dist-git fork, we were seeing errors because there was a sources file (because it was forked from dist-git) but no lookaside cache exists for github. The error on build we were seeing was:

Running: rpkg -C /etc/rpkg.conf srpm --outdir /var/lib/copr-rpmbuild/results/tmpaq5b458e --spec /tmp/tmpkewebiyt/rust-packaging/rust-packaging.spec
cmd: ['rpkg', '-C', '/etc/rpkg.conf', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results/tmpaq5b458e', '--spec', '/tmp/tmpkewebiyt/rust-packaging/rust-packaging.spec']
cwd: /tmp/tmpkewebiyt/rust-packaging
rc: 0
stdout: Downloading rust2rpm-5.tar.xz
Remove downloaded invalid file /tmp/tmpkewebiyt/rust-packaging/rust2rpm-5.tar.xz
stderr: Server returned status code 404

however, to the untrained eye it wasn't clear that it was trying to download from a lookaside cache rather than just pulling the actual source over the URL from source0 in the spec file. It would be good if we could get more output here letting us know it was trying a lookaside cache and for what domain:

Downloading rust2rpm-5.tar.xz from lookaside cache for github.com

It would even be better if the tool could detect if a lookaside cache existed at all for a given domain and print out a message to the user if it didn't. i.e. in this case it would way no lookaside cache exists for github.com, are you sure you should be including a sources file in your repo?


Metadata Update from @clime:
- Issue assigned to clime

Hello!

I did this so far:

Example output for Fedora DistGit looks like this:

clime@coprbox ~/releng/prunerepo $ rpkg sources
Downloading prunerepo-1.11.tar.gz from lookaside cache at src.fedoraproject.org
######################################################################## 100.0%

and

clime@coprbox ~/releng/prunerepo $ rpkg srpm
Downloading prunerepo-1.11.tar.gz from lookaside cache at src.fedoraproject.org
######################################################################## 100.0%
Wrote: /tmp/rpkg/prunerepo-1-iiztfa9g/prunerepo.spec
Wrote: /tmp/rpkg/prunerepo-1-iiztfa9g/prunerepo-1.11-2.fc28.src.rpm

Commit: https://pagure.io/rpkg-util/c/fa0e8cd85de2cf6afce2b51b07e6d5e543dcc6f7?branch=master

looks nice to me :)

will that be in the copr build output?

Yes, but I will need to update copr builders. It might take a little bit of time.

:thumbsup: thanks!

Metadata Update from @clime:
- Issue status updated to: Closed (was: Open)

This issue has been migrated to GitHub: https://github.com/fedora-copr/rpkg-util/issues/13
Don't forget to subscribe for notifications about new comments.

Metadata