Re: warning about which deprecated

2021-11-07 Thread Bastian Bittorf
On Sun, Nov 07, 2021 at 10:25:48PM -0800, Rosen Penev wrote:
> > > Should we consider building it as a toolchain tool or should we migrate to
> > > command -v ?
> > https://github.com/openwrt/openwrt/commit/1f5e7224868109a170a9248d18f8d2b6124e9c5a
> Wonder if switching command -v to type -a -p makes sense.

Is seems to be not portable using '-a -p':

At least it is also POSIX and builtin:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/type.html
(but no commandline switches!)

it works the way you describe it on debian,
but not on e.g. OpenWRT:

root@F36-stube:~ ls -l /bin/foo /usr/sbin/foo
-rwxr-xr-x1 root root16 Nov  8 08:31 /bin/foo
-rwxr-xr-x1 root root16 Nov  8 08:31 /usr/sbin/foo

user@box:~ which -a foo
/usr/sbin/foo
/bin/foo
/usr/sbin/foo

root@F36-stube:~ type -a -p foo
/usr/sbin/foo
# here the returncode is != 0

bye, bastian

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: warning about which deprecated

2021-11-07 Thread Rosen Penev
On Sun, Nov 7, 2021 at 10:14 PM Rosen Penev  wrote:
>
> On Sun, Nov 7, 2021 at 12:32 PM Ansuel Smith  wrote:
> >
> > Il giorno dom 7 nov 2021 alle ore 19:18 Bjørn Mork  ha 
> > scritto:
> > >
> > > Ansuel Smith  writes:
> > >
> > > > Updating to latest ubuntu devel this now comes up
> > > > /home/ansuel/openwrt/staging_dir/host/bin/which: this version of
> > > > `which' is deprecated; use `command -v' in scripts instead.
> > > >
> > > > I think we have to update something?
> > >
> > > See https://lwn.net/SubscriberLink/874049/b563dc08d4eb5829/ for the full
> > > story.
> > >
> > >
> > > Bjørn
> >
> > Should we consider building it as a toolchain tool or should we migrate to
> > command -v ?
> https://github.com/openwrt/openwrt/commit/1f5e7224868109a170a9248d18f8d2b6124e9c5a
Wonder if switching command -v to type -a -p makes sense.
> >
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: warning about which deprecated

2021-11-07 Thread Rosen Penev
On Sun, Nov 7, 2021 at 12:32 PM Ansuel Smith  wrote:
>
> Il giorno dom 7 nov 2021 alle ore 19:18 Bjørn Mork  ha scritto:
> >
> > Ansuel Smith  writes:
> >
> > > Updating to latest ubuntu devel this now comes up
> > > /home/ansuel/openwrt/staging_dir/host/bin/which: this version of
> > > `which' is deprecated; use `command -v' in scripts instead.
> > >
> > > I think we have to update something?
> >
> > See https://lwn.net/SubscriberLink/874049/b563dc08d4eb5829/ for the full
> > story.
> >
> >
> > Bjørn
>
> Should we consider building it as a toolchain tool or should we migrate to
> command -v ?
https://github.com/openwrt/openwrt/commit/1f5e7224868109a170a9248d18f8d2b6124e9c5a
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: warning about which deprecated

2021-11-07 Thread Ansuel Smith
Il giorno dom 7 nov 2021 alle ore 19:18 Bjørn Mork  ha scritto:
>
> Ansuel Smith  writes:
>
> > Updating to latest ubuntu devel this now comes up
> > /home/ansuel/openwrt/staging_dir/host/bin/which: this version of
> > `which' is deprecated; use `command -v' in scripts instead.
> >
> > I think we have to update something?
>
> See https://lwn.net/SubscriberLink/874049/b563dc08d4eb5829/ for the full
> story.
>
>
> Bjørn

Should we consider building it as a toolchain tool or should we migrate to
command -v ?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: warning about which deprecated

2021-11-07 Thread John Crispin

https://lwn.net/Articles/874333/ ?!?

On 07.11.21 19:05, Ansuel Smith wrote:

Updating to latest ubuntu devel this now comes up
/home/ansuel/openwrt/staging_dir/host/bin/which: this version of
`which' is deprecated; use `command -v' in scripts instead.

I think we have to update something?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: warning about which deprecated

2021-11-07 Thread Bjørn Mork
Ansuel Smith  writes:

> Updating to latest ubuntu devel this now comes up
> /home/ansuel/openwrt/staging_dir/host/bin/which: this version of
> `which' is deprecated; use `command -v' in scripts instead.
>
> I think we have to update something?

See https://lwn.net/SubscriberLink/874049/b563dc08d4eb5829/ for the full
story.


Bjørn

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel