wiki:Packages/rpm/rpm-python/rpm

Version 4 (modified by yasumichi, 11 years ago) (diff)

--

rpm

関数

_doHeaderListFromFD
archscore built-in
checkSignals built-in
dsSingle
expandMacro built-in
headerLoad
labelCompare built-in
mergeHeaderListFromFD built-in
readHeaderFromFD
readHeaderListFromFile
setEpochPromote built-in
setLogFile built-in
setStats built-in

クラス

error _rpm.error
TransactionSet?rpm.transaction.TransactionSet
ts rpm.transaction.TransactionSet

ds rpm.ds
fd rpm.fd
fi rpm.fi
hdr rpm.hdr
keyringrpm.keyring
mi rpm.mi
prob rpm.prob
spec rpm.spec
te rpm.te

定数

HEADERCONV_*

HEADERCONV_EXPANDFILELIST 0
HEADERCONV_COMPRESSFILELIST 1
HEADERCONV_RETROFIT_V3 2

RPMBUILD_*

RPMBUILD_ISSOURCE 1
RPMBUILD_ISPATCH 2
RPMBUILD_ISICON 4

RPMCALLBACK_*

RPMCALLBACK_UNKNOWN 0
RPMCALLBACK_INST_PROGRESS 1
RPMCALLBACK_INST_START 2
RPMCALLBACK_INST_CLOSE_FILE 8
RPMCALLBACK_TRANS_PROGRESS 16
RPMCALLBACK_TRANS_START 32
RPMCALLBACK_TRANS_STOP 64
RPMCALLBACK_UNINST_PROGRESS 128
RPMCALLBACK_UNINST_START 256
RPMCALLBACK_UNINST_STOP 512
RPMCALLBACK_REPACKAGE_PROGRESS 1024
RPMCALLBACK_REPACKAGE_START 2048
RPMCALLBACK_REPACKAGE_STOP 4096
RPMCALLBACK_UNPACK_ERROR 8192
RPMCALLBACK_CPIO_ERROR 16384
RPMCALLBACK_SCRIPT_ERROR 32768

RPMDBI_*

RPMDBI_PACKAGES 0
RPMDBI_LABEL 2

RPMDEP_*

RPMDEP_SENSE_REQUIRES 0
RPMDEP_SENSE_CONFLICTS 1

RPMFILE_*

RPMFILE_DOC 2
RPMFILE_MISSINGOK 8
RPMFILE_LICENSE 128
RPMFILE_README 256
RPMFILE_EXCLUDE 512
RPMFILE_PUBKEY 2048

RPMFILE_STATE_*

RPMFILE_STATE_NORMAL 0
RPMFILE_STATE_REPLACED 1
RPMFILE_STATE_NOTINSTALLED 2
RPMFILE_STATE_NETSHARED 3
RPMFILE_STATE_WRONGCOLOR 4

RPMMIRE_*

RPMMIRE_DEFAULT 0
RPMMIRE_STRCMP 1
RPMMIRE_REGEX 2

RPMLOG_*

RPMLOG_EMERG 0
RPMLOG_ALERT 1
RPMLOG_CRIT 2
RPMLOG_ERR 3
RPMLOG_WARNING 4
RPMLOG_NOTICE 5
RPMLOG_INFO 6

RPMPROB_*

RPMPROB_BADOS 1
RPMPROB_REQUIRES 4
RPMPROB_CONFLICT 5
RPMPROB_NEW_FILE_CONFLICT 6
RPMPROB_FILE_CONFLICT 7
RPMPROB_OLDPACKAGE 8
RPMPROB_DISKSPACE 9

RPMPROB_FILTER_*

RPMPROB_FILTER_IGNOREOS 1
RPMPROB_FILTER_IGNOREARCH 2
RPMPROB_FILTER_FORCERELOCATE 8
RPMPROB_FILTER_REPLACENEWFILES 16
RPMPROB_FILTER_REPLACEOLDFILES 32
RPMPROB_FILTER_OLDPACKAGE 64

RPMRC_*

