Dont bother with rpmRelocateFileList() if relocations have been specified

- rpmRelocateFileList() doesn't modify anything when no relocations
  are to be done, but what it does is not exactly free, unnecessarily
  calling it is dumb.
This commit is contained in:
Panu Matilainen 2012-10-02 16:17:05 +03:00
parent 03b660c615
commit 5d3018c4ed
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ static rpmfi getFI(rpmte p, Header h)
(RPMFI_NOHEADER | RPMFI_FLAGS_ERASE);
/* relocate stuff in header if necessary */
if (rpmteType(p) == TR_ADDED && rpmfsFC(p->fs) > 0) {
if (rpmteType(p) == TR_ADDED && rpmfsFC(p->fs) > 0 && p->nrelocs) {
if (!headerIsSource(h) && !headerIsEntry(h, RPMTAG_ORIGBASENAMES)) {
rpmRelocateFileList(p->relocs, p->nrelocs, p->fs, h);
}