Mail archive
alpine-aports

Re: [alpine-aports] [PATCH 3/3] testing/udevil: new aport

From: IT Offshore Developer <developer_at_it-offshore.co.uk>
Date: Tue, 05 May 2015 15:24:28 +0100

ncopa - I will revise udevil - I agree
/usr/share/apk-tools/$pkgname/post-install-message is a better place to
store non colored messages - the formatting is best left to apk-tools to
save space.

Stuart.

On 2015-05-05 13:50, Natanael Copa wrote:
> On Tue, 5 May 2015 00:26:28 +0000
> Stuart Cardall <developer_at_it-offshore.co.uk> wrote:
>
>> +++ b/testing/udevil/udevil.post-install
>> _at_@ -0,0 +1,22 @@
>> +#!/bin/sh
>> +
>> +NORMAL="\033[1;0m"
>> +STRONG="\033[1;1m"
>> +GREEN="\033[1;32m"
>> +
>> +print_strong() {
>> + local prompt="${STRONG}$1 ${GREEN}$2${NORMAL}"
>> + printf "${prompt} %s\n"
>> +}
>> +
>> +print_strong "\nTo mount / unmount devices without the root
>> password:" " add your user account to the 'plugdev' group."
>> +print_strong "\nOptional dependencies:"
>> +print_strong "\nzenity: " " (devmon popups)"
>> +print_strong "davfs2: " " (mount WebDAV resources)"
>> +print_strong "cifs-utils: " " (mounting samba shares)"
>> +print_strong "curlftpfs: " " (mounting ftp shares)"
>> +print_strong "nfs-utils: " " (mounting nfs shares)"
>> +print_strong "sshfs-fuse: " " (mounting sftp shares)"
>> +print_strong "eject: " " (eject via devmon)"
>> +exit 0
>> +
>
> I am not sure I like the post-install script.
>
> - There is no guarantee that there are color support. (think: apk add
> $packages > logfile)
>
> - There is no guarantee user reach to read it. package might be
> installed together with 100 other packages.
>
> - It is meaningless to show this message every reboot. (tmpfs install)
>
> - If every package did something like this it would slow down the
> install.
>
>
> Can we remove the post-install and create a doc on the wiki instead?
>
> If we want this kind of informative messages for installed packages,
> then we should consider add this as a feature for apk-tools or similar.
>
> The message should be displayed after install (maybe via trigger?) and
> maybe we want be able to read the message long time after package was
> installed.
>
> Maybe store them as /usr/share/apk-tools/$pkgname/post-install-message
> or similar.
>
> In any case, I don't like doing it from post-install.
>
> -nc


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue May 05 2015 - 15:24:28 GMT