Bug 2322944

Summary: Silent error from system-config-language
Product: [Fedora] Fedora Reporter: Jakub T. Jankiewicz <jcubic>
Component: system-config-languageAssignee: Parag Nemade <pnemade>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: i18n-bugs, pnemade
Target Milestone: ---Keywords: Regression
Target Release: ---Flags: pnemade: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-language-3.5.0-16.fc43 system-config-language-3.5.0-16.fc42 system-config-language-3.5.0-16.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-04-21 09:31:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub T. Jankiewicz 2024-10-31 14:09:23 UTC
system-config-language do nothing when run in GUI. There is unhandled Python exception when running from terminal

```
$ system-config-language 
pl language not installed
Unknown argument "--debuglevel=0" for command "repoquery". Add "--help" for more information about the arguments.
Traceback (most recent call last):
  File "/usr/share/system-config-language/language_gui.py", line 319, in ok_btn
    installed = self.instpkg.install_packages3(dlang)
  File "/usr/share/system-config-language/install_packages3.py", line 163, in install_packages3
    all_pkg_list = self.get_language_packages(langcode)
  File "/usr/share/system-config-language/install_packages3.py", line 122, in get_language_packages
    cmdoutput = subprocess.check_output(cmd, shell=True)
  File "/usr/lib64/python3.13/subprocess.py", line 472, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               **kwargs).stdout
               ^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'dnf repoquery --debuglevel=0 --queryformat '%{name}' --whatsupplements langpacks-pl' returned non-zero exit status 2.
Repository copr:copr.fedorainfracloud.org:jerrycasiano:FontManager is listed more than once in the configuration
Repository copr:copr.fedorainfracloud.org:phracek:PyCharm is listed more than once in the configuration
Repository brave-browser is listed more than once in the configuration
Repository docker-ce-stable is listed more than once in the configuration
Repository docker-ce-stable-debuginfo is listed more than once in the configuration
Repository docker-ce-stable-source is listed more than once in the configuration
Repository docker-ce-test is listed more than once in the configuration
Repository docker-ce-test-debuginfo is listed more than once in the configuration
Repository docker-ce-test-source is listed more than once in the configuration
Repository docker-ce-nightly is listed more than once in the configuration
Repository docker-ce-nightly-debuginfo is listed more than once in the configuration
Repository docker-ce-nightly-source is listed more than once in the configuration
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Repository fedora-cisco-openh264 is listed more than once in the configuration
Repository fedora-cisco-openh264-debuginfo is listed more than once in the configuration
Repository fedora-cisco-openh264-source is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository updates-debuginfo is listed more than once in the configuration
Repository updates-source is listed more than once in the configuration
Repository updates-testing is listed more than once in the configuration
Repository updates-testing-debuginfo is listed more than once in the configuration
Repository updates-testing-source is listed more than once in the configuration
Repository gh-cli is listed more than once in the configuration
Repository google-chrome is listed more than once in the configuration
Repository rpmfusion-free is listed more than once in the configuration
Repository rpmfusion-free-debuginfo is listed more than once in the configuration
Repository rpmfusion-free-source is listed more than once in the configuration
Repository rpmfusion-free-updates is listed more than once in the configuration
Repository rpmfusion-free-updates-debuginfo is listed more than once in the configuration
Repository rpmfusion-free-updates-source is listed more than once in the configuration
Repository rpmfusion-free-updates-testing is listed more than once in the configuration
Repository rpmfusion-free-updates-testing-debuginfo is listed more than once in the configuration
Repository rpmfusion-free-updates-testing-source is listed more than once in the configuration
Repository rpmfusion-nonfree is listed more than once in the configuration
Repository rpmfusion-nonfree-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-source is listed more than once in the configuration
Repository rpmfusion-nonfree-nvidia-driver is listed more than once in the configuration
Repository rpmfusion-nonfree-nvidia-driver-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-nvidia-driver-source is listed more than once in the configuration
Repository rpmfusion-nonfree-steam is listed more than once in the configuration
Repository rpmfusion-nonfree-steam-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-steam-source is listed more than once in the configuration
Repository rpmfusion-nonfree-updates is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-source is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-testing is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-testing-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-testing-source is listed more than once in the configuration
pl language not installed
Unknown argument "--debuglevel=0" for command "repoquery". Add "--help" for more information about the arguments.
Traceback (most recent call last):
  File "/usr/share/system-config-language/language_gui.py", line 319, in ok_btn
    installed = self.instpkg.install_packages3(dlang)
  File "/usr/share/system-config-language/install_packages3.py", line 163, in install_packages3
    all_pkg_list = self.get_language_packages(langcode)
  File "/usr/share/system-config-language/install_packages3.py", line 122, in get_language_packages
    cmdoutput = subprocess.check_output(cmd, shell=True)
  File "/usr/lib64/python3.13/subprocess.py", line 472, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               **kwargs).stdout
               ^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'dnf repoquery --debuglevel=0 --queryformat '%{name}' --whatsupplements langpacks-pl' returned non-zero exit status 2.
Repository copr:copr.fedorainfracloud.org:jerrycasiano:FontManager is listed more than once in the configuration
Repository copr:copr.fedorainfracloud.org:phracek:PyCharm is listed more than once in the configuration
Repository brave-browser is listed more than once in the configuration
Repository docker-ce-stable is listed more than once in the configuration
Repository docker-ce-stable-debuginfo is listed more than once in the configuration
Repository docker-ce-stable-source is listed more than once in the configuration
Repository docker-ce-test is listed more than once in the configuration
Repository docker-ce-test-debuginfo is listed more than once in the configuration
Repository docker-ce-test-source is listed more than once in the configuration
Repository docker-ce-nightly is listed more than once in the configuration
Repository docker-ce-nightly-debuginfo is listed more than once in the configuration
Repository docker-ce-nightly-source is listed more than once in the configuration
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Repository fedora-cisco-openh264 is listed more than once in the configuration
Repository fedora-cisco-openh264-debuginfo is listed more than once in the configuration
Repository fedora-cisco-openh264-source is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository updates-debuginfo is listed more than once in the configuration
Repository updates-source is listed more than once in the configuration
Repository updates-testing is listed more than once in the configuration
Repository updates-testing-debuginfo is listed more than once in the configuration
Repository updates-testing-source is listed more than once in the configuration
Repository gh-cli is listed more than once in the configuration
Repository google-chrome is listed more than once in the configuration
Repository rpmfusion-free is listed more than once in the configuration
Repository rpmfusion-free-debuginfo is listed more than once in the configuration
Repository rpmfusion-free-source is listed more than once in the configuration
Repository rpmfusion-free-updates is listed more than once in the configuration
Repository rpmfusion-free-updates-debuginfo is listed more than once in the configuration
Repository rpmfusion-free-updates-source is listed more than once in the configuration
Repository rpmfusion-free-updates-testing is listed more than once in the configuration
Repository rpmfusion-free-updates-testing-debuginfo is listed more than once in the configuration
Repository rpmfusion-free-updates-testing-source is listed more than once in the configuration
Repository rpmfusion-nonfree is listed more than once in the configuration
Repository rpmfusion-nonfree-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-source is listed more than once in the configuration
Repository rpmfusion-nonfree-nvidia-driver is listed more than once in the configuration
Repository rpmfusion-nonfree-nvidia-driver-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-nvidia-driver-source is listed more than once in the configuration
Repository rpmfusion-nonfree-steam is listed more than once in the configuration
Repository rpmfusion-nonfree-steam-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-steam-source is listed more than once in the configuration
Repository rpmfusion-nonfree-updates is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-source is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-testing is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-testing-debuginfo is listed more than once in the configuration
Repository rpmfusion-nonfree-updates-testing-source is listed more than once in the configuration
pl language not installed
Unknown argument "--debuglevel=0" for command "repoquery". Add "--help" for more information about the arguments.
Traceback (most recent call last):
  File "/usr/share/system-config-language/language_gui.py", line 319, in ok_btn
    installed = self.instpkg.install_packages3(dlang)
  File "/usr/share/system-config-language/install_packages3.py", line 163, in install_packages3
    all_pkg_list = self.get_language_packages(langcode)
  File "/usr/share/system-config-language/install_packages3.py", line 122, in get_language_packages
    cmdoutput = subprocess.check_output(cmd, shell=True)
  File "/usr/lib64/python3.13/subprocess.py", line 472, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               **kwargs).stdout
               ^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'dnf repoquery --debuglevel=0 --queryformat '%{name}' --whatsupplements langpacks-pl' returned non-zero exit status 2.
```

