if anyone knows how anchors work in the bitbucket wiki please let me know how.
it would help me tu structure this page better and let go links to this page directly to the wanted location
The samples are from my Slackware 14.0 or current x86_64 installation.
All samples use the --quite option to supress the sync output which looks like this
sync cache (/home/slk140/sbbdep.cache) search for changes cache is up to date
If there is something to do than the synchronisation info message may look like this one
./sbbdep sync cache (/home/slk140/sbbdep.cache) search for changes apply changes clear seamonkey-2.20-x86_64-1_slack14.0 index seamonkey-2.20-x86_64-2_slack14.0 index seamonkey-solibs-2.20-x86_64-2_slack14.0 clear seamonkey-solibs-2.20-x86_64-1_slack14.0 store seamonkey-solibs-2.20-x86_64-2_slack14.0 store seamonkey-2.20-x86_64-2_slack14.0 wait for resolving symbolic links persist new information to disk run db analyzer ---synchronisation summary: upgraded: seamonkey-2.20-x86_64-2_slack14.0 (was 2.20-x86_64-1_slack14.0) upgraded: seamonkey-solibs-2.20-x86_64-2_slack14.0 (was 2.20-x86_64-1_slack14.0)
Query dependency from packages
Query the dependencies of a package, get just the packages as result In this case the query is for the package boost.
./sbbdep --quiet /var/adm/packages/boost-1.49.0-x86_64-3 aaa_elflibs >= 14.0 | bzip2 >= 1.0.6 aaa_elflibs >= 14.0 | gcc >= 4.7.1_multilib aaa_elflibs >= 14.0 | zlib >= 1.2.6 cxxlibs >= 6.0.17 | gcc-g++ >= 4.7.1_multilib glibc >= 2.15_multilib | glibc-solibs >= 2.15_multilib icu4c >= 49.1.2
The names can also be printed in single list without the version information using the --short option, it will look like this:
./sbbdep --quiet --short /var/adm/packages/boost-1.49.0-x86_64-3 aaa_elflibs | bzip2, aaa_elflibs | gcc, aaa_elflibs | zlib, cxxlibs | gcc-g++, glibc | glibc-solibs, icu4c
in this way sbbdep produces lists like slapt-get uses them in it's depfiles.
Query dependency of a file
sbbdep takes also a binary file as argument,
With no option it will check the required package of the file.
./sbbdep --quiet /usr/lib64/libboost_program_options.so check /usr/lib64/libboost_program_options.so.1.54.0, 64bit library (libboost_program_options.so.1.54.0) .. from package boost-1.54.0-x86_64-1 aaa_elflibs >= 14.0 | gcc >= 4.8.1 cxxlibs >= 6.0.18 | gcc-g++ >= 4.8.1 glibc >= 2.17 | glibc-solibs >= 2.17
Get info about who needs a package or file
Query who needs a package
Query which package are using the given one works with the --whoneeds option.
./sbbdep --quiet --whoneed /var/adm/packages/boost-1.49.0-x86_64-3 akonadi-1.9.0-x86_64-1alien boost-1.49.0-x86_64-3 kig-4.10.4-x86_64-1alien
this works also with short names
./sbbdep --quiet --whoneed --short /var/adm/packages/boost-1.49.0-x86_64-3 akonadi, boost, kig
this shows that boost is reuqired by akonadi, boost and kig.
the whoneeds query does not filter out internal dependencies like the required does, that's why boost is not in the dependency list of boost, but in the --whoneeds list.
Query who needs a file
as exepected, the --whoneed option will check for packages that needs the given file.
./sbbdep --quiet --whoneed /usr/lib64/libboost_program_options.so akonadi-1.9.2-x86_64-1
Getting more details
sbbdep has a -xdl option, which stands for explain dynamic linked.
The -xdl option works for dependency and whoneeds queries on package level and file level.
A dependency for a file looks like this this
./sbbdep --quiet --xdl /usr/lib64/libboost_program_options.so check /usr/lib64/libboost_program_options.so.1.54.0, 64bit library (libboost_program_options.so.1.54.0) .. from package boost-1.54.0-x86_64-1 file /usr/lib64/libboost_program_options.so.1.54.0 needs: libc.so.6 found in: /lib64/libc-2.17.so( glibc-2.17-x86_64-4 | glibc-solibs-2.17-x86_64-4 ) libgcc_s.so.1 found in: /usr/lib64/libgcc_s.so.1( aaa_elflibs-14.0-x86_64-4 | gcc-4.8.1-x86_64-1 ) libm.so.6 found in: /lib64/libm-2.17.so( glibc-2.17-x86_64-4 | glibc-solibs-2.17-x86_64-4 ) libpthread.so.0 found in: /lib64/libpthread-2.17.so( glibc-2.17-x86_64-4 | glibc-solibs-2.17-x86_64-4 ) librt.so.1 found in: /lib64/librt-2.17.so( glibc-2.17-x86_64-4 | glibc-solibs-2.17-x86_64-4 ) libstdc++.so.6 found in: /usr/lib64/libstdc++.so.6.0.18( cxxlibs-6.0.18-x86_64-1 | gcc-g++-4.8.1-x86_64-1 )
A whoneeds query for a file looks like this this
./sbbdep --quiet --whoneed --xdl /usr/lib64/libboost_program_options.so /usr/lib64/libboost_program_options.so.1.54.0 (libboost_program_options.so.1.54.0) is used from: akonadi-1.9.2-x86_64-1 /usr/bin/akonadi_agent_launcher /usr/bin/akonadi_agent_server /usr/bin/akonadi_control /usr/bin/akonadi_rds /usr/bin/akonadictl /usr/bin/akonadiserver
Dependency and whoneed queries for packaes will look similar, just for more than one file.
Search for strings and files
If a given arugment to sbbdep is just some string, sbbdep will try to find installed files that contain the string in the filename and report them.
./sbbdep passwd not a file path: 'passwd', use name as filename and try to find filename in package list: filename found in /var/adm/packages/bash-completion-2.0-noarch-2: passwd -> line was :usr/share/bash-completion/completions/passwd filename found in /var/adm/packages/shadow-126.96.36.199-x86_64-7: passwd -> line was :usr/bin/passwd filename found in /var/adm/packages/etc-14.0-x86_64-1: passwd -> line was :etc/passwd.new
If a given arugment to sbbdep is a file, sbbdep will try to find installed files that name and report them. sbbdep will search for just the filename and also for absolute filename.
./sbbdep /etc/passwd not a file with binary dependencies: /etc/passwd try to find information in package list: filename found in /var/adm/packages/bash-completion-2.0-noarch-2: passwd -> line was :usr/share/bash-completion/completions/passwd filename found in /var/adm/packages/shadow-188.8.131.52-x86_64-7: passwd -> line was :usr/bin/passwd absolute match in /var/adm/packages/etc-14.0-x86_64-1: /etc/passwd