def drpm_package_info(filename): """ Return info about delta rpm package. :param filename: full path to the package to analyze :type filename: str :return: delta rpm package info * "nevr" - nevr of the new package * "seq" - seq without old_nevr * "old_nevr" - nevr of the old package :rtype: dict """ try: return deltarpm.readDeltaRPM(filename) except SystemError: # does silly exception reporting (print) => missing from tests msg = _('failed to load DRPM metadata on file %s error') % filename _LOGGER.exception(msg) raise
def _getDRPMInfo(self, filename): d = deltarpm.readDeltaRPM(filename) self.oldnevrstring = d['old_nevr'] self.oldnevr = self._stringToNEVR(d['old_nevr']) self.sequence = d['seq']
import deltarpm print deltarpm.readDeltaRPM("ecall-delta-1.0-1.drpm")
def export(x): d = deltarpm.readDeltaRPM(x) d1 = d['old_nevr'] d2 = d['nevr'] return (d1 + d2)