Beispiel #1
0
 def path(self):
     if self._path is None:
         logger.debug('unpacking %s', self._name)
         assert self._temp_dir is None
         self._temp_dir = get_temporary_directory()
         self._path = self.container.extract(self._name, self._temp_dir.name)
     return self._path
Beispiel #2
0
 def path(self):
     if self._path is None:
         logger.debug('unpacking %s', self._name)
         assert self._temp_dir is None
         self._temp_dir = get_temporary_directory()
         self._path = self.container.extract(self._name, self._temp_dir.name)
     return self._path
Beispiel #3
0
def compare_rpm_headers(path1, path2):
    # compare headers
    with get_temporary_directory() as rpmdb_dir:
        rpm.addMacro("_dbpath", rpmdb_dir)
        ts = rpm.TransactionSet()
        ts.setVSFlags(-1)
        header1 = get_rpm_header(path1, ts)
        header2 = get_rpm_header(path2, ts)
    return Difference.from_text(header1, header2, path1, path2, source="header")