git: 73099785902d - stable/14 - Handle MOVED_LIBS in list-old-files

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 16 Oct 2023 12:30:23 UTC
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=73099785902d750f96d07f2c413db062bf0e47bd

commit 73099785902d750f96d07f2c413db062bf0e47bd
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-10-13 18:06:58 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-10-16 12:29:46 +0000

    Handle MOVED_LIBS in list-old-files
    
    MOVED_LIBS is used when a library moves from one directory to another,
    e.g. /usr/lib/libc++.so.1 to /lib/libc++.so.1.
    
    delete-old-files and delete-old-libs are two separate steps, so that
    old libraries can be retained until third party software packages are
    rebuilt or reinstalled.
    
    Having two copies of the same shared library with the same so version
    (as can happen when delete-old-libs hasn't been run) causes trouble.
    The PR below gives one example.
    
    Libraries listed in MOVED_LIBS are logically equivalent to updating a
    library without changing the so version, and should be removed as soon
    as possible.  Handle them in list-old-files and thus delete-old-files.
    
    Leave them also in *-old-libs for now, in case the user updates their
    tree between running delete-old-files and delete-old-libs.
    
    PR:             272642
    Reviewed by:    dim
    Sponsored by:   The FreeBSD Foundation
    Co-authored-by: Dimitry Andric <dim@FreeBSD.org>
    Differential Revision: https://reviews.freebsd.org/D42197
    
    (cherry picked from commit 922337e8d3989e4f54a0338b7fc397e3e0af7832)
---
 Makefile.inc1 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 45d034c0002c..01d3328726bd 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -3306,6 +3306,7 @@ list-old-files: .PHONY
 	@cd ${.CURDIR}; \
 	${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
 	    -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \
+	    -V "MOVED_LIBS:ts\n" \
 	    ${_ALL_libcompats:@v@-V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib$v,:ts\n"@} \
 	    ${_ALL_libcompats:@v@-V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib$v,:ts\n"@} | \
 	sort