* [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option @ 2014-08-22 8:31 David Henningsson 2014-08-22 8:31 ` [PATCH 2/2] alsa-info: Refactor "withall" logic David Henningsson 2014-08-22 9:14 ` [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option Takashi Iwai 0 siblings, 2 replies; 3+ messages in thread From: David Henningsson @ 2014-08-22 8:31 UTC (permalink / raw) To: alsa-devel, tiwai; +Cc: David Henningsson For some reason, when the --output option is used, less information is included compared to when no options are used. This is unexpected. Fix this by running "withall" also when the output option is used. Signed-off-by: David Henningsson <david.henningsson@canonical.com> --- alsa-info/alsa-info.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 859d7bc..47157f0 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -661,6 +661,7 @@ if [ -n "$1" ]; then shift NFILE="$1" KEEP_OUTPUT="yes" + withall ;; --debug) echo "Debugging enabled. $FILE and $TEMPDIR will not be deleted" -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] alsa-info: Refactor "withall" logic 2014-08-22 8:31 [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option David Henningsson @ 2014-08-22 8:31 ` David Henningsson 2014-08-22 9:14 ` [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option Takashi Iwai 1 sibling, 0 replies; 3+ messages in thread From: David Henningsson @ 2014-08-22 8:31 UTC (permalink / raw) To: alsa-devel, tiwai; +Cc: David Henningsson Previously, using --output, --no-upload, --upload and --pastebin switches implied the withall switch. A more intuitive logic would be that --with-all is disabled if you use another --with* switch, such as --withdmesg, and only then. Also update script version to reflect the behaviour change. Signed-off-by: David Henningsson <david.henningsson@canonical.com> --- alsa-info/alsa-info.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index 47157f0..acd8495 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION=0.4.63 +SCRIPT_VERSION=0.4.64 CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" ################################################################################# @@ -260,6 +260,7 @@ withall() { withlsmod withsysfs withdmesg + WITHALL="no" } get_alsa_library_version() { @@ -629,7 +630,6 @@ fi #If no command line options are specified, then run as though --with-all was specified if [ -z "$1" ]; then update - withall pbcheck fi @@ -642,7 +642,6 @@ if [ -n "$1" ]; then case "$1" in --pastebin) update - withall pbcheck ;; --update) @@ -651,43 +650,45 @@ if [ -n "$1" ]; then ;; --upload) UPLOAD="yes" - withall ;; --no-upload) UPLOAD="no" - withall ;; --output) shift NFILE="$1" KEEP_OUTPUT="yes" - withall ;; --debug) echo "Debugging enabled. $FILE and $TEMPDIR will not be deleted" KEEP_FILES="yes" echo "" - withall ;; --with-all) withall ;; --with-aplay) withaplay + WITHALL="no" ;; --with-amixer) withamixer + WITHALL="no" ;; --with-alsactl) withalsactl + WITHALL="no" ;; --with-devices) withdevices + WITHALL="no" ;; --with-dmesg) withdmesg + WITHALL="no" ;; --with-configs) + WITHALL="no" if [[ -e $HOME/.asoundrc ]] || [[ -e /etc/asound.conf ]] then echo "!!ALSA configuration files" >> $FILE @@ -717,7 +718,9 @@ if [ -n "$1" ]; then ;; --stdout) UPLOAD="no" - withall + if [ -z "$WITHALL" ]; then + withall + fi cat $FILE rm $FILE ;; @@ -766,6 +769,10 @@ if [ "$PROCEED" = "no" ]; then exit 1 fi +if [ -z "$WITHALL" ]; then + withall +fi + if [ "$UPLOAD" = "ask" ]; then if [ -n "$DIALOG" ]; then dialog --backtitle "$BGTITLE" --title "Information collected" --yes-label " UPLOAD / SHARE " --no-label " SAVE LOCALLY " --defaultno --yesno "\n\nAutomatically upload ALSA information to $WWWSERVICE?" 10 80 -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option 2014-08-22 8:31 [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option David Henningsson 2014-08-22 8:31 ` [PATCH 2/2] alsa-info: Refactor "withall" logic David Henningsson @ 2014-08-22 9:14 ` Takashi Iwai 1 sibling, 0 replies; 3+ messages in thread From: Takashi Iwai @ 2014-08-22 9:14 UTC (permalink / raw) To: David Henningsson; +Cc: alsa-devel At Fri, 22 Aug 2014 10:31:40 +0200, David Henningsson wrote: > > For some reason, when the --output option is used, less information > is included compared to when no options are used. This is unexpected. > > Fix this by running "withall" also when the output option is used. > > Signed-off-by: David Henningsson <david.henningsson@canonical.com> Applied both patches. Thanks. Takashi > --- > alsa-info/alsa-info.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh > index 859d7bc..47157f0 100755 > --- a/alsa-info/alsa-info.sh > +++ b/alsa-info/alsa-info.sh > @@ -661,6 +661,7 @@ if [ -n "$1" ]; then > shift > NFILE="$1" > KEEP_OUTPUT="yes" > + withall > ;; > --debug) > echo "Debugging enabled. $FILE and $TEMPDIR will not be deleted" > -- > 1.9.1 > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-22 9:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-08-22 8:31 [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option David Henningsson 2014-08-22 8:31 ` [PATCH 2/2] alsa-info: Refactor "withall" logic David Henningsson 2014-08-22 9:14 ` [PATCH 1/2] alsa-info: Make sure all full script is run even with "output" option Takashi Iwai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).