Bug 2042808 - weakdeps not working on rawhide system
Summary: weakdeps not working on rawhide system
Keywords:
Status: CLOSED DUPLICATE of bug 2033130
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2013327
TreeView+ depends on / blocked
 
Reported: 2022-01-20 07:58 UTC by Parag Nemade
Modified: 2022-02-07 20:03 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-07 20:03:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
debugdata testcase.t file (102.71 KB, text/plain)
2022-01-20 08:24 UTC, Parag Nemade
no flags Details

Description Parag Nemade 2022-01-20 07:58:56 UTC
Description of problem:
Weakdeps are not getting installed. e.g. langpacks-fr should install hunspell-fr 

Version-Release number of selected component (if applicable):
dnf-data-4.10.0-1.fc36.noarch
libdnf-0.65.0-1.fc36.x86_64
python3-libdnf-0.65.0-1.fc36.x86_64
python3-dnf-4.10.0-1.fc36.noarch
dnf-4.10.0-1.fc36.noarch
python3-dnf-plugins-core-4.0.24-1.fc36.noarch
dnf-plugins-core-4.0.24-1.fc36.noarch
python3-dnf-plugins-extras-common-4.0.15-2.fc35.noarch
python3-dnf-plugin-system-upgrade-4.0.15-2.fc35.noarch
dnf-utils-4.0.24-1.fc36.noarch


How reproducible:
always

Steps to Reproduce:
1. check that hunspell package is already installed
2. sudo dnf install langpacks-fr
3.

Actual results:
Observe that hunspell-fr is not installed

Expected results:
weakdep hunspell-fr should be installed

Additional info:
[test@fedora ~]$ rpm -qa| grep hunspell
hunspell-en-GB-0.20140811.1-20.fc35.noarch
hunspell-en-0.20140811.1-20.fc35.noarch
hunspell-en-US-0.20140811.1-20.fc35.noarch
hunspell-filesystem-1.7.0-12.fc36.x86_64
hunspell-1.7.0-11.fc35.x86_64
[test@fedora ~]$ sudo dnf install --debugsolver langpacks-fr
Last metadata expiration check: 0:08:26 ago on Thursday 20 January 2022 01:16:22 PM.
Dependencies resolved.
===============================================================================
 Package                     Arch        Version            Repository    Size
===============================================================================
Installing:
 langpacks-fr                noarch      3.0-16.fc36        rawhide      9.2 k
Installing dependencies:
 langpacks-core-font-fr      noarch      3.0-16.fc36        rawhide      9.2 k
 langpacks-core-fr           noarch      3.0-16.fc36        rawhide      9.2 k

Transaction Summary
===============================================================================
Install  3 Packages

Total download size: 28 k
Installed size: 1.1 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): langpacks-core-font-fr-3.0-16.fc36.noar 9.2 kB/s | 9.2 kB     00:00    
(2/3): langpacks-core-fr-3.0-16.fc36.noarch.rp 9.2 kB/s | 9.2 kB     00:01    
(3/3): langpacks-fr-3.0-16.fc36.noarch.rpm     9.1 kB/s | 9.2 kB     00:01    
-------------------------------------------------------------------------------
Total                                           27 kB/s |  28 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                       1/1 
  Installing       : langpacks-core-font-fr-3.0-16.fc36.noarch             1/3 
  Installing       : langpacks-core-fr-3.0-16.fc36.noarch                  2/3 
  Installing       : langpacks-fr-3.0-16.fc36.noarch                       3/3 
  Verifying        : langpacks-core-font-fr-3.0-16.fc36.noarch             1/3 
  Verifying        : langpacks-core-fr-3.0-16.fc36.noarch                  2/3 
  Verifying        : langpacks-fr-3.0-16.fc36.noarch                       3/3 

Installed:
  langpacks-core-font-fr-3.0-16.fc36.noarch                                    
  langpacks-core-fr-3.0-16.fc36.noarch                                         
  langpacks-fr-3.0-16.fc36.noarch                                              

Complete!
[test@fedora ~]$

Comment 1 Parag Nemade 2022-01-20 08:24:37 UTC
Created attachment 1852107 [details]
debugdata testcase.t file

