Check for file conflicts within package (RhBug:808750)

- Packages having file conflicts with itself may seem absurd, but
  directory symlinks (such as /lib being a symlink to /usr/lib)
  make this entirely possible. This makes us catch and abort early
  on these cases instead of silently overwriting the self-conflicting
  files, potentially with disastrous results.
This commit is contained in:
Panu Matilainen 2012-04-03 06:11:11 +03:00
parent 7633410733
commit a13e56cd87
1 changed files with 1 additions and 1 deletions

View File

@ -415,7 +415,7 @@ static void handleOverlappedFiles(rpmts ts, rpmFpHash ht, rpmte p, rpmfi fi)
*/
/* Locate this overlapped file in the set of added/removed packages. */
for (j = 0; j < numRecs && recs[j].p != p; j++)
for (j = 0; j < numRecs && !(recs[j].p == p && recs[j].fileno == i); j++)
{};
/* Find what the previous disposition of this file was. */