@dmnks commented on this pull request.


> @@ -633,7 +633,17 @@ assert(otherFi != NULL);
                rConflicts = handleColorConflict(ts, fs, fi, i,
                                                otherFs, otherFi, otherFileNum);
 
-               if (rConflicts && reportConflicts) {
+               /*
+                * This may be a false positive (two separate files) if a
+                * symlink is being replaced by a directory in one of these two
+                * paths.  This check extends the one for removal conflicts in
+                * handleInstInstalledFile().
+                */
+               int reportThis = !(p == otherTe &&
+                                  rpmtsFlags(ts) & RPMTRANS_FLAG_TEST &&
+                                  rpmteHaveTransScript(p, RPMTAG_PRETRANS));

Another way would be to save a flag somewhere after detecting the symlink 
replacement in the removal check (the first heuristic), and then only trigger 
the conflict exception in the second heuristic if the file's basename matches 
the one of the symlink.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1684#discussion_r634411723
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to