client/rhel/yum-rhn-plugin/actions/packages.py | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 32b633cda7cbeedc120478f2681255fdeb6e0200 Author: Miroslav Suchý msuchy@redhat.com Date: Tue Aug 2 14:38:04 2011 +0200
690616 - fail to rollback if target package is not available
diff --git a/client/rhel/yum-rhn-plugin/actions/packages.py b/client/rhel/yum-rhn-plugin/actions/packages.py index fd539cf..de1c3a6 100644 --- a/client/rhel/yum-rhn-plugin/actions/packages.py +++ b/client/rhel/yum-rhn-plugin/actions/packages.py @@ -253,6 +253,11 @@ class YumAction(yum.YumBase): pkgs = self.pkgSack.searchNevra(name=pkgkeys['name'], epoch=pkgkeys['epoch'], arch=pkgkeys['arch'], ver=pkgkeys['version'], rel=pkgkeys['release']) + if not pkgs: + raise yum.Errors.YumBaseError, \ + "Cannot find package %s:%s-%s-%s.%s in any of enabled repositories." \ + % (pkgkeys['epoch'], pkgkeys['name'], pkgkeys['version'], + pkgkeys['release'], pkgkeys['arch']) for po in pkgs: self.tsInfo.addInstall(po) elif action == 'e':