Reproducible: Always

Steps to Reproduce:
1. Install Fedora
2. Open system-config-language
3. Change language to Polish
Actual Results:  
Nothing happens when you pick different langauge

Expected Results:  
langauge is changed

Comment 1 Jakub T. Jankiewicz 2024-10-31 14:11:16 UTC
This may be the issue with switching to DNF5 as default

Comment 2 Jakub T. Jankiewicz 2024-10-31 14:18:23 UTC
I can confirm:

Updating /usr/share/system-config-language/install_packages3.py

to include dnf-3 instead of dnf solve the issue.

```
kuba@jcubic:[/usr/share/system-config-language]$ find . -name '*.py' | xargs grep dnf
./install_packages3.py:import dnf
./install_packages3.py:        self.base = dnf.Base()
./install_packages3.py:        self.conffile = '/var/lib/dnf/plugins/langpacks/installed_langpacks'
./install_packages3.py:        cmd = "dnf repoquery --debuglevel=0 --queryformat '%{{name}}' --whatsupplements langpacks-{0}".format(lang)
./install_packages3.py:        cmd = "dnf install -y langpacks-{0}".format(langcode)

$ find . -name '*.py' | xargs grep dnf
./install_packages3.py:import dnf
./install_packages3.py:        self.base = dnf.Base()
./install_packages3.py:        self.conffile = '/var/lib/dnf/plugins/langpacks/installed_langpacks'
./install_packages3.py:        cmd = "dnf-3 repoquery --debuglevel=0 --queryformat '%{{name}}' --whatsupplements langpacks-{0}".format(lang)
./install_packages3.py:        cmd = "dnf-3 install -y langpacks-{0}".format(langcode)

$ system-config-language 
/usr/share/system-config-language/install_packages3.py:162: SyntaxWarning: "is" with 'str' literal. Did you mean "=="?
  if installed is "no":
pl language not installed
Last metadata expiration check: 4:08:07 ago on czw, 31 paź 2024, 11:07:46.
Langpacks provides packages => ['avogadro2-langpack-pl', 'cockatrice-langpack-pl', 'dnsmasq-langpack', 'guayadeque-langpack-pl', 'hunspell-pl', 'hyphen-pl', 'kde-l10n-pl', 'libreoffice-langpack-pl', 'man-pages-pl', 'mythes-pl', 'pgadmin4-langpack-pl', 'shotcut-langpack-pl', 'tesseract-langpack-pol']
Packages that can be installed=> ['avogadro2-langpack-pl', 'cockatrice-langpack-pl', 'dnsmasq-langpack', 'guayadeque-langpack-pl', 'hyphen-pl', 'kde-l10n-pl', 'libreoffice-langpack-pl', 'man-pages-pl', 'mythes-pl', 'pgadmin4-langpack-pl', 'shotcut-langpack-pl', 'tesseract-langpack-pol']

```