RPMRC_OK 0
RPMRC_NOTFOUND 1
RPMRC_FAIL 2
RPMRC_NOTTRUSTED 3
RPMRC_NOKEY 4

RPMSENSE_*

RPMSENSE_ANY 0
RPMSENSE_LESS 2
RPMSENSE_GREATER 4
RPMSENSE_EQUAL 8
RPMSENSE_PREREQ 64
RPMSENSE_SCRIPT_POST 1024
RPMSENSE_SCRIPT_PREUN 2048
RPMSENSE_SCRIPT_POSTUN 4096
RPMSENSE_SCRIPT_VERIFY 8192
RPMSENSE_FIND_REQUIRES 16384
RPMSENSE_FIND_PROVIDES 32768
RPMSENSE_TRIGGERIN 65536
RPMSENSE_TRIGGERUN 131072
RPMSENSE_TRIGGERPOSTUN 262144
RPMSENSE_SCRIPT_INSTALL 4194304
RPMSENSE_SCRIPT_PREP 1048576
RPMSENSE_SCRIPT_BUILD 2097152
RPMSENSE_SCRIPT_CLEAN 8388608
RPMSENSE_KEYRING 67108864
RPMSENSE_PATCHES 134217728
RPMSENSE_CONFIG 268435456

RPMTAG_*

