You are not logged in.

#1 2005-03-21 19:07:04

Michel
Member
From: Belgium
Registered: 2004-07-31
Posts: 286

suggestion about output during install of packages

Hello,

I've seen that while I'm installing things, I sometimes get inof on my screen of .. you have to do X after the install of this package (run lilo or grub affter kernel install), you can optionally install package Y using the command Z, ...

I'm not sure, but I think they are all written to stdout?

Well, I'm proposing to write different kinds of messages to different file-descriptors:

positive messages : 1
warning/error messages : 2

remarks : 3

The remarks are: you can optionally install package Y, you have to do X after the install of package A, ...

The usefullness of this?
For me as a home-user ... While I'm doing a system-upgrade, I'm not really paying attention all of the time at my screen while I'm updating and if I run it on another console and switch consoles I've lost the info.

I could redirect the warning/error- and remark-messages to a file, to a jabber-server, ... to alert me that I need/can take some (extra) actions.

If needed ... I could mail them to me ...

----------------------------

One step further is to gradually put the remarks in a certain format:

type/type/type - message - possible action

types could be: optional packages, critical actions (liek running lilo/grub after a kernel-update, ...), other (only fill in this type and in the message), ...

Why multiple types? The types are labels ... Something maybe be critical, ... I can't think of something usefull here, but someone my have an idea ... I just want to make it flexible enough if it needs the flexibility.
The commands are just there as pointers, so people are informed about them .. not to run them automatically (maybe because of possible secuirty-reasons).


An example: I get  a message on stdout the something is installed (in the thought that this can be detected). One could sent stdout to a file that parses stdout and detects that the kernel has been updated. One could then run for example the command lilo.

Ofcourse one could use dnotifiy/inotify and detect that the kernel has been updated ... this would be more handy maybe.

One could parse the outputs and report them using dbus for example smile.

The main points are:
  * reporting through different channels (screen, file, mail, jabber, ...) of succesfull installs, problems, ... and being able to quicly see what the problems are, what actions can be optionally taken, ...
  * maybe automatically taking actions on certain events.

Modifications to PKGBUILDS are not big I think, the output has only to be redirected to the right file-descriptor I think.

One could maybe define an alias for pacman I to specify default redirects, but it could also be build into pacman I think to add these redirections to all scripts and possibly overwrite them on the commandline ...

Michel

Offline

#2 2005-03-21 19:23:01

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: suggestion about output during install of packages

These are good ideas, maybe file a bug report/feature request. It reminds me of an idea I had. I don't know if its a good one though, it kind of violates the keep it simple attitude. But I thought it would be nice if you could associate some command with different pacman events. For example, if you could add:

onUpdate: kernel26 lilo

it would run lilo when kernel26 is installed/updated.  This would be useful for executing certain shell scripts or mailing users when certain packages are installed too. Most importantly, it is something the user can customize, instead of the packager.

Dusty

Offline

Board footer

Powered by FluxBB