[lintian] 01/01: c/ocaml: Replace uses of file_info with index
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit aef4ae1e5a393602cb0f44390349143d882045cf
Author: Niels Thykier <niels@thykier.net>
Date: Sun Mar 30 11:52:16 2014 +0200
c/ocaml: Replace uses of file_info with index
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/ocaml.desc | 2 +-
checks/ocaml.pm | 15 +++++++--------
debian/changelog | 3 +++
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/checks/ocaml.desc b/checks/ocaml.desc
index 17fee5a..7d7ebf6 100644
--- a/checks/ocaml.desc
+++ b/checks/ocaml.desc
@@ -3,7 +3,7 @@ Author: Stephane Glondu <steph@glondu.net>
Abbrev: ocaml
Type: binary
Info: This looks for common mistakes in OCaml binary packages.
-Needs-Info: file-info, ar-info, index
+Needs-Info: ar-info, index
Tag: ocaml-dangling-cmxa
Severity: serious
diff --git a/checks/ocaml.pm b/checks/ocaml.pm
index 2089280..52d4eac 100644
--- a/checks/ocaml.pm
+++ b/checks/ocaml.pm
@@ -87,11 +87,10 @@ sub run {
my $has_meta = 0;
foreach my $file ($info->sorted_index) {
- my $fileinfo = $info->file_info($file);
# For each .cmxa file, there must be a matching .a file (#528367)
$_ = $file;
- if (s/\.cmxa$/.a/ && !$info->file_info($_)) {
+ if (s/\.cmxa$/.a/ && !$info->index($_)) {
tag 'ocaml-dangling-cmxa', $file;
}
@@ -100,8 +99,8 @@ sub run {
if ($is_lib_package) {
$_ = $file;
if ( s/\.cmxs$/.cm/
- && !$info->file_info("${_}a")
- && !$info->file_info("${_}o")) {
+ && !$info->index("${_}a")
+ && !$info->index("${_}o")) {
tag 'ocaml-dangling-cmxs', $file;
}
}
@@ -111,7 +110,7 @@ sub run {
# .a file in the same directory
$_ = $file;
if ( s/\.cmx$/.o/
- && !$info->file_info($_)
+ && !$info->index($_)
&& !(exists $provided_o{$_})) {
tag 'ocaml-dangling-cmx', $file;
}
@@ -120,8 +119,8 @@ sub run {
$_ = $file;
if ( $is_dev_package
&& s/\.cmi$/.ml/
- && !$info->file_info("${_}i")
- && !$info->file_info($_)) {
+ && !$info->index("${_}i")
+ && !$info->index($_)) {
$cmi_number++;
if ($cmi_number <= $MAX_CMI) {
tag 'ocaml-dangling-cmi', $file;
@@ -140,7 +139,7 @@ sub run {
# $somename.cmo should usually not be shipped with $somename.cma
$_ = $file;
- if (s/\.cma$/.cmo/ && $info->file_info($_)) {
+ if (s/\.cma$/.cmo/ && $info->index($_)) {
tag 'ocaml-stray-cmo', $file;
}
diff --git a/debian/changelog b/debian/changelog
index 93d28d6..d519a8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ lintian (2.5.23) UNRELEASED; urgency=medium
XXX: generate tag summary with private/generate-tag-summary
+ * checks/ocaml.{desc,pm}:
+ + [NT] Replace unnecessary uses of file_info with index.
+
* data/binary/embedded-libs:
+ [RG] Detect embedded copies of libmpg123.
* data/spelling/corrections:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: