April 23, 2008 at 1:20PM Patch: libchk symlink resolution
This patch for libchk fixes a longstanding bugbear of mine with it: it doesn’t resolve symlinked directories before scanning.
I wrote an email to Akinori Musha, the author, a while back outlining the changes made in this patch, but after resending it several times, it kept on bouncing. That’s why I’m posting it up here.
I’d forgotten to save the patch when I upgraded, so I lost it. I needed to use libchk again last night, as as I still remembered what I’d done the first time around, I made the same patch and installed a local copy of libchk rather than installing it from the ports tree. Somebody out there might find it useful.
--- libchk.orig 2008-04-22 23:51:14.000000000 +0100
+++ libchk 2008-04-22 23:48:04.000000000 +0100
@@ -33,6 +33,7 @@
require 'optparse'
require 'find'
+require 'pathname'
LDCONFIG_CMD = '/sbin/ldconfig -elf'
OBJDUMP_CMD = '/usr/bin/objdump'
@@ -335,6 +336,7 @@
def compact_dirs!(dirs)
normalize_dirs!(dirs)
+ dirs.map! { |dir| Pathname.new(dir).realpath().to_s }
dirs.sort!
prev = nil
No comments.