Teach rpmdiff about pretrans and posttrans.

git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1877 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
Ville Skyttä 2011-07-26 21:12:58 +00:00
parent ba2ea1bc44
commit 57ff789365
1 changed files with 6 additions and 1 deletions

View File

@ -40,7 +40,8 @@ class Rpmdiff:
rpm.RPMTAG_DESCRIPTION, rpm.RPMTAG_GROUP,
rpm.RPMTAG_LICENSE, rpm.RPMTAG_URL,
rpm.RPMTAG_PREIN, rpm.RPMTAG_POSTIN,
rpm.RPMTAG_PREUN, rpm.RPMTAG_POSTUN)
rpm.RPMTAG_PREUN, rpm.RPMTAG_POSTUN,
rpm.RPMTAG_PRETRANS, rpm.RPMTAG_POSTTRANS)
PRCO = ( 'REQUIRES', 'PROVIDES', 'CONFLICTS', 'OBSOLETES')
@ -188,6 +189,10 @@ class Rpmdiff:
ss.append("preun")
elif req & rpm.RPMSENSE_SCRIPT_POSTUN:
ss.append("postun")
elif req & getattr(rpm, "RPMSENSE_PRETRANS", 1 << 7): # rpm >= 4.9.0
ss.append("pretrans")
elif req & getattr(rpm, "RPMSENSE_POSTTRANS", 1 << 5): # rpm >= 4.9.0
ss.append("posttrans")
if ss:
s += "(%s)" % ",".join(ss)