[pacman-dev] [PATCH] Allow package to display a brief message before sync install

Dan McGee dpmcgee at gmail.com
Mon Sep 14 21:20:41 EDT 2009


On Mon, Sep 14, 2009 at 10:26 AM, Xavier <shiningxc at gmail.com> wrote:
> On Mon, Sep 14, 2009 at 3:03 PM, James Rayner <iphitus at iphitus.org> wrote:
>> The aim of this is to alert a user to system/package breaking updates
>> before they happen and before they approve the sync install. This is
>> intended primarily for kernel/initscripts/pacman, etc updates when
>> things could go really wrong and need to be known beforehand. Example
>> output below.
>>
>> This adds an alert="" option to the PKGBUILD. This entry is then
>> stored in the package and then the db with repo-add. On a pacman sync
>> operation if any has an alert message it will be displayed before
>> "Proceed with installation"
>>
>> This is a really basic implementation that I'm sure could be brushed
>> up, as I've not used C for a while. However the pacman code is very
>> clean and easy to read, so that made it pretty trivial to add.
>>
>> There's an example repo with one package "alert" at
>> http://mess.iphitus.org/alert-test/
>>
>> The PKGBUILD for the aforementioned package:
>> http://mess.iphitus.org/alert-test/PKGBUILD
>>
>> Attached patch is against latest git.
>>
>> James
>>
>
> We also had request of displaying messages at the end of a transaction :
> http://bugs.archlinux.org/task/12861
>
> and request to move displaying of messages from scriptlets to pkgbuild :
> http://bugs.archlinux.org/task/1571
>
> Should we think about a more general approach here ?

I don't really know what to think here. I had looked at that messages
one for a long time and thought it was a decent idea, but never went
far enough to take it and run with it.

@Loui- sure, but this is for extraordinary messages- a lot more
exclusive than ChangeLog-worthy stuff, and you have to explicitly
request to see that anyway.

@Jeff- it isn't exactly straightforward to view an install script
beforehand, and the post_install business is a rather hacky reason for
needing an install script.

-Dan


More information about the pacman-dev mailing list