I just realized that we can do even better: have --list-generations
    output recutils-formatted data (using ‘object->fields’).  Then, if we do
    it right, the output can just be piped to ‘recsel’ to select entries of
    a certain age, to display specific fields, etc.  Like:
    
      generation-number: 1
      date: 2013-05-07
    
    However, I don’t know exactly how to represent both the generations and
    the list of packages in each generation in a single recutils stream.
    
    José, how can the relations between “generation” records and “package”
    records be expressed?

You can have two record sets: one for generations, one for packages.  A
foreign key can relate them.  Something like this:

%rec: Generation

Id: 1
Date: Dec. 16 2013

Id: 2
Date: May 7 2013

%rec: Package
%type: Generation rec Generation

Package: guile
Version: 2.0.7
Generation: 1

Package: guile
Version: 2.0.9
Generation: 2

Package: hello
Version: 2.8
Generation 2
    

Reply via email to