Mailinglist Archive: zypp-devel (64 mails)

< Previous Next >
Re: [zypp-devel] package history log file format
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Thu, 31 Jul 2008 15:07:09 +0200
  • Message-id: <20080731130709.GA30570@xxxxxxxxxxxxx>
* Jan Kupec <jkupec@xxxxxxx> [Jul 31. 2008 14:43]:
I've got a mail day, so here's another one :O) We need to decide some
things regarding the $subject.

DATA

According to my research, we need to log these data:

datetime (e.g. YYYY-MM-DD HH:mm:ss format)
action (install | remove | upgrade | downgrade | reinstall)

- We should stick to 'update' for package updates.

- What's 'reinstall' supposed to be ?

+ repo (see below)


reqby (auto | user) // meaning requested by - user or dependencies

It should be the real username, remember we want to be role-based in
the future. Probably with a '@hostname' to cope for remote
administration.

pkgname
evr
arch
vendor
repo ??? // this is requested, but do we really want it? The vendor
// should be sufficient IMO

The vendor can be faked. IMHO, the repository url is needed here.

(There is no need to repeat the complete repo url for hundreds of
packages. A single "repo #3 is http://...."; log entry and referencing
the repo as '#3' is less verbose.

oldevr // relevant for upgrades/downgrades
oldarch


oldvendor
Only if the vendor changed

oldrepo ???
No, since the original repo is in the log.



comments welcome


FORMAT

It should be
- ascii
- line based (easy to view)
- human readable (to some extend; i.e. not XML, but also not too
verbose)
- parseable (by a computer program)


i suggest a CSV format, one entry per line, with values separated by
whatever char, e.g. a pipe, example:

Agreed.


2008-10-12
12:55:03|upgrade|user||0.12.0|i386|suse|dvd11|0.11.9|i386|unknown|somerepo
2008-10-12 12:55:10|remove|user|zypper|0.11.9|i386|unknown|dvd11||||
2008-10-12 12:55:03|install|user|zypper|0.12.0|i386|suse|dvd11||||

Some suggestions:

- make the action a fixed length, its easier to read

- move the 'user' towards the end, the package is more important
information.

- don't split name, evr and arch into separate columns. name-evr.arch
is a quite common notation.

- have a flexible number of columns, improves readability

- How about using the '@' notation also for packages and their repos ?

- 'auto' could be eliminated, everything without a user is 'auto'

- We could include dependency information by putting a package into
the 'user' column. Don't know how useful this actually is

Example:

2008-10-12 12:55:03|repo|1|dvd11
2008-10-12 12:55:03|update
|libzypp-1.42-39.i586|libzypp-1.27-63.i586@1|root@localhost
2008-10-12 12:55:10|remove |zypper-0.11.9.i386|pope@vatican
2008-10-12 12:55:03|install|libzypp-1.43.0.i586@1
Alternative: 2008-10-12
12:55:03|install|libzypp-1.43.0.i586@1|zypper-0.12.0.i586@1
2008-10-12 12:55:03|install|zypper-0.12.0.i586@1|root@xxxxxxxxxxx



This would be machine-readable and still quite human readable.

Agreed. Just prepare for value between the |'s having |'s inside ;-)



OTHER ISSUES

The request is that the package history should be human-readable as well as
machine-readable. It could as well be two separate logs, one for humans,
one for machines.

Well, the 'human readable' should be 'admin readable'. I don't see the
need for a 'natural language' but a nicely structured, line based
format in a single(!) log file.


@Michael (ma): i see you're working on refactoring the zypp commit (?).
Please keep in mind that, in case of upgrades/downgrades, we will need also
the data of the old solvable from which we upgrade/downgrade there.

Klaus
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups
References