Bug 1379628 - [RFE] Add "--nodocs" option for install
Summary: [RFE] Add "--nodocs" option for install
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 24
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: EasyFix, FutureFeature, Triaged, UserExperience
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-27 09:07 UTC by Neal Gompa
Modified: 2017-11-13 18:40 UTC (History)
6 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-04-01 17:21:24 UTC


Attachments (Terms of Use)

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.


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