[Yum-devel] [PATCH] - multiple checks to make sure we're not trying to install a deltarpm directly - also make sure no bogons filter in for localinstall.
Seth Vidal
skvidal at fedoraproject.org
Wed Jun 23 18:58:14 UTC 2010
---
cli.py | 4 ++++
yum/__init__.py | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/cli.py b/cli.py
index 2f1479b..fc4ee1c 100644
--- a/cli.py
+++ b/cli.py
@@ -863,6 +863,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
installing = False
for pkg in filelist:
+ if not pkg.endswith('.rpm'):
+ self.verbose_logger.log(yum.logginglevels.INFO_2,
+ "Skipping: %s, filename does not end in .rpm.", pkg)
+ continue
txmbrs = self.installLocal(pkg, updateonly=updateonly)
if txmbrs:
installing = True
diff --git a/yum/__init__.py b/yum/__init__.py
index 9a0bc15..dc7c7ef 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3709,6 +3709,11 @@ class YumBase(depsolve.Depsolve):
self.verbose_logger.log(logginglevels.INFO_2,
_('Examining %s: %s'), po.localpath, po)
+ # apparently someone wanted to try to install a drpm as an rpm :(
+ if po.hdr['payloadformat'] == 'drpm':
+ self.logger.critical(_('Cannot localinstall deltarpm: %s. Skipping.'), pkg)
+ return tx_return
+
# if by any chance we're a noncompat arch rpm - bail and throw out an error
# FIXME -our archlist should be stored somewhere so we don't have to
# do this: but it's not a config file sort of thing
--
1.7.0.1
More information about the Yum-devel
mailing list