[pacman-dev] Idea for makepkg. Use notify-send when package finishes compiling. (optional feature)

igo95862 igo95862 at yandex.ru
Sat Sep 28 00:43:32 UTC 2019


On Thu, 2019-09-26 at 19:29 -0400, Eli Schwartz wrote:
> On 9/26/19 7:12 PM, igo95862 wrote:
> > Often when compiling large packages I find myself missing the
> > "sudo"
> > promt to install compiled package.
> > 
> > I have thought of a solution using notify-send command from
> > community/inotify-tools package that will send a notification when
> > the
> > package finishes compiling. (but before install)
> > 
> > Could be implemented as an opt-in option in makepkg.conf
> > 
> > If you are interested I can send a patch.
> 
> Sounds like your /etc/sudoers is misconfigured, try setting
> passwd_timeout to something else.
> 
> Alternatively, even if pacman exited with a failure to install the
> built
> package, you can always run makepkg -i again -- pacman will detect
> the
> built package and go straight to offering to install it. You could
> also
> generally avoid using makepkg -i to build, but simply use:
> 
> makepkg && notify-send ... && makepkg --packagelist | sudo pacman -U
> -
> 
> Store this as a small shellscript called "makepkg-notify".
> 

I ended up using sed to insert the line in to makepkg

#!/usr/bin/bash
eval "$(sed '$ i\notify-send "makepkg" "Finished making: $pkgbase"'
/usr/bin/makepkg)"

Probably not the best way. (not very familiar with shell scripting,
sorry)
Not sure if I should post it on the wiki if it is too much of a hack.
-- 
igo95862 <igo95862 at yandex.ru>


More information about the pacman-dev mailing list