Jakub Wilk <jw...@debian.org> writes: >>>>objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n >>>>-e's/^[[:space:]]*SONAME[[:space:]]*//p' | sed -e's/\([0-9]\)\.so\./\1-/; >>>>s/\.so\.//' >>>> >>>> Could this code be included in Policy ยง8.1, perhaps as a footnote? >>>> Thanks. >>>That seems to be missing tr [[:upper:]] [[:lower:]]. >>Hmm, right. And it should replace underscores with dashes.
> The actualy lintian code is: > foreach my $expected_name (@sonames) { > $expected_name =~ s/([0-9])\.so\./$1-/; > $expected_name =~ s/\.so(?:\.|\z)//; > $expected_name =~ s/_/-/g; > if ((lc($expected_name) eq $pkg) > || (lc($expected_name) eq $base_pkg)) { > $match_found = 1; > last; > } > } > This can be translated to the following sed command: > LC_ALL=C sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/' And presumably also needs the: objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' part to extract the SONAME in the first place. I like the idea of putting the code into Policy, but this is verging on a mini-script. Perhaps instead of putting two lines of opaque sed script into Policy, someone should write an actual script to do this and submit it to devscripts, and then Policy could just point people at that script in a footnote? Marking this as blocked by the symbols change, since that moves all the relevant text in Policy around and would create merge conflicts with this, but don't let that stop people from discussing it. -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87y5qyokzt....@windlord.stanford.edu