Gracefully handle the case only delta rpm is available
authorZhang Qiang <qiang.z.zhang@intel.com>
Mon, 17 Oct 2011 05:43:13 +0000 (13:43 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Mon, 17 Oct 2011 05:43:13 +0000 (13:43 +0800)
Note: yum doesn't support delta rpm, if only .drpm is available in,
repo mic2 will fail with an uncatched exception, this commit
will catch such exception and tell the user what happened, fix
bug #12993

plugins/backend/yumpkgmgr.py

index 656914b..8cb4b71 100644 (file)
@@ -403,7 +403,8 @@ class Yum(BackendPlugin, yum.YumBase):
             self._cleanupRpmdbLocks(self.conf.installroot)
             msger.disable_logstderr()
             return ret
-
+        except rpmUtils.RpmUtilsError, e:
+            raise CreatorError("%s, notice: mic doesn't support delta rpm, please check whether all the packages have .rpm available" % e)
         except yum.Errors.RepoError, e:
             raise CreatorError("Unable to download from repo : %s" % (e,))
         except yum.Errors.YumBaseError, e: