You are not logged in.

#1 2015-01-24 15:34:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

is PKG in base-devel or required by one in base-devel [solved]

Is there a simple way to tell if a particular package is either directly in base-devel or required by one in base-devel?  I have run namcap against one of my AUR packages and found the following output:

profile-sync-daemon W: Dependency bash included but already satisfied
profile-sync-daemon W: Dependency included and not needed ('binutils')
profile-sync-daemon W: Dependency included and not needed ('coreutils')
profile-sync-daemon W: Dependency included and not needed ('gawk')
profile-sync-daemon W: Dependency glibc included but already satisfied
profile-sync-daemon W: Dependency included and not needed ('grep')
profile-sync-daemon W: Dependency included and not needed ('procps-ng')
profile-sync-daemon W: Dependency ncurses included but already satisfied
profile-sync-daemon W: Dependency included and not needed ('rsync')
profile-sync-daemon W: Dependency included and not needed ('sed')

I know the rsync warning is a false positive but wanted to check the others.

Last edited by graysky (2015-01-24 15:59:36)

Offline

#2 2015-01-24 15:49:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: is PKG in base-devel or required by one in base-devel [solved]

pacman -Si $(pactree -rl TESTPKG) 2>/dev/null | grep -q "^Groups *:.*base-devel"

returns true/false if TESTPKG is in or requred by anything in base-devel.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-01-24 15:58:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is PKG in base-devel or required by one in base-devel [solved]

Excellent, thanks!

% TESTPKG=ncurses
% pacman -Si $(pactree -rl $TESTPKG) 2>/dev/null | grep -q "^Groups *:.*base-devel" ;echo $?
0

Last edited by graysky (2015-01-24 15:59:07)

Offline

#4 2015-01-24 17:04:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is PKG in base-devel or required by one in base-devel [solved]

Offline

#5 2015-01-24 17:31:39

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: is PKG in base-devel or required by one in base-devel [solved]

I have a question. Is "pactree -rl" sufficient? I believe we should query the sync database instead. "pactree -srl" in case base-devel is not installed

Edit:

pactree -srl $FOO | LC_ALL=C pacman -Si - 2>/dev/null | grep -q "^Groups *:.* base-devel"
# or
pactree -srl $FOO | expac -S ' %G ' - | grep -q ' base-devel '

Last edited by progandy (2015-01-24 17:56:30)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#6 2015-01-24 18:05:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: is PKG in base-devel or required by one in base-devel [solved]

That does look better.  But I also am not sure if dependencies of the standard base-devel packages should be excluded from dependency lists.

If your package requires glibc, for example, then list that.  Lots of things in base-devel depend on glibc, but glibc is *not* in base-devel.  gawk, for example depends on glibc and is the default package to satisfy 'awk' in base-devel.  But one might make another awk that uses a different libc implementation - it may fully provide 'awk' but does not share all the same dependencies as gawk.  In this case the there is a faulty assumption that AUR users should have everything that is a dependency of any of the typical base-devel packages.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2015-01-25 00:50:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: is PKG in base-devel or required by one in base-devel [solved]

If either of you are so inclined, feel free to change the wiki entry I posted as you see fit.  Useful in either case smile  I will say that Trilby's command runs much faster than progandy's commands:

% FOO=bash
% time  pacman -Si $(pactree -rl $FOO) 2>/dev/null | grep -q "^Groups *:.*base-devel" ;echo $?
pacman -Si $(pactree -rl $FOO) 2> /dev/null  0.09s user 0.00s system 97% cpu 0.099 total
grep --color=auto -q "^Groups *:.*base-devel"  0.00s user 0.00s system 0% cpu 0.097 total

% time pactree -srl $FOO | LC_ALL=C pacman -Si - 2>/dev/null | grep -q "^Groups *:.* base-devel"
pactree -srl $FOO  2.74s user 0.00s system 99% cpu 2.742 total
LC_ALL=C pacman -Si - 2> /dev/null  0.10s user 0.00s system 3% cpu 2.845 total
grep --color=auto -q "^Groups *:.* base-devel"  0.00s user 0.00s system 0% cpu 2.844 total

% time pactree -srl $FOO | expac -S ' %G ' - | grep -q ' base-devel '
pactree -srl $FOO  2.50s user 0.00s system 99% cpu 2.509 total
expac -S ' %G ' -  0.22s user 0.00s system 8% cpu 2.609 total
grep --color=auto -q ' base-devel '  0.00s user 0.00s system 0% cpu 2.608 total

Last edited by graysky (2015-01-25 00:54:41)

Offline

#8 2015-01-25 03:07:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: is PKG in base-devel or required by one in base-devel [solved]

graysky wrote:
profile-sync-daemon W: Dependency bash included but already satisfied
profile-sync-daemon W: Dependency included and not needed ('binutils')
profile-sync-daemon W: Dependency included and not needed ('coreutils')
profile-sync-daemon W: Dependency included and not needed ('gawk')
profile-sync-daemon W: Dependency glibc included but already satisfied
profile-sync-daemon W: Dependency included and not needed ('grep')
profile-sync-daemon W: Dependency included and not needed ('procps-ng')
profile-sync-daemon W: Dependency ncurses included but already satisfied
profile-sync-daemon W: Dependency included and not needed ('rsync')
profile-sync-daemon W: Dependency included and not needed ('sed')

Just include the dependency if it is needed... 

bash is guaranteed to be installed, and I'd say coreutils and glibc is too.  But I'd include the rest.

Offline

Board footer

Powered by FluxBB