From: Dohyung Kim Date: Thu, 4 May 2017 01:19:10 +0000 (+0900) Subject: print warning message for detecting rpm post script failed X-Git-Tag: accepted/tizen/devbase/tools/20190927.044807~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=351fdbee9aacb2f8c4b9829e228bd48e2dacdc90;p=tools%2Fmic.git print warning message for detecting rpm post script failed ... [05/04 01:13:18 UTC] Installing: libstdc++ [05/04 01:13:18 UTC] (libstdc++) Post script failed ... Signed-off-by: Dohyung Kim Change-Id: I8efc466b3a18e9c9f2bde05ad26d058178cf90b8 --- diff --git a/mic/utils/rpmmisc.py b/mic/utils/rpmmisc.py index f2e5585..135e458 100644 --- a/mic/utils/rpmmisc.py +++ b/mic/utils/rpmmisc.py @@ -188,6 +188,20 @@ class RPMInstallCallback: elif what == rpm.RPMCALLBACK_REPACKAGE_PROGRESS: pass + elif what == rpm.RPMCALLBACK_SCRIPT_ERROR: + if h is not None: + try: + hdr, rpmloc = h + except: + rpmloc = h + + m = re.match("(.*)-(\d+.*)-(\d+\.\d+)\.(.+)\.rpm", os.path.basename(rpmloc)) + if m: + pkgname = m.group(1) + else: + pkgname = os.path.basename(rpmloc) + + msger.warning('(%s) Post script failed' % pkgname) def readRpmHeader(ts, filename): """ Read an rpm header. """