apk search --provides <soname1> <soname2> ... - find the package(s) that provides gives sonames
We need a way to find out what package(s) provides the given names. For example, what package provides libfoo.so.1? This is so we can migrate from letting abuild detect and add the package name of the provider to depends, to letting apk-tools do this job using “provides”.
apk search —provides should return 0 (success) if all providers are found and non-zero otherwise.
What abuild need to do to migrate is something like:
has_providers_list=$(apk search --quiet --provides $list_of_needed_so) for soname in $list_of_needed_so; do if is_in_list $soname $has_providers_list; then # let apk-tools find provider of $soname dep = $soname else # fallback to old behaviour. abuild finds the provider dep = $(find_package_that_provides $soname)" warn "Package $dep is missing 'provides = $soname'. Please rebuild it" fi add_to_pkginfo "depends = $dep" done
(from redmine: issue id 1350, created on 2012-09-05, closed on 2012-10-02)