Comment 2 Jaroslav Mracek 2022-01-25 10:11:22 UTC
The change behavior is related to https://fedoraproject.org/wiki/Changes/ExcludeFromWeakAutodetect. The feature can be easilly switched off in /etc/dnf/dnf.conf using `exclude_from_weak_autodetect=false` or for particular command `sudo dnf install --debugsolver langpacks-fr --setopt=`exclude_from_weak_autodetect=false`.

Do you suggest any other step?

Comment 3 Jens Petersen 2022-01-25 11:09:31 UTC
It seems to me that this Change should only affect upgrades not installs, no?

Comment 4 Parag Nemade 2022-01-25 13:42:43 UTC
I think that config option is not good for end users. It is an unnecessary step for them to learn now.

You may want to understand history of langpacks
1) When we were using Yum, yum-langpacks plugin helped to install language support on user's desktop system.
2) Then comes dnf so we tried to convert yum-langpacks to use same transactional hooks and created dnf-langpacks project
3) But there comes some limitation due to DNF architecture which failed to re-resolve the transaction 
4) New proposal comes using weakdeps to help end users to get all the related language support packages using langpacks-<lang> packages

Now https://fedoraproject.org/wiki/Changes/ExcludeFromWeakAutodetect totally removed this functionality for end users automatically. 
I am sure Fedora Linux users will find it difficult for them to install language support on their system.

https://fedoraproject.org/wiki/Changes/ExcludeFromWeakAutodetect broke our i18n langpacks testcase https://fedoraproject.org/wiki/QA:Testcase_langpacks_packages to install language support

There remain no meaning now for https://fedoraproject.org/wiki/Packaging:Langpacks guidelines if we need to manually configure dnf

I request to revert that F36 Change or find some easy way for end users.

Comment 5 Parag Nemade 2022-01-25 13:56:41 UTC
You can check the DNF and Langpacks development history https://fedoraproject.org/wiki/I18N/Langpacks

I think if langpacks-<lang> will not pull all the weakdeps then our gnome-software feature also got broken now. 
See more about it https://sundeep.co.in/blog/2019/07/31/langpacks-autoinstall/

The gnome-software also provide langpacks installation. Just search langpacks in gnome-software.
After this dnf F36 Change, users will not get language support packages which includes glibc-langpacks-*, hunspell-*, libreoffice-langpacks-* packages etc.

Comment 6 Parag Nemade 2022-01-28 05:35:11 UTC
Jaroslav,
Any update here please? We want langpacks to be working similar as they are in Fedora 35.

Comment 7 Jaroslav Mracek 2022-02-07 10:39:29 UTC
It looks like that the feature made a user case with langpacks broken. See additional reports:
Bug 2048394 - dnf should pull weak dependencies in install transaction
Bug 2033130 - exclude_from_weak_autodetect=true effectively renders rich weak dependencies useless

The feature was requested:
Bug 2005305 - dnf should not pull (already unmet) weak dependencies on updates
Bug 1699672 - RFE: dnf should not pull (already broken) weak dependencies on updates

Firs of all I need to clarify that the feature cannot be implemented only on upgrades - because there are technical reasons for that - 
1. DNF creates one transaction for all operations (install, upgrades are performed together).
2.a Install operation or commands (not only install) also triggers update. (example - I have already installed foo-1-1.noarch. Then I will install bar-2-2.noarch that requires foo-2. It means the install command will trigger upgrade that dnf cannot detect in advance. And if foo recommends something, it will be installed)
2.b Install operation with --best (default in RHEL) triggers always upgrade when package is already installed but in lower version.


Be honest I do not know what to do. Basically I see only 3 option with one additional:
1. Keep it like it is
2. Disable autodetection
3. Start to ignore rich dependencies for autodetection of unmet weak dependencies.
       Rich dependencies
4. In theory the auto-detection can be only triggered by upgrade command but it will create an inconsistency in DNF behavior when upgrade operation is triggered by the another command (install, buildeps, downgrade, ...) - not preferable, see above.

Comment 8 Zbigniew Jędrzejewski-Szmek 2022-02-07 20:03:27 UTC

*** This bug has been marked as a duplicate of bug 2033130 ***


Note You need to log in before you can comment on or make changes to this bug.