RPMTAG_HEADERIMAGE 61
RPMTAG_HEADERSIGNATURES 62
RPMTAG_HEADERIMMUTABLE 63
RPMTAG_HEADERREGIONS 64
RPMTAG_HEADERI18NTABLE 100
RPMTAG_SIGSIZE 257
RPMTAG_SIGPGP 259
RPMTAG_PKGID 261
RPMTAG_SIGMD5 261
RPMTAG_SIGGPG 262
RPMTAG_PUBKEYS 266
RPMTAG_DSAHEADER 267
RPMTAG_HDRID 269
RPMTAG_LONGSIGSIZE 270
RPMTAG_N 1000
RPMTAG_NAME 1000
RPMTAG_V 1001
RPMTAG_R 1002
RPMTAG_E 1003
RPMTAG_EPOCH 1003
RPMTAG_DESCRIPTION 1005
RPMTAG_BUILDHOST 1007
RPMTAG_INSTALLTIME 1008
RPMTAG_SIZE 1009
RPMTAG_DISTRIBUTION 1010
RPMTAG_VENDOR 1011
RPMTAG_GIF 1012
RPMTAG_LICENSE 1014
RPMTAG_PACKAGER 1015
RPMTAG_GROUP 1016
RPMTAG_SOURCE 1018
RPMTAG_PATCH 1019
RPMTAG_URL 1020
RPMTAG_OS 1021
RPMTAG_ARCH 1022
RPMTAG_PREIN 1023
RPMTAG_POSTIN 1024
RPMTAG_PREUN 1025
RPMTAG_POSTUN 1026
RPMTAG_FILESIZES 1028
RPMTAG_FILEMODES 1030
RPMTAG_FILERDEVS 1033
RPMTAG_FILEMTIMES 1034
RPMTAG_FILEDIGESTS 1035
RPMTAG_FILELINKTOS 1036
RPMTAG_FILEFLAGS 1037
RPMTAG_FILEGROUPNAME 1040
RPMTAG_ICON 1043
RPMTAG_SOURCERPM 1044
RPMTAG_FILEVERIFYFLAGS 1045
RPMTAG_P 1047
RPMTAG_REQUIRES 1049
RPMTAG_REQUIREVERSION 1050
RPMTAG_NOSOURCE 1051
RPMTAG_NOPATCH 1052
RPMTAG_C 1054
RPMTAG_CONFLICTS 1054
RPMTAG_CONFLICTFLAGS 1053
RPMTAG_CONFLICTNAME 1054
RPMTAG_CONFLICTVERSION 1055
RPMTAG_EXCLUDEARCH 1059
RPMTAG_EXCLUDEOS 1060
RPMTAG_EXCLUSIVEARCH 1061
RPMTAG_EXCLUSIVEOS 1062
RPMTAG_RPMVERSION 1064
RPMTAG_TRIGGERSCRIPTS 1065
RPMTAG_TRIGGERNAME 1066
RPMTAG_TRIGGERVERSION 1067
RPMTAG_TRIGGERFLAGS 1068
RPMTAG_TRIGGERINDEX 1069
RPMTAG_VERIFYSCRIPT 1079
RPMTAG_CHANGELOGTEXT 1082
RPMTAG_POSTINPROG 1086
RPMTAG_POSTUNPROG 1088
RPMTAG_BUILDARCHS 1089
RPMTAG_O 1090
RPMTAG_OBSOLETENAME 1090
RPMTAG_VERIFYSCRIPTPROG 1091
RPMTAG_TRIGGERSCRIPTPROG 1092
RPMTAG_FILEDEVICES 1095
RPMTAG_FILEINODES 1096
RPMTAG_FILELANGS 1097
RPMTAG_PREFIXES 1098
RPMTAG_INSTPREFIXES 1099
RPMTAG_CAPABILITY 1105
RPMTAG_SOURCEPACKAGE 1106
RPMTAG_PROVIDEFLAGS 1112
RPMTAG_PROVIDEVERSION 1113
RPMTAG_OBSOLETEFLAGS 1114
RPMTAG_OBSOLETEVERSION 1115
RPMTAG_DIRINDEXES 1116
RPMTAG_BASENAMES 1117
RPMTAG_DIRNAMES 1118
RPMTAG_ORIGDIRINDEXES 1119
RPMTAG_ORIGBASENAMES 1120
RPMTAG_ORIGDIRNAMES 1121
RPMTAG_OPTFLAGS 1122
RPMTAG_DISTURL 1123
RPMTAG_PAYLOADFORMAT 1124
RPMTAG_PAYLOADFLAGS 1126
RPMTAG_INSTALLCOLOR 1127
RPMTAG_INSTALLTID 1128
RPMTAG_REMOVETID 1129
RPMTAG_RHNPLATFORM 1131
RPMTAG_PATCHESNAME 1133
RPMTAG_PATCHESVERSION 1135
RPMTAG_FILECOLORS 1140
RPMTAG_FILECLASS 1141
RPMTAG_CLASSDICT 1142
RPMTAG_FILEDEPENDSX 1143
RPMTAG_FILEDEPENDSN 1144
RPMTAG_DEPENDSDICT 1145
RPMTAG_SOURCEPKGID 1146
RPMTAG_FILECONTEXTS 1147
RPMTAG_FSCONTEXTS 1148
RPMTAG_POLICIES 1150
RPMTAG_PRETRANS 1151
RPMTAG_POSTTRANS 1152
RPMTAG_PRETRANSPROG 1153
RPMTAG_DBINSTANCE 1195
RPMTAG_NVRA 1196
RPMTAG_FILEREQUIRE 5002
RPMTAG_FSSIZES 5004
RPMTAG_TRIGGERCONDS 5005
RPMTAG_TRIGGERTYPE 5006
RPMTAG_LONGFILESIZES 5008
RPMTAG_FILECAPS 5010
RPMTAG_FILEDIGESTALGO 5011
RPMTAG_BUGURL 5012
RPMTAG_EVR 5013
RPMTAG_NEVR 5015
RPMTAG_NEVRA 5016
RPMTAG_EPOCHNUM 5019

RPMTRANS_FLAG_*

RPMTRANS_FLAG_TEST 1
RPMTRANS_FLAG_BUILD_PROBS 2
RPMTRANS_FLAG_NOSCRIPTS 4
RPMTRANS_FLAG_NODOCS 32
RPMTRANS_FLAG_ALLFILES 64
RPMTRANS_FLAG_KEEPOBSOLETE 128
RPMTRANS_FLAG_REPACKAGE 1024
RPMTRANS_FLAG_REVERSE 32768
RPMTRANS_FLAG_NOPRE 131072
RPMTRANS_FLAG_NOPOST 262144
RPMTRANS_FLAG_NOTRIGGERIN 524288
RPMTRANS_FLAG_NOTRIGGERUN 1048576
RPMTRANS_FLAG_NOPREUN 2097152
RPMTRANS_FLAG_NOPOSTUN 4194304
RPMTRANS_FLAG_NOTRIGGERPOSTUN 8388608
RPMTRANS_FLAG_NOFILEDIGEST 134217728
RPMTRANS_FLAG_NOMD5 134217728
RPMTRANS_FLAG_NOSUGGEST 268435456
RPMTRANS_FLAG_ADDINDEPS 536870912

