Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #262202

Re: usrmerge in bookworm

From Urs Thuermann <urs@isnogud.escape.de>
Newsgroups linux.debian.user
Subject Re: usrmerge in bookworm
Date 2023-10-06 15:50 +0200
Message-ID <HlTnj-dWN8-1@gated-at.bofh.it> (permalink)
References <HlPjH-dUsU-3@gated-at.bofh.it> <HlPD3-dUz7-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Marco <mm@dorfdsl.de> writes:

> Am 06.10.2023 schrieb Steve Keller <keller.steve@gmx.de>:
> 
> > I have always been sceptical about /usr merge, since all binaries now
> > appear in two places, "type sh" in bash gives the strange looking
> > /usr/bin/sh where all Uni*ers are strongly used to /bin/sh.  But also
> > things like the following don't work anymore:
> 
> Historic reasons, they don't exist anymore on current systems.
> 
> >     $ dpkg -S $(type -p sh)
> >     dpkg-query: no path found matching pattern /usr/bin/sh
> 
> That is because /bin is now a symlink to /usr/bin and the file isn't
> provided in /usr/bin by the package.

I assume Steve (seemingly multi Un*x user) is aware about the historic
reasons and how and why /usr-merge is implemented using symlinks.

> > And I don't see a comfortable way around this.
> 
> One way would be to strip off /usr from the string to search.

That, of course, doesn't really help

    $ type -Pa ls
    /usr/bin/ls
    /bin/ls
    $ dpkg -S $(PATH=/bin type -Pa ls)
    coreutils: /bin/ls
    $ type -Pa gcc
    /usr/bin/gcc
    /bin/gcc
    $ dpkg -S $(PATH=/bin type -Pa gcc)
    dpkg-query: no path found matching pattern /bin/gcc
    
because some packages have their binaries in /bin and others in
/usr/bin, and likewise with /sbin vs. /usr/sbin, and /lib
vs. /usr/lib.

But the -a option to bash's 'type' builtin command helps:

    $ dpkg -S $(type -Pa ls gcc)
    dpkg-query: no path found matching pattern /usr/bin/ls
    coreutils: /bin/ls
    gcc: /usr/bin/gcc
    dpkg-query: no path found matching pattern /bin/gcc
    
urs

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

usrmerge in bookworm Steve Keller <keller.steve@gmx.de> - 2023-10-06 11:30 +0200
  Re: usrmerge in bookworm Marco <mm@dorfdsl.de> - 2023-10-06 11:50 +0200
    Re: usrmerge in bookworm Urs Thuermann <urs@isnogud.escape.de> - 2023-10-06 15:50 +0200
  Re: usrmerge in bookworm Greg Wooledge <greg@wooledge.org> - 2023-10-06 13:20 +0200
    Re: usrmerge in bookworm Urs Thuermann <urs@isnogud.escape.de> - 2023-10-06 16:50 +0200
      Re: usrmerge in bookworm Andy Smith <andy@strugglers.net> - 2023-10-07 00:40 +0200
        Re: usrmerge in bookworm Sven Joachim <svenjoac@gmx.de> - 2023-10-07 09:10 +0200
          Re: usrmerge in bookworm Andy Smith <andy@strugglers.net> - 2023-10-07 22:30 +0200

csiph-web