Bug 1331100 - [PATCH] Turn off weak deps. for DNF.
Summary: [PATCH] Turn off weak deps. for DNF.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1325437 (view as bug list)
Depends On:
Blocks: base-minimization 1325437
TreeView+ depends on / blocked
 
Reported: 2016-04-27 17:51 UTC by James Antill
Modified: 2016-05-18 13:48 UTC (History)
9 users (show)

Fixed In Version: anaconda-24.13.5-1 anaconda-24.13.5-1.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-17 15:12:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Turn off weak deps. for DNF. (788 bytes, text/plain)
2016-04-27 17:51 UTC, James Antill
no flags Details
Implement switch to turn off weakdeps (--excludeWeakdeps). (860 bytes, text/plain)
2016-04-29 20:43 UTC, James Antill
no flags Details
The magic behind the anaconda bits. (3.11 KB, patch)
2016-04-29 21:42 UTC, James Antill
no flags Details | Diff

Description James Antill 2016-04-27 17:51:15 UTC
Created attachment 1151493 [details]
Turn off weak deps. for DNF.

Description of problem:

 Currently weak deps. are on for all installs, this causes two problems:

1. Minimal kickstart installs aren't minimal anymore.
2. Installs aren't reproducible due to weak deps. being able to silently fail.

...the patch turns them off for everything, turning them off just for kickstart would be enough for me though.

 Patch attached.

Comment 1 David Shea 2016-04-27 18:33:24 UTC
Blindly disabling weak deps would break features that expect weak deps. As a fer-instance, langpacks was recently re-implemented using weak deps: a langpack is selected by installing a langpacks-<lang> package, and language-specific subpackages are implemented with a Supplements: (<parent> and langpacks-<lang>). One package that now uses this method that you may be using is glibc.

So, no, this patch will not work for all use cases, even if it were just limited to kickstart, and it would probably be worthwhile having an actual distro-wide discussion about this behavior and what is expected of it.

Comment 2 James Antill 2016-04-27 19:13:33 UTC
Can we have something like the excludeDocs/instLangs configuration then? If you point me to the right place I could extend the patch (I can't see how self.data.packages.instLangs is setup off hand).

I don't mind having a "discussion" on f-d-l or whatever, but I'm not sure what it would be about or what it could achieve.

One side has turned deps. into weak deps. and thus. weak deps. into deps. (that can fail silently, yay) ... the other side doesn't want 666 extra things in the install for every image/container/whatever.

Comment 3 Honza Silhan 2016-04-29 13:23:15 UTC
David is right that setting `install_weak_deps=False` would disable langpacks installation. But do we really want to include langpacks in minimal image? They should not be turned off by default but it would be great to have switch in anaconda that would disable them all including langpacks.

Comment 4 Ian McLeod 2016-04-29 17:35:01 UTC
Another +1 on making it a configurable option in the kickstart.

An Anaconda kickstart install is the starting point for our workflow to generate Docker base images.  cpacheco has done some great work on how to make the resulting images smaller. Excluding weak deps is a key element.

Comment 5 James Antill 2016-04-29 20:43:52 UTC
Created attachment 1152402 [details]
Implement switch to turn off weakdeps (--excludeWeakdeps).

Ok, I eventually found out that the setup part is "magic" ... so this implements the switch for kickstart.

Comment 6 David Shea 2016-04-29 20:51:23 UTC
(In reply to James Antill from comment #2)
> Can we have something like the excludeDocs/instLangs configuration then? If
> you point me to the right place I could extend the patch (I can't see how
> self.data.packages.instLangs is setup off hand).

It comes from pykickstart. The handler for the %packages section has a bunch of optparse (soon to be argparse) arguments that it adds to the header.

https://github.com/rhinstaller/pykickstart/blob/pykickstart-2/pykickstart/sections.py#L244

Comment 7 James Antill 2016-04-29 21:42:58 UTC
Created attachment 1152418 [details]
The magic behind the anaconda bits.

This is patch goes with the other but is for pykickstart, includes testcase. Modeled off of multilib option.

Comment 8 David Shea 2016-05-02 14:21:15 UTC
I converted your patches into pull requests.

https://github.com/rhinstaller/pykickstart/pull/78 is against the master branch of pykickstart.

https://github.com/rhinstaller/pykickstart/pull/79 is a port of the pykickstart patch to pykickstart-2, which is what is currently in rawhide

https://github.com/rhinstaller/anaconda/pull/614 is the anaconda patch.

Comment 9 David Shea 2016-05-02 18:44:25 UTC
*** Bug 1325437 has been marked as a duplicate of this bug. ***

Comment 10 Fedora Update System 2016-05-13 18:32:27 UTC
python-blivet-1.20.2-1.fc24 anaconda-24.13.5-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1a7f1df025

Comment 11 Fedora Update System 2016-05-15 06:56:44 UTC
anaconda-24.13.5-1.fc24, python-blivet-1.20.2-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1a7f1df025

Comment 12 Fedora Update System 2016-05-17 15:12:15 UTC
anaconda-24.13.5-1.fc24, python-blivet-1.20.2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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