Bug 1512663

Summary: dnf impossible to install docs if tsflags=nodocs is in dnf.conf, can't override settings from commandline
Product: [Fedora] Fedora Reporter: Pasi Karkkainen <pasik>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmach, iboverma, jmracek, mhatina, packaging-team-maint, pasik, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-28 08:26:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pasi Karkkainen 2017-11-13 19:44:04 UTC
Description of problem:

Fedora Docker container images contain the following in /etc/dnf/dnf.conf (among others):

tsflags=nodocs

Which results in smaller images because docs aren't installed, which is fine in most cases.. But it seems it's impossible to actually install the docs when one actually wants/needs them for some packages..

So this doesn't work:
dnf reinstall git-core-doc --setopt='tsflags='

I also tried this variant, doesn't work either:
dnf --setopt='tsflags=' reinstall git-core-doc

Only way to get the docs installed is to first remove the tsflags=nodocs line from /etc/dnf/dnf.conf and *then* reinstall the rpms.

For some reason dnf commandline options aren't respected and overriding options set in dnf.conf.


Version-Release number of selected component (if applicable):
dnf-2.7.5-1.fc26.noarch

How reproducible:
Always

Steps to Reproduce:
1. Add "tsflags=nodocs" to /etc/dnf/dnf.conf
2. Try to install rpm with docs included: dnf reinstall git-core-doc --setopt='tsflags='


Actual results:
docs aren't installed by dnf/rpm, setopt tsflags doesn't seem to override /etc/dnf/dnf.conf settings

Expected results:
dnf commandline options should override dnf.conf values and docs should be installed when requested from dnf commandline.

Comment 1 Daniel Mach 2017-11-15 12:15:15 UTC
The --setopt option *appends* to the list of flags that set in configuration.
There is really no way how to disable a flag this way.
DNF team doesn't want to change existing behavior.

Comment 2 Irina Boverman 2017-12-05 02:48:03 UTC
This is not how it works in yum/centos7.
It allows config to be changed by using --setopt='tsflags='.
Why is dnf behaviour different?

Comment 3 Daniel Mach 2017-12-06 12:17:12 UTC
Good point about YUM compatibility.
We'll look into this.

Comment 4 Jaroslav Mracek 2017-12-08 12:08:14 UTC
I created a patch that should solve the issue (https://github.com/rpm-software-management/dnf/pull/998).

Comment 5 Fedora End Of Life 2018-05-03 08:19:38 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 6 Jaroslav Mracek 2018-06-28 08:26:24 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.