Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130651 - make emerge play sound or do something else on unsuccesfull/succesfull exit
Summary: make emerge play sound or do something else on unsuccesfull/succesfull exit
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-20 13:28 UTC by Fredric Johansson
Modified: 2006-04-20 16:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fredric Johansson 2006-04-20 13:28:05 UTC
When doing updates or newinstalling of packages it would be useful if emerge could  do anything optional on exit like playing a sound to make you aware that it failed emerging or it has finished

What do you think?
Comment 1 Zac Medico gentoo-dev 2006-04-20 13:41:22 UTC
The exit status already provides the required functionality.  You can create a wrapper script if you want like this (save it as /usr/local/bin/emerge or something):

#!/usr/bin/env bash
/usr/lib/portage/bin/emerge && aplay success.wav || aplay failure.wav
Comment 2 Zac Medico gentoo-dev 2006-04-20 13:43:18 UTC
Oops, forgot to pass the args to emerge...

#!/usr/bin/env bash
/usr/lib/portage/bin/emerge "$@" && aplay success.wav || aplay failure.wav
Comment 3 Fredric Johansson 2006-04-20 13:57:12 UTC
But that will make emerge always playing sounds on exit even when I make emerge -s foobar or emerge -pv world which might not be preferable all times
Comment 4 Zac Medico gentoo-dev 2006-04-20 16:05:52 UTC
(In reply to comment #3)
> But that will make emerge always playing sounds on exit even when I make emerge
> -s foobar or emerge -pv world which might not be preferable all times

Call the script something different (besides emerge) and only use it when you want sound.
Comment 5 SpanKY gentoo-dev 2006-04-20 16:27:59 UTC
for your .bashrc:
semerge() { emerge "$@" && aplay success.wav || aplay failure.wav ; }