Bug 1379628

Summary: [RFE] Add "--nodocs" option for install
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 24CC: jmracek, mluscon, packaging-team-maint, pasik, rpm-software-management, vmukhame
Target Milestone: ---Keywords: EasyFix, FutureFeature, Triaged, UserExperience
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-2.2.0-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-01 17:21: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 Neal Gompa 2016-09-27 09:07:28 UTC
Description of problem:
When building chroots/containers using "dnf --installroot=</path/to/root> install", there's no way to further minimize this by declaring that files marked as %doc should not be installed.

RPM has the capability to not install files marked as docs, but DNF doesn't expose it. Somehow, even Anaconda is able to do this (which uses DNF), so I assume there's a way to do this, but if there is, it's not documented at all.

Please add a switch or config option for doing so.

Version-Release number of selected component (if applicable):
1.1.10-1.fc24

Comment 1 Igor Gnatenko 2016-10-03 11:09:09 UTC
rpm.RPMTRANS_FLAG_NODOCS...

docs/yum.conf.5:transaction set. These include 'noscripts', 'notriggers', 'nodocs', 'test', 'justdb' and 'nocontexts'. 'repackage' is also available but that does nothing
yum/__init__.py:                if 'nodocs' in self.conf.tsflags:
yum/__init__.py:                    po.yumdb_info.tsflag_nodocs = 'true'
yum/__init__.py:        #         so someone can add --nogpgcheck or --nodocs or --nodiskspace or some nonsense and have it work
yum/depsolve.py:                            'nodocs': rpm.RPMTRANS_FLAG_NODOCS,
yumcommands.py:            print _("  Nodocs:"), 'nodocs' in base.conf.tsflags
yumcommands.py:        elif extcmds[0] in ('docs', 'nodocs',
yumcommands.py:            c_f = 'nodocs' in base.conf.tsflags
yumcommands.py:                nts = nts + ['nodocs']
yumcommands.py:                nts = [x for x in nts if x != 'nodocs']
yumcommands.py:        c_f = 'nodocs' in base.conf.tsflags
yumcommands.py:            elif c_f != ('true' == pkg.yumdb_info.get('tsflag_nodocs')):

Comment 2 Jaroslav Mracek 2017-02-23 19:32:24 UTC
I created pull request that adds --docs option (https://github.com/rpm-software-management/dnf/pull/748)

Comment 3 Fedora Update System 2017-03-21 12:07:22 UTC
dnf-2.1.1-1.fc26 libdnf-0.8.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-65586fa42b

Comment 4 Fedora Update System 2017-03-21 14:27:00 UTC
dnf-2.1.1-1.1.fc26, libdnf-0.8.0-1.fc26 has been pushed to the Fedora 26 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-2017-65586fa42b

Comment 5 Fedora Update System 2017-03-27 19:20:33 UTC
dnf-2.2.0-1.fc26, libdnf-0.8.0-1.fc26 has been pushed to the Fedora 26 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-2017-65586fa42b

Comment 6 Fedora Update System 2017-04-01 17:21:24 UTC
dnf-2.2.0-1.fc26, libdnf-0.8.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.