Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 2020 11:18:47 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        =?utf-8?Q?Stefan_E=C3=9Fer?= <se@freebsd.org>
Cc:        FreeBSD ports <freebsd-ports@freebsd.org>, Kevin Oberman <rkoberman@gmail.com>, yasu@utahime.org
Subject:   Re: svn commit: r358166 - head
Message-ID:  <43FA0F10-9F02-4D99-B0FB-3F329477205D@yahoo.com>
In-Reply-To: <d0a30731-4597-fc0d-73c0-59f9b73e14df@freebsd.org>
References:  <27EABC0F-6D78-47E1-810B-FAB282D430A3.ref@yahoo.com> <27EABC0F-6D78-47E1-810B-FAB282D430A3@yahoo.com> <CAN6yY1uzA6-TOyM=QnowyYJHTz8YbgzadfX6SCYO%2BKFu_qO7iQ@mail.gmail.com> <B17926F7-ED2C-41E5-8499-23F8D68AD6DA@yahoo.com> <d0a30731-4597-fc0d-73c0-59f9b73e14df@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2020-Feb-22, at 09:29, Stefan E=C3=9Fer <se@freebsd.org> wrote:

> Am 22.02.20 um 03:50 schrieb Mark Millard via freebsd-ports:
>>=20
>>=20
>> . . .
>>=20
>> In the style of my prior examples (including the change that
>> found libedit and such), analogous would be:
>>=20
>> # find /usr/local/*bin* /usr/local/lib* -type f \
>> | xargs -n1 file -F ' ' | grep 'ELF' | cut -f1 -d' ' \
>> | xargs ldd -f '%A %p\n' 2>&1 | grep ncurses\.so\.8 | cut -f1 -d' ' \
>> | xargs pkg which | cut -f6 -d' ' | sort -u | more
>> bison-3.5.2,1
>> gdbm-1.18.1_1
>> gettext-tools-0.20.1_1
>> gnuplot-5.2.8
>> libedit-3.1.20191211,1
>> libtextstyle-0.20.1
>> llvm10-10.0.0.r2
>> llvm80-8.0.1_3
>> lua52-5.2.4
>> mesa-dri-18.3.2_9
>> ruby-2.6.5,1
>> sqlite3-3.30.1,1
>> xterm-353_1
>>=20
>> Looks like I'll be reasonably ready when I get to the point
>> of wanting to deal with this.
>=20
> While technically correct, the extra test for the ELF format of each
> single file is not required for correct results, AFAICT.
>=20
> The ldd command will just emit an error message for files it cannot
> process, and the error output is trivially suppressed.
>=20
>=20
> The following pipeline should only need a fraction of the time =
required
> by the one suggested above:
>=20
> # find /usr/local/*bin* /usr/local/lib* -type f \
> | xargs ldd -f '%o %A\n' 2>/dev/null \
> | grep ^libncurses\.so\.8 | cut -w -f2 \
> | xargs pkg which -q | sort -u | more
>=20
> It completes in 13 seconds on my system, and I plan to add it to
> portmaster as another option to select the ports to be updated.
>=20
> The test of each file for ELF format requires one invocation of the
> file command for each, which leads to 217 seconds real time (178 user,
> 39 system) for me - so my version is faster by a factor of at least =
15.
>=20

Nice.

I executed my example in a chroot that does not by default
have /dev/null present. That is why I avoided that specific
alternative.

There is also /lib/libncursesw.so.8 that I'd forgotten.

So, for my context, . . .

# find /usr/local/*bin* /usr/local/lib* -type f \
| xargs ldd -f '%p %A\n' 2>&1 | grep "^/lib/libncurses[^ ]*\.so\.8" | =
cut -w -f2 \
| xargs pkg which -q | sort -u | more
bison-3.5.2,1
dialog4ports-0.1.6
gdb-8.3.1
gdbm-1.18.1_1
gettext-tools-0.20.1_1
gnuplot-5.2.8
libedit-3.1.20191211,1
libtextstyle-0.20.1
llvm10-10.0.0.r2
llvm80-8.0.1_3
lua52-5.2.4
mesa-dri-18.3.2_9
python37-3.7.6
readline-8.0.1
ruby-2.6.5,1
spidermonkey60-60.9.0_1
sqlite3-3.30.1,1
texinfo-6.7_1,1
xterm-353_1

That picked up dialog4ports and other items.


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43FA0F10-9F02-4D99-B0FB-3F329477205D>