(Cc’ing José or recutils.) José: this is about providing a way to list the “generations” of a profile, i.e., the packages that were installed at a given point in time. Nikita Karetnikov skribis: >> Rather, I would do: > >> --delete-generations=3..9 > >> It’s easier to parse and to type. > >> Likewise, it could even support: > >> --delete-generations=1month > > Here’s what I decided to use: > > --list-generations > --list-generations=10 > --list-generations=1,32,9 > --list-generations=4..10 > --list-generations=11.. > --list-generations=..13 > --list-generations=first-month > --list-generations=last-month > > I guess I have to write a parser for the “1,32,9” case, right? Or is > there a simpler solution? > >> Perhaps there could be several formats. For instance, >> --list-generations would be equivalent to --list-generations=short: > >> generation 1 Dec. 16 2013 >> generation 2 May 7 2013 > >> And then --list-generations=long would do something like: > >> 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 > >> WDYT? > > OK, but how can I integrate this in the above scheme? Will it be OK to > create an additional ‘--short’ switch or a new > ‘--list-generations-short’ option? Both solutions look ugly. 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? >> I’ll have to disagree. :-) > >> There’s no such verb as “rollback”, I think, whereas “fallback” is a >> valid noun (and we don’t have the choice for “fallback”, since there are >> messages in the daemon that mention it.) > >> Now, if you had --rollback as an alias, I won’t scream either... > > See [1–4]. Would you like to keep ‘--roll-back’ anyway? > > [1] https://en.wiktionary.org/wiki/rollback > [2] http://www.merriam-webster.com/dictionary/rollback > [3] http://www.thefreedictionary.com/rollback > [4] http://oxforddictionaries.com/us/definition/american_english/rollback OK, let’s just do this: