GNU bug report logs -
#34223
Fixing timestamps in archives.
Previous Next
Full log
Message #17 received at 34223 <at> debbugs.gnu.org (full text, mbox):
Hello,
Tim Gesthuizen <tim.gesthuizen <at> yahoo.de> skribis:
>> I played a bit with this idea and, as an example, the attached file
>> allows you to traverse the list of entries in a zip file (it uses
>> ‘guile-bytestructures’). Specifically, you can get the list of file
>> names in a zip file by running:
>>
>> (call-with-input-file "something.zip"
>> (lambda (port)
>> (fold-entries cons '() port)))
>>
>> Resetting timestamps should be just as simple.
>>
>> How about taking this route?
>
> I also thought about taking this route.
> There are some problems with it though:
>
> - As Julien pointed out, the archive contents need to be uncompressed.
> This makes the problem much more complex and keeps us from writing
> a partial ZIP parser that replaces the timestamps in place.
True, I had overlooked that. In that case, we should definitely unpack
and repack using the ‘zip’ package (I wasn’t suggesting to write a
complete ‘zip’ implementation; I do think it would be valuable in the
long term, but it’s a project for another time, no question here.)
In that case though, it probably doesn’t buy us much to use libarchive
in a separate C program, WDYT? Should we just stick to the current
approach that invokes ‘unzip’ and ‘zip’?
Thanks,
Ludo’.
This bug report was last modified 6 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.