[Pkg-ocaml-maint-commits] r5956 - in /trunk/packages/edos-debcheck/trunk/debian/contrib: edos-builddebcheck edos-builddebcheck.1
treinen at users.alioth.debian.org
treinen at users.alioth.debian.org
Sat Aug 16 03:02:06 UTC 2008
Author: treinen
Date: Sat Aug 16 03:02:05 2008
New Revision: 5956
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=5956
Log:
add the --binexplain option
Modified:
trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck
trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck.1
Modified: trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck?rev=5956&op=diff
==============================================================================
--- trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck (original)
+++ trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck Sat Aug 16 03:02:05 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
# Copyright (C) 2008 Ralf Treinen <treinen at debian.org>
# This program is free software: you can redistribute it and/or modify it under
@@ -15,6 +15,8 @@
# the prefix used to encode source packages
$sourceprefix="source---";
+$architecture="";
+$binexplain=0;
$edosoptions = "-failures -explain";
while ( $arg = shift @ARGV ) {
if ( $arg eq '-a' || $arg eq '--architecture' ) {
@@ -23,6 +25,8 @@
} else {
$architecture = shift @ARGV;
}
+ } elsif ( $arg =~ "--binexplain" || $arg =~ "-be" ) {
+ $binexplain = 1;
} elsif ( $arg =~ /^-.*/ ) {
die "unrecognized option: $arg";
} else {
@@ -75,25 +79,58 @@
open(RESULT,"/usr/share/edos-debcheck/add-sources.py < $packagefile $sourcesfile $architecture ".
"| edos-debcheck $edosoptions|");
-$instanza=0;
+$sourcestanza=0;
+$explanation="";
+$binpackage="";
while (<RESULT>) {
- if (/^\s+/ && $instanza) {
- s/^(\s*)source---(.*)(depends on|conflicts with)/$1$2build-$3/;
- print;
+ if (/^\s+/) {
+ if ($sourcestanza) {
+ s/^(\s*)$sourceprefix(.*)(depends on|conflicts with)/$1$2build-$3/o;
+ print;
+ if (/depends on ([^\s]*) .*\{.*\}/) {
+ push(@binqueue,$1);
+ }
+ } else {
+ $explanation .= $_;
+ }
} else {
- if (/^source---.*: FAILED/) {
- s/^source---//;
+ if ($binpackage ne ""){
+ $binfailures{$binpackage} = $explanation;
+ $binpackage="";
+ }
+ if (/^$sourceprefix.*: FAILED/o) {
+ s/^$sourceprefix//o;
print;
$_=<RESULT>;
print;
- $instanza=1;
+ $sourcestanza=1;
+ } elsif (/^([^\s]*) .*: FAILED/) {
+ $binpackage=$1;
+ $explanation=$_;
+ $explanation.=<RESULT>;
+ $sourcestanza=0;
} else {
- $instanza=0;
+ # we have someting strange here
+ $sourcestanza=0;
}
}
}
close RESULT;
+
+if ($binexplain) {
+ while (@binqueue) {
+ $p=pop(@binqueue);
+ $v=$binfailures{$p};
+ next unless defined $v;
+ $binfailures{$p}="";
+ print "$v" if $v ne "";
+ if ($v=~/depends on ([^\s]*) .*\{.*\}/) {
+ push(@binqueue,$1);
+ }
+ }
+}
+
Modified: trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck.1
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck.1?rev=5956&op=diff
==============================================================================
--- trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck.1 (original)
+++ trunk/packages/edos-debcheck/trunk/debian/contrib/edos-builddebcheck.1 Sat Aug 16 03:02:05 2008
@@ -48,6 +48,13 @@
Check for compilation on \fIarchitecture\fP. Usually it is not
necessary to specify the architecture since it can be derived from the Packages
file.
+.TP
+.B -be, --binexplain
+Add all explanations why build-dependencies are not satisfiable. Without that
+option some of these explanations may be missing from the output in case a
+source package build-depends on a binary package that exists in
+\fIPackagefile\fP file but that edos-debchecks finds not to be installable
+inside \fIPackagefile\fP.
.SH AUTHOR
Edos-builddebcheck has been written by Stefano Zacchirolli <zack at debian.org>
More information about the Pkg-ocaml-maint-commits
mailing list