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:
parent
03b660c615
commit
5d3018c4ed
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue