Skip to content

Commit

Permalink
Fix file lists getting fed to file triggers multiple times (#370)
Browse files Browse the repository at this point in the history
A prefix can have arbitrary number of matches within a given header,
but each header should be fed into the file list iteration just once.
Otherwise we end up feeding the same file list over and over to the
scriptlet - hundreds of megs or gigs of waste in worser cases.

(cherry picked from commit e6effe3)
  • Loading branch information
pmatilai committed Jan 16, 2018
1 parent 26d78dd commit 7830966
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rpmtriggers.c
Expand Up @@ -327,6 +327,8 @@ static const char *matchFilesNext(matchFilesIter mfi)
RPMDBI_DIRNAMES, mfi->pfx, 0);

rpmdbFilterIterator(mfi->pi, mfi->tranPkgs, 0);
/* Only walk through each header with matches once */
rpmdbUniqIterator(mfi->pi);

} while (fx >= 0);

Expand Down

0 comments on commit 7830966

Please sign in to comment.