# Makefile | 2 - # files/patch-fix-shlib-majmin | 71 +++++++++++++++++++++++++++++++++++++++++++ # 2 files changed, 72 insertions(+), 1 deletion(-) # svn status M Makefile A files A files/patch-fix-shlib-majmin Index: Makefile =================================================================== --- Makefile (revision 455069) +++ Makefile (working copy) @@ -4,5 +4,5 @@ PORTNAME= portupgrade PORTVERSION= 2.4.15 -PORTREVISION= 0 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= ports-mgmt Index: files/patch-fix-shlib-majmin =================================================================== --- files/patch-fix-shlib-majmin (nonexistent) +++ files/patch-fix-shlib-majmin (working copy) @@ -0,0 +1,71 @@ +commit 13b3f5afe6240ac6ca7dd038a9b15ab3a38a1076 +Author: Bryan Drewery +Date: Tue Nov 28 11:28:40 2017 -0800 + + Preserve symlinks and remove them as needed as well. + + This is to deal with libfoo.so.MAJOR.MINOR libraries like + libicu and libmpfr which previously were not preserved. + + PR: 223943 + +diff --git bin/pkg_glob bin/pkg_glob +index 3bfcbf9..8a116e7 100755 +--- bin/pkg_glob ++++ bin/pkg_glob +@@ -385,7 +385,12 @@ def deinstall_pkg(pkgname) + + pipe.puts(file) + +- next if /\bELF\b.*\bshared object\b.*\bFreeBSD\b/ !~ pipe.gets ++ filetype = pipe.gets ++ ++ if /\bELF\b.*\bshared object\b.*\bFreeBSD\b/ !~ filetype and ++ /\bsymbolic link to\b/ !~ filetype ++ next ++ end + + dest = File.join($compatlibdir, base) + +@@ -393,7 +398,7 @@ def deinstall_pkg(pkgname) + + next if $noexecute + +- if system('/bin/cp', '-pf', file, dest) ++ if system('/bin/cp', '-Rpf', file, dest) + preserved_files << dest + else + STDERR.puts "Copy failed!" +diff --git bin/portsclean bin/portsclean +index c626a99..9d93a27 100755 +--- bin/portsclean ++++ bin/portsclean +@@ -673,12 +673,18 @@ def check_distinfo(origin, lazy = false) + end + + def delete_file(file, yes_by_default = true) ++ file_is_symlink = File.symlink?(file) ++ if file_is_symlink ++ real_file = File.realpath(file) ++ end + if $noexecute + if yes_by_default + puts 'Delete ' + file ++ puts 'Delete ' + real_file if file_is_symlink + return true + else + puts "Leave #{file} (specify -i to ask on this)" ++ puts "Leave #{real_file} (specify -i to ask on this)" if file_is_symlink + return false + end + end +@@ -695,6 +701,9 @@ def delete_file(file, yes_by_default = true) + end + end + ++ if file_is_symlink ++ File.unlink(real_file) ++ end + File.unlink(file) + + true Property changes on: files/patch-fix-shlib-majmin ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property