Comment 3 Parag Nemade 2024-10-31 14:38:45 UTC
Which desktop environment you are using?

Comment 4 Jakub T. Jankiewicz 2024-10-31 15:07:32 UTC
Xfce

Comment 5 Fedora Update System 2025-04-21 09:27:29 UTC
FEDORA-2025-1c56105a45 (system-config-language-3.5.0-16.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-1c56105a45

Comment 6 Fedora Update System 2025-04-21 09:31:02 UTC
FEDORA-2025-1c56105a45 (system-config-language-3.5.0-16.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2025-04-21 10:00:45 UTC
FEDORA-2025-af21e25769 (system-config-language-3.5.0-16.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-af21e25769

Comment 8 Fedora Update System 2025-04-21 10:27:13 UTC
FEDORA-2025-443722c13a (system-config-language-3.5.0-16.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-443722c13a

Comment 9 Fedora Update System 2025-04-22 01:45:53 UTC
FEDORA-2025-af21e25769 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-af21e25769`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-af21e25769

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2025-04-22 01:55:16 UTC
FEDORA-2025-443722c13a has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-443722c13a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-443722c13a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2025-04-29 20:38:48 UTC
FEDORA-2025-af21e25769 (system-config-language-3.5.0-16.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2025-04-30 01:37:29 UTC
FEDORA-2025-443722c13a (system-config-language-3.5.0-16.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.