From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:33506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvrLU-0004hG-PI for guix-patches@gnu.org; Mon, 18 Feb 2019 17:25:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvrLS-0000CO-UY for guix-patches@gnu.org; Mon, 18 Feb 2019 17:25:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvrLS-0000Bu-Es for guix-patches@gnu.org; Mon, 18 Feb 2019 17:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gvrLS-0001yb-6y for guix-patches@gnu.org; Mon, 18 Feb 2019 17:25:02 -0500 Subject: [bug#34223] Fixing timestamps in archives. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87imxjfjjt.fsf@gnu.org> <87mumshndk.fsf@yahoo.de> Date: Mon, 18 Feb 2019 23:24:11 +0100 In-Reply-To: <87mumshndk.fsf@yahoo.de> (Tim Gesthuizen's message of "Mon, 18 Feb 2019 21:07:03 +0100") Message-ID: <87pnro91mc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Tim Gesthuizen Cc: 34223@debbugs.gnu.org Hello, Tim Gesthuizen 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 >> =E2=80=98guile-bytestructures=E2=80=99). 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 =E2=80=98zip=E2=80=99 package (I wasn=E2=80=99t sugges= ting to write a complete =E2=80=98zip=E2=80=99 implementation; I do think it would be valua= ble in the long term, but it=E2=80=99s a project for another time, no question here.) In that case though, it probably doesn=E2=80=99t buy us much to use libarch= ive in a separate C program, WDYT? Should we just stick to the current approach that invokes =E2=80=98unzip=E2=80=99 and =E2=80=98zip=E2=80=99? Thanks, Ludo=E2=80=99.