[Yum] [PATCH] Adds an excludedocs option
Steve Hill
steve at navaho.co.uk
Mon May 10 15:24:01 UTC 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The attached patch against yum 2.0.6 adds an excludedocs option.
Specifying "excludedocs=1" in the confid file makes yum exclude the docs
from the rpm install (like rpm --excludedocs).
It doesn't work on some badly written RPMs which either don't mark the
docs as documentation or expect the docs to always be installed, but
that's a problem with the RPMs themselves, not with yum.
- - Steve Hill
Senior Software Developer Email: steve at navaho.co.uk
Navaho Technologies Ltd. Tel: +44-870-7034015
... Alcohol and calculus don't mix - Don't drink and derive! ...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Public key available at http://linux.navaho.co.uk/pubkey.steve.txt
iD8DBQFAn56Rb26jEkrydY4RAkf0AJ44UMOowtPNNa623W+nQkIdZKZ/MACgsrMm
fC9iZSMpPyESAp/euolV9AM=
=p7qp
-----END PGP SIGNATURE-----
-------------- next part --------------
diff -urN yum.vanilla/config.py yum/config.py
--- yum.vanilla/config.py 2004-04-30 17:44:49.000000000 +0100
+++ yum/config.py 2004-05-10 15:47:58.000000000 +0100
@@ -73,6 +73,7 @@
self.yumversion = 'unversioned'
self.commands = None
self.exactarch = 0
+ self.excludedocs = 0
self.overwrite_groups = 0
self.groups_enabled = 0
self.diskspacecheck = 1
@@ -117,6 +118,8 @@
self.errorlevel = self._getoption('main', 'errorlevel')
if self._getoption('main','exactarch') != None:
self.exactarch = self.cfg.getboolean('main', 'exactarch')
+ if self._getoption('main','excludedocs') != None:
+ self.excludedocs = self.cfg.getboolean('main', 'excludedocs')
if self._getoption('main','overwrite_groups') != None:
self.overwrite_groups = self.cfg.getboolean('main', 'overwrite_groups')
if self._getoption('main','diskspacecheck') != None:
diff -urN yum.vanilla/yummain.py yum/yummain.py
--- yum.vanilla/yummain.py 2004-05-10 15:45:40.000000000 +0100
+++ yum/yummain.py 2004-05-10 15:49:01.000000000 +0100
@@ -351,6 +351,8 @@
# FIXME the actual run should probably be elsewhere and this should be
# inside a try, except set
tsfin = tsInfo.populateTs(addavailable = 0, localrpm = 1)
+ if conf.excludedocs:
+ tsfin.setFlags(rpm.RPMTRANS_FLAG_NODOCS);
if conf.diskspacecheck == 0:
tsfin.setProbFilter(rpm.RPMPROB_FILTER_DISKSPACE)
More information about the Yum
mailing list