Date: Thu, 9 Apr 2009 09:27:42 -0500 From: Richard DeLaurell <richard.delaurell@gmail.com> To: Anonymous <swell.k@gmail.com>, freebsd-x11@freebsd.org Subject: Re: libxcb-xlib.la problem Message-ID: <4324dbec0904090727m25768725ma49ac1eaf164055f@mail.gmail.com> In-Reply-To: <86ocv6tsoh.fsf@gmail.com> References: <4324dbec0904081532v3db0af8fnc10b51d1961a07d1@mail.gmail.com> <86ocv6tsoh.fsf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Well, your xargs/sed script works very well; thanks very much for that. The diff script throws this error however: diff: extra operand '<name of first .bak file in the directory>' It is not such a critical thing though; I checked "by hand" on a small group of 10 files or so first to make certain that all was well. Thanks for the help in any event-- Richard On Wed, Apr 8, 2009 at 10:25 PM, Anonymous <swell.k@gmail.com> wrote: > Richard DeLaurell <richard.delaurell@gmail.com> writes: > > > I am not sure that this is the right list for this, but I'll give it a > go. > > > > I recently did a portupgrade which seems to have installed xcb in such a > way > > that all (or at least most of) my .la files were "infected' with a > reference > > to libxcb-xlib.la as a dependency. > > > > Many of my ports--related to X--won't build now because of this > reference. > > > > I can get ls to list all of the files endng in ".la" in my /usr/local/lib > > directory (and write it out to a .txt file), but I am not facile enough > to > > know how to have xargs/grep find this "/usr/local/lib/libxcb-xlib.la" > and > > delete it from all of the files in my list. > > # replace libxcb-xlib.la string with nul in all *.la files, > # and make backup files with .bak extension > $ find /usr/local/lib -name \*.la -exec sed -i '.bak' \ > 's|/usr/local/lib/libxcb-xlib.la||' {} + > > # You can use it with custom made list like so > $ cat list.txt | xargs sed -i '.bak' 's|/usr/local/lib/libxcb-xlib.la||' > > # compare results from previous command using diff(1) > $ find /usr/local/lib -name \*.la -exec diff -u {}.bak {} \; > > # delete backup files > $ find /usr/local/lib -name \*.bak -delete > > Note: specifying '' (nul) instead of '.bak' will leave *no* backup files > > > > > If anyone could help I'd appreciate it. > > > > Thank you for your time. > > > > RD > > > > uname -a = FreeBSD bighouse 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sat May > 31 > > 18:57:16 CDT 2008 root@bighouse:/usr/obj/usr/src/sys/MYKERNEL7 i386 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4324dbec0904090727m25768725ma49ac1eaf164055f>