[Pkg-ocaml-maint-commits] r5944 - /trunk/packages/edos-debcheck/trunk/debian/edos-builddebcheck
treinen at users.alioth.debian.org
treinen at users.alioth.debian.org
Tue Aug 12 22:31:43 UTC 2008
Author: treinen
Date: Tue Aug 12 22:31:43 2008
New Revision: 5944
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=5944
Log:
add architecture detection
Modified:
trunk/packages/edos-debcheck/trunk/debian/edos-builddebcheck
Modified: trunk/packages/edos-debcheck/trunk/debian/edos-builddebcheck
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/edos-debcheck/trunk/debian/edos-builddebcheck?rev=5944&op=diff
==============================================================================
--- trunk/packages/edos-debcheck/trunk/debian/edos-builddebcheck (original)
+++ trunk/packages/edos-debcheck/trunk/debian/edos-builddebcheck Tue Aug 12 22:31:43 2008
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-$debug=1;
+$debug=0;
$edosoptions = "";
while ( $arg = shift @ARGV ) {
@@ -17,8 +17,6 @@
}
}
-print "$#ARGV\n";
-
if ($#ARGV != 0) {
die "Usage: edos-debbuildcheck [options] Packages Sources"
} else {
@@ -33,7 +31,30 @@
print "Edos options: $edosoptions\n";
}
-#arches=`grep ^Architecture $packagefile | grep -v "Architecture: all" | uniq`
+$packagearch="";
+open(P,$packagefile);
+while (<P>) {
+ next unless /^Architecture/;
+ next if /^Architecture:\s*all/;
+ /Architecture:\s*([^\s]*)/;
+ if ($packagearch eq "") {
+ $packagearch = $1;
+ } elsif ( $packagearch ne $1) {
+ die "Package file contains different architectures: $packagearch, $1";
+ }
+}
+close P;
+if ( $architecture eq "" ) {
+ if ( $packagearch eq "" ) {
+ die "No architecture option given, and no non-all architecture found in the Packages file";
+ } else {
+ $architecture = $packagearch;
+ }
+} else {
+ if ( $packagearch ne "" & $architecture ne $packagearch) {
+ die "Architecture option is $architecture but the package file contains architecture $packagearch";
+ }
+}
-
+print "Packagearch: $packagearch\n";
More information about the Pkg-ocaml-maint-commits
mailing list