_RPMVSF_*

_RPMVSF_NOPAYLOAD 983040
_RPMVSF_NODIGESTS 197376

RPMVSF_*

RPMVSF_DEFAULT 0
RPMVSF_NEEDPAYLOAD 2
RPMVSF_NOSHA1HEADER 256
RPMVSF_NOMD5HEADER 512
RPMVSF_NORSAHEADER 2048
RPMVSF_NOSHA1 65536

TR_*

TR_ADDED 1
TR_REMOVED 2

VERIFY_*

VERIFY_DIGEST 524288
VERIFY_SIGNATURE 1048576

Other

doc RPM Module\n\nThis module enables you to manipulate rpms and the rpm database.\n\n
file /usr/lib64/python2.6/site-packages/rpm/init.pyc
package rpm
path \['/usr/lib64/python2.6/site-packages/rpm'\]
version 4.8.1
version_info('4', '8', '1')
'RPMVSF_NOHDRCHK': 1, 'RPMTAG_ORIGFILENAMES': 5007, 'RPMTAG_OBSOLETES': 1090, 'RPMTAG_LONGARCHIVESIZE': 271, 'RPMVSF_NODSA': 262144, 'RPMTAG_CHANGELOGTIME': 1080, 'RPMTAG_SHA1HEADER': 269, 'specPkg': <type 'rpm.specpkg'>, 'RPMTAG_VERBOSE': 5018, 'pubkey': <type 'rpm.pubkey'>, 'RPMSENSE_RPMLIB': 16777216, 'RPMSENSE_SCRIPT_PRE': 512, 'RPMTAG_XPM': 1013, 'RPMTAG_POSTTRANSPROG': 1154, 'RPMTAG_ARCHIVESIZE': 1046, 'RPMTAG_LONGSIZE': 5009, 'RPMTAG_NVR': 5014, 'transaction': <module 'rpm.transaction' from '/usr/lib64/python2.6/site-packages/rpm/transaction.pyc'>, 'RPMVSF_NOMD5': 131072, 'versionCompare': <built-in function versionCompare>, 'RPMSENSE_TRIGGERPREIN': 33554432, 'RPMFILE_GHOST': 64, 'rpm': <module 'rpm' from '/usr/lib64/python2.6/site-packages/rpm/__init__.pyc'>, 'warnings': <module 'warnings' from '/usr/lib64/python2.6/warnings.pyc'>, 'RPMPROB_FILTER_DISKNODES': 256, 'RPMTAG_PATCHESFLAGS': 1134, 'RPMTAG_FSNAMES': 5003, 'RPMTAG_REQUIRENAME': 1049, 'RPMPROB_BADRELOCATE': 3, 'RPMTAG_FILESTATES': 1029, 'RPMTRANS_FLAG_NOTRIGGERPREIN': 65536, 'RPMTRANS_FLAG_JUSTDB': 8, 'RPMTAG_FILEUSERNAME': 1039, 'RPMPROB_DISKNODES': 10, 'readHeaderListFromFD': <function readHeaderListFromFD at 0x7f8919a5fcf8>, 'RPMTAG_PREUNPROG': 1087, '__name__': 'rpm', 'RPMTAG_DISTTAG': 1155, 'RPMTAG_COOKIE': 1094, 'RPMTAG_RECONTEXTS': 1149, 'delMacro': <built-in function delMacro>, 'os': <module 'os' from '/usr/lib64/python2.6/os.pyc'>, 'RPMFILE_NOREPLACE': 16, 'RPMTAG_BUILDTIME': 1006, 'RPMTAG_NOT_FOUND': -1, 'RPMTRANS_FLAG_NOTRIGGERS': 16, 'log': <built-in function log>, '_rpmb': <module 'rpm._rpmb' from '/usr/lib64/python2.6/site-packages/rpm/_rpmbmodule.so'>, 'addMacro': <built-in function addMacro>, 'signalCaught': <built-in function signalCaught>, 'RPMSENSE_INTERP': 256, 'RPMFILE_CONFIG': 1, 'RPMTRANS_FLAG_NOCONTEXTS': 256, 'RPMCALLBACK_INST_OPEN_FILE': 4, 'RPMPROB_FILTER_DISKSPACE': 128, 'RPMTAG_HEADERCOLOR': 5017, '_RPMVSF_NOHEADER': 3840, 'RPMTAG_PAYLOADCOMPRESSOR': 1125, 'RPMVSF_NORSA': 524288, 'RPMLOG_DEBUG': 7, 'RPMPROB_BADARCH': 0, 'RPMTAG_FILEMD5S': 1035, 'RPMTAG_FILENAMES': 5000, 'RPMTAG_REQUIREFLAGS': 1048, 'RPMPROB_FILTER_REPLACEPKG': 4, 'RPMTAG_VERSION': 1001, 'RPMTRANS_FLAG_NOCONFIGS': 1073741824, '_RPMVSF_NOSIGNATURES': 789504, 'RPMTAG_RELEASE': 1002, 'RPMTAG_FILEPROVIDE': 5001, 'signalsCaught': <function signalsCaught at 0x7f8919a775f0>, 'RPMTAG_PROVIDES': 1047, 'RPMFILE_UNPATCHED': 1024, 'RPMTAG_CHANGELOGNAME': 1081, 'RPMTAG_SUMMARY': 1004, 'RPMTAG_RSAHEADER': 268, 'RPMBUILD_ISNO': 8, 'RPMTAG_PLATFORM': 1132, 'RPMVSF_NODSAHEADER': 1024, 'RPMTAG_OLDFILENAMES': 1027, 'RPMMIRE_GLOB': 3, 'RPMTAG_PROVIDENAME': 1047, 'setVerbosity': <built-in function setVerbosity>, 'RPMTAG_PREINPROG': 1085, 'RPMPROB_PKG_INSTALLED': 2, 'tagnames': {1024: 'POSTIN', 1025: 'PREUN', 1026: 'POSTUN', 1027: 'OLDFILENAMES', 1028: 'FILESIZES', 1029: 'FILESTATES', 1030: 'FILEMODES', 1033: 'FILERDEVS', 1034: 'FILEMTIMES', 1035: 'FILEMD5S', 1036: 'FILELINKTOS', 1037: 'FILEFLAGS', 1039: 'FILEUSERNAME', 1040: 'FILEGROUPNAME', 1043: 'ICON', 1044: 'SOURCERPM', 1045: 'FILEVERIFYFLAGS', 1046: 'ARCHIVESIZE', 1047: 'PROVIDES', 1048: 'REQUIREFLAGS', 1049: 'REQUIRES', 1050: 'REQUIREVERSION', 1051: 'NOSOURCE', 1052: 'NOPATCH', 1053: 'CONFLICTFLAGS', 1054: 'CONFLICTS', 1055: 'CONFLICTVERSION', 1059: 'EXCLUDEARCH', 1060: 'EXCLUDEOS', 1061: 'EXCLUSIVEARCH', 1062: 'EXCLUSIVEOS', 1064: 'RPMVERSION', 1065: 'TRIGGERSCRIPTS', 1066: 'TRIGGERNAME', 1067: 'TRIGGERVERSION', 1068: 'TRIGGERFLAGS', 1069: 'TRIGGERINDEX', 1079: 'VERIFYSCRIPT', 1080: 'CHANGELOGTIME', 1081: 'CHANGELOGNAME', 1082: 'CHANGELOGTEXT', 61: 'HEADERIMAGE', 62: 'HEADERSIGNATURES', 63: 'HEADERIMMUTABLE', 64: 'HEADERREGIONS', 1089: 'BUILDARCHS', 1090: 'OBSOLETES', 1091: 'VERIFYSCRIPTPROG', 1092: 'TRIGGERSCRIPTPROG', 1094: 'COOKIE', 1095: 'FILEDEVICES', 1096: 'FILEINODES', 1097: 'FILELANGS', 1098: 'PREFIXES', 1099: 'INSTPREFIXES', 1105: 'CAPABILITY', 1106: 'SOURCEPACKAGE', 1112: 'PROVIDEFLAGS', 1124: 'PAYLOADFORMAT', 1114: 'OBSOLETEFLAGS', 1115: 'OBSOLETEVERSION', 1116: 'DIRINDEXES', 1117: 'BASENAMES', 1118: 'DIRNAMES', 1119: 'ORIGDIRINDEXES', 1120: 'ORIGBASENAMES', 1121: 'ORIGDIRNAMES', 1122: 'OPTFLAGS', 1123: 'DISTURL', 100: 'HEADERI18NTABLE', 1125: 'PAYLOADCOMPRESSOR', 1126: 'PAYLOADFLAGS', 1127: 'INSTALLCOLOR', 1128: 'INSTALLTID', 1129: 'REMOVETID', 1131: 'RHNPLATFORM', 1132: 'PLATFORM', 1133: 'PATCHESNAME', 1134: 'PATCHESFLAGS', 1135: 'PATCHESVERSION', 1140: 'FILECOLORS', 1141: 'FILECLASS', 1142: 'CLASSDICT', 1143: 'FILEDEPENDSX', 1144: 'FILEDEPENDSN', 1145: 'DEPENDSDICT', 1146: 'SOURCEPKGID', 1147: 'FILECONTEXTS', 1148: 'FSCONTEXTS', 1149: 'RECONTEXTS', 1150: 'POLICIES', 1151: 'PRETRANS', 1152: 'POSTTRANS', 1153: 'PRETRANSPROG', 1154: 'POSTTRANSPROG', 1155: 'DISTTAG', 1113: 'PROVIDEVERSION', 1195: 'DBINSTANCE', 1196: 'NVRA', 257: 'SIGSIZE', 259: 'SIGPGP', 261: 'SIGMD5', 262: 'SIGGPG', 266: 'PUBKEYS', 267: 'DSAHEADER', 268: 'RSAHEADER', 269: 'SHA1HEADER', 270: 'LONGSIGSIZE', 271: 'LONGARCHIVESIZE', 1085: 'PREINPROG', 1086: 'POSTINPROG', 1087: 'PREUNPROG', 1088: 'POSTUNPROG', 5000: 'FILENAMES', 5001: 'FILEPROVIDE', 5002: 'FILEREQUIRE', 5003: 'FSNAMES', 5004: 'FSSIZES', 5005: 'TRIGGERCONDS', 5006: 'TRIGGERTYPE', 5007: 'ORIGFILENAMES', 5008: 'LONGFILESIZES', 5009: 'LONGSIZE', 5010: 'FILECAPS', 5011: 'FILEDIGESTALGO', 5012: 'BUGURL', 5013: 'EVR', 5014: 'NVR', 5015: 'NEVR', 5016: 'NEVRA', 5017: 'HEADERCOLOR', 5018: 'VERBOSE', 5019: 'EPOCHNUM', 1000: 'NAME', 1001: 'VERSION', 1002: 'RELEASE', 1003: 'EPOCH', 1004: 'SUMMARY', 1005: 'DESCRIPTION', 1006: 'BUILDTIME', 1007: 'BUILDHOST', 1008: 'INSTALLTIME', 1009: 'SIZE', 1010: 'DISTRIBUTION', 1011: 'VENDOR', 1012: 'GIF', 1013: 'XPM', 1014: 'LICENSE', 1015: 'PACKAGER', 1016: 'GROUP', 1018: 'SOURCE', 1019: 'PATCH', 1020: 'URL', 1021: 'OS', 1022: 'ARCH', 1023: 'PREIN'