Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package alsa-utils for openSUSE:Factory checked in at 2022-01-23 12:15:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alsa-utils (Old) and /work/SRC/openSUSE:Factory/.alsa-utils.new.1938 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alsa-utils" Sun Jan 23 12:15:12 2022 rev:136 rq:947885 version:1.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/alsa-utils/alsa-utils.changes 2021-12-08 22:09:01.882864707 +0100 +++ /work/SRC/openSUSE:Factory/.alsa-utils.new.1938/alsa-utils.changes 2022-01-23 12:16:26.436166138 +0100 @@ -1,0 +2,6 @@ +Fri Jan 21 09:43:59 CET 2022 - ti...@suse.de + +- Fix alsamixer color config regression: + 0001-alsamixer-Fix-regression-in-color-setup.patch + +------------------------------------------------------------------- New: ---- 0001-alsamixer-Fix-regression-in-color-setup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa-utils.spec ++++++ --- /var/tmp/diff_new_pack.GYO09v/_old 2022-01-23 12:16:28.132154803 +0100 +++ /var/tmp/diff_new_pack.GYO09v/_new 2022-01-23 12:16:28.136154776 +0100 @@ -1,7 +1,7 @@ # # spec file for package alsa-utils # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Source2: 01beep.conf Source3: sound-extra.service Source5: load-sound-modules.sh +Patch1: 0001-alsamixer-Fix-regression-in-color-setup.patch Patch100: alsa-info-no-update-for-distro-script.patch Patch101: alsa-utils-configure-version-revert.patch BuildRequires: alsa-devel @@ -73,6 +74,7 @@ %prep %setup -q +%patch1 -p1 %patch100 -p1 %if 0%{?do_autoreconf} %patch101 -p1 ++++++ 0001-alsamixer-Fix-regression-in-color-setup.patch ++++++ >From 40202a522aa86599bffaabf8097bf9bf1cef4f61 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <ti...@suse.de> Date: Thu, 20 Jan 2022 08:49:17 +0100 Subject: [PATCH] alsamixer: Fix regression in color setup The recent change to add the background config broke the color setup via the config file due. Fix the regression by restoring the initialization order back again, and changing the logic for the default background color to be re-initializing color pairs instead. Link: https://github.com/alsa-project/alsa-utils/issues/137 Signed-off-by: Takashi Iwai <ti...@suse.de> --- alsamixer/cli.c | 8 ++++---- alsamixer/colors.c | 13 ++++++++++++- alsamixer/colors.h | 2 +- alsamixer/configparser.c | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/alsamixer/cli.c b/alsamixer/cli.c index 63c4949bab96..f153f280cd9f 100644 --- a/alsamixer/cli.c +++ b/alsamixer/cli.c @@ -152,15 +152,15 @@ int main(int argc, char *argv[]) parse_options(argc, argv); + create_mixer_object(&selem_regopt); + + initialize_curses(use_color, use_mouse); + if (config_file == CONFIG_DEFAULT) parse_default_config_file(); else if (config_file) parse_config_file(config_file); - create_mixer_object(&selem_regopt); - - initialize_curses(use_color, use_mouse); - create_mixer_widget(); mainloop(); diff --git a/alsamixer/colors.c b/alsamixer/colors.c index f76dc26ef380..cca5233e82cd 100644 --- a/alsamixer/colors.c +++ b/alsamixer/colors.c @@ -23,7 +23,7 @@ #include "colors.h" struct attributes attrs; -short background_color = -1; +static short background_color = -1; int get_color_pair(short fg, short bg) { @@ -45,6 +45,17 @@ int get_color_pair(short fg, short bg) return 0; } +void reinit_colors(short bg) +{ + if (bg == background_color) + return; + init_pair(1, COLOR_CYAN, bg); + init_pair(2, COLOR_YELLOW, bg); + init_pair(4, COLOR_RED, bg); + init_pair(5, COLOR_WHITE, bg); + background_color = bg; +} + void init_colors(int use_color) { if (!!has_colors() == !!use_color) { diff --git a/alsamixer/colors.h b/alsamixer/colors.h index 1c7bff8e7d32..ac404e9ccc16 100644 --- a/alsamixer/colors.h +++ b/alsamixer/colors.h @@ -34,9 +34,9 @@ struct attributes { }; extern struct attributes attrs; -extern short background_color; void init_colors(int use_color); +void reinit_colors(short bg); int get_color_pair(short fg, short bg); #endif diff --git a/alsamixer/configparser.c b/alsamixer/configparser.c index 4396d4ff302e..b2b55f4754bc 100644 --- a/alsamixer/configparser.c +++ b/alsamixer/configparser.c @@ -451,7 +451,7 @@ static int cfg_set(char **argv, unsigned int argc) error_cause = argv[1]; return ERROR_CONFIG; } - background_color = bg_color; + reinit_colors(bg_color); } else { error_message = _("unknown option"); -- 2.31.1