guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PRELIMINARY: [PATCH] guix package: Add '--list-generations'.


From: Nikita Karetnikov
Subject: PRELIMINARY: [PATCH] guix package: Add '--list-generations'.
Date: Wed, 18 Sep 2013 04:43:28 +0400

> I think it’s reasonable to have a first milestone without recutils
> output.

OK.

> Not sure what you mean by “two record sets”.

“You can have two record sets: one for generations, one for
packages.” [1]

> I see two use cases: one where you just want human-friendly output, for
> when one is glancing at the available generations, and one that is more
> amenable to Unix pipelines for post-processing.  Recutils output is for
> the latter case.

Right.

>> I still think that someone may benefit from the recutils format.  So
>> let’s allow the ‘recutils’ argument that would list all generations in
>> that format [1] and use the following format [2] for everything else:
>>
>>   generation 1     Dec 16 2013
>>     guile    2.0.7 out,debug    gnu/packages/guile.scm
>>     hello    2.8   out          gnu/packages/base.scm
>>
>>   generation 2     May 7 2013
>>     guile    2.0.9 out          gnu/packages/guile.scm
>>
>> Is it OK?

> Yes.

>> Should it point to the store instead of (gnu packages …)?

> Yes, I think so.

Done.

>> Why do you suggest to put ‘string->duration’ into (guix ui)?

> Because it’s a user-interface function.

Done.  However, I think it would be better to write more generic
procedures if we want to place them in separate modules, so they can be
reused.  (I can replace the current version with a more generic one if
you want.)

>> I installed Nix 1.5.3. and ran the command:
>>
>> error: setting synchronous mode: unable to open database file

> Problem with permissions on the SQLite database, I guess.

I “fixed” it by deleting the store and reinstalling Guix.

I’m attaching the patch.  Please don’t push it yet.  I’ve just found a
bug.  On my machine, ‘guix package -p test -l 2d’ and ‘guix package -p
test -l’ should return the same set of generations, but the fourth
generation is shown twice in the former case.

Other issues:

1. ‘false-if-exception’ in ‘generation-ctime’.

2. A race condition (marked with XXX).

3. ‘guix package -l -p test’ returns ‘guix package: error: test:
   extraneous argument’.  (However, the same happens with ‘-I’.)

4. There must be a better way to write the test in
   ‘tests/guix-package.sh’.

[1] https://lists.gnu.org/archive/html/guix-devel/2013-08/msg00173.html

Attachment: 0001-guix-package-Add-list-generations.patch
Description: Text Data

Attachment: pgp1ReVJm1_qV.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]