#268 download-scratch.py should keep logs for all arches
Closed: fixed 6 years ago Opened 8 years ago by thl.

The log files in koji have names like "build.log" and thus miss a tag that specifies the build arch. Hence when download-scratch.py downloads build results for multiple arch in one go (i686 and x86_64 for example) it will first download the build.log for i686 and a little bit later overwrites it with the build.log from the x86_64 build.

I would like to see that fixed. I use below patch to prevent that. It uses a ugly trick to get the build arch from koji. Do you by chance know a better way to get that bit of information?

{{{
--- download-scratch.py.fedora.org 2015-12-23 20:29:11.806219721 +0100
+++ download-scratch.py.fedora 2015-12-23 20:29:23.530219996 +0100
@@ -47,6 +47,7 @@

         base_path = koji.pathinfo.taskrelpath(task['id'])
         output = session.listTaskOutput(task['id'])
  • archname = koji.taskLabel(task).rsplit(', ', 1)[1].replace(')','')
    if output == []:
    print "This build is empty, no files to download"
    sys.exit(1)
    @@ -59,6 +60,8 @@
    if download:
    urlgrabber.grabber.urlgrab(koji_baseurl + base_path + '/' + filename,
    progress_obj=prog_meter)
  • if filename.endswith('.log'):
  • os.rename(filename, filename.replace('.log', '.' + archname + '.log'))

if name == 'main':
usage = 'usage: %prog [options] task-ID [task-ID...]'
}}}


This has been lingering for too long. That said, the new koji command allows downloading a build defined by a task number, so the proper action would really be to deprecate and finally remove the koji-download-scratch command from the f-r package.

Based on this, I don't really see that we should update koji-dowmload-scratch even though the patch looks sane.

Thoughts?

Metadata Update from @leamas:
- Issue close_status updated to: None

6 years ago

That said, the new koji command allows downloading a build

Yeah, I noticed and switched to this method some months ago

so the proper action would really be to deprecate and finally remove the koji-download-scratch command from the f-r package. […] Based on this, I don't really see that we should update koji-download-scratch […]

Fully agreed (to both)

Fixed with a deprecation warning added in k-d-s: [68aeafa]

Metadata Update from @leamas:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata