[Rpm-maint] [rpm-software-management/rpm] Allow file namesakes on symlink->dir replacement (#1684)

Michal Domonkos notifications at github.com
Tue May 18 09:31:52 UTC 2021


@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));

Good point. Also, the common function is something I actually wanted to do, but couldn't come up with a descriptive-enough (yet not super long) name for it :smile:
But I'll give it another try, as I agree it would be the best way to functionally and semantically "connect" those two checks.

-- 
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_r634208842
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210518/ebb3d150/attachment.html>


More information about the Rpm-maint mailing list