Check for file conflicts in installed packages
authorMichael Schroeder <mls@suse.de>
Wed, 20 Mar 2013 07:29:58 +0000 (09:29 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Jun 2013 07:30:46 +0000 (10:30 +0300)
commit4aacf64e9a1b48c042b56b6c984cb534fbe4fb40
tree069d6074f30e4b0063bd7ca29af000b0509d2c9d
parente1ad3021dc4e2269a367ae7a87c8f8db9df274ac
Check for file conflicts in installed packages

- Rpm checks that a conflict in the new package is not satisfied by an
  installed file, but it ignores when a conflict of an installed package
  is satisfied by a file of the new package, eg

    Package A: Contains file "/foo"
    Package B: Has "Conflicts: /foo"

    rpm -U A.rpm, then rpm -U B.rpm results in:
    error: Failed dependencies:
        /foo conflicts with B-1-1.i586

    rpm -U B.rpm, then rpm -U A.rpm will work.
- Use an IndexIterator over RPMTAG_CONFLICTNAME to create a hash with
  all of the possible file conflicts to speed things up.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
(cherry picked from commit 46edce686a5949179c4f6eee18b41e761b53ae49)
lib/depends.c