#82 Add file size to imagelist output
Opened 2 years ago by adamwill. Modified a year ago
adamwill/quick-fedora-mirror imagelist-size  into  master

file modified
+1 -1
@@ -186,7 +186,7 @@ 

          # write to filtered list if appropriate

          imgs = ['.{0}'.format(form) for form in SUPPORTED_IMAGE_FORMATS]

          if any(entry.path.endswith(img) for img in imgs):

-             print(entry.path, file=opts.imagelist)

+             print('{0}\t{1}'.format(entry.size, entry.path), file=opts.imagelist)

          if entry.name in opts.checksum_files:

              checksums[entry.path[2:]] = True


So, I realized today it would be useful for fedfind to know the
sizes of image files. This 'imagelist' file is generated for
fedfind's convenience - it uses it to quickly find all image
files in the tree - and AFAIK nothing else uses it, so changing
its format should be safe. I would take responsibility for
updating fedfind to handle the new format.

Signed-off-by: Adam Williamson awilliam@redhat.com

Please don't merge this and send it out right away, as if we're going to do it I need to enhance fedfind to handle the new format and send out updates. So just let me know if you think this is OK, and if so, I'll deal with fedfind then post an OK to merge the change when it's ready.

This seems fine to me, if that's what the tools need. Just let me know when the tools will be able to handle this and we can switch over.

However, if you foresee further data that you might want in the file, maybe it's worth adding some structure like the main index file (to add a version section, for example). We could conceivably also list the images in a separate section of the main index file, but that probably defeats the purpose of having a short list of them.

yeah, we have this as a separate file so fedfind only needs to download 100K, not a gigabyte :)

I can't think of any additional info fedfind would need right now, no. I don't think it's worth complicating things with a version or anything, I'm just going to do a fedfind release that can handle both formats (it'll be pretty easy to tell which it has) and send that out, then once it's stable we can land this.


Just to note, I stopped working on this over the RH shutdown. I'll get back to it next week, then ping here when a new fedfind version is out.

I've just sent a new fedfind release to Bodhi (4.3.0) with support for both imagelist formats. Once it goes stable for all releases, I'll ping here and we can merge this.

Oops, I forgot to ping. Can we please merge this now? Thanks.

@tibbs ping...