summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2019-06-28 02:54:32 +0200
committerGuillem Jover <guillem@debian.org>2019-10-30 22:02:42 +0100
commit195edc4201f063a11ccdc10c523d671048353cca (patch)
treea98d16e35ba99556476bbe6601af282688d7fa5b /scripts
parent671b305163dbd53b9207fc2afaac524f567d9837 (diff)
downloaddpkg-195edc4201f063a11ccdc10c523d671048353cca.tar.gz
dpkg-shlibdeps: Document split_soname() function
Explain what each different pattern means, and what it maps to. Prompted-by: Christopher Crim <christopher.crim@quoininc.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dpkg-shlibdeps.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index f662b2f58..8142c85b4 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -705,11 +705,15 @@ sub add_shlibs_dep {
sub split_soname {
my $soname = shift;
+
if ($soname =~ /^(.*)\.so\.(.*)$/) {
+ # Shared library with stable <name>.so.<version> format.
return wantarray ? ($1, $2) : 1;
} elsif ($soname =~ /^(.*)-(\d.*)\.so$/) {
+ # Shared library/module with unstable <name>-<version>.so format.
return wantarray ? ($1, $2) : 1;
} else {
+ # Something else.
return wantarray ? () : 0;
}
}