[pkg-bioc] svn commit r329 r329 - in /trunk/tools-ng/extra: ./ test_isbinary.pl

psychedelys-guest at users.alioth.debian.org psychedelys-guest at users.alioth.debian.org
Sat Sep 29 16:21:37 UTC 2007


Author: psychedelys-guest
Date: Sat Sep 29 16:21:37 2007
New Revision: 329

URL: http://svn.debian.org/wsvn/pkg-bioc/?sc=1&rev=329
Log:
adding a script not need for the build process but for the extraTarget debuging

Added:
    trunk/tools-ng/extra/
    trunk/tools-ng/extra/test_isbinary.pl   (with props)

Added: trunk/tools-ng/extra/test_isbinary.pl
URL: http://svn.debian.org/wsvn/pkg-bioc/trunk/tools-ng/extra/test_isbinary.pl?rev=329&op=file
==============================================================================
--- trunk/tools-ng/extra/test_isbinary.pl (added)
+++ trunk/tools-ng/extra/test_isbinary.pl Sat Sep 29 16:21:37 2007
@@ -0,0 +1,182 @@
+#!/usr/bin/perl
+#
+# Copyright (c) 2007 david vernazobres <dv at uni-muenster.de>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Or else go to GNU Web pages http://www.gnu.org and follow the white rabbit.
+#
+#
+# script is used for :
+#    displaying all the extraTarget
+#    checking if the package is a binary package
+#    
+# This script will not work in the extra directory,
+# it need to be launched from the tools-ng directory (symlink).
+#
+use strict;
+use warnings;
+
+# the commom variables
+use vars qw($help $man $debug $verbose $dryrun $VERSION);
+
+BEGIN {    # initialization:
+    push( @INC, "/usr/share/R/share/perl" ); # Debian sid R location
+    push( @INC, "../tools-ng" );             # tools dir in the std installation
+}
+
+
+# our pkg-bioc local modules
+use CRAN2DEB;
+use pkgbioc;
+
+# unbuffered output:
+$| = 1;
+
+
+
+################
+# load the autoconfig file. ( want to packages cran and bioc, or just Bioc, location,...)
+
+my $autogeneratevariable = "../tools-ng/autogenerate-variable.out";
+
+# Varaible load from the autogenerated files
+use vars qw(
+  $PBuilder_Base         $CowBuilder_Base
+  $PBuilder_BuildPlace   $CowBuilder_BuildPlace $Builder_Post
+  $Builder_AptConfDir    $Builder_AptCacheDir  $Builder_Result
+  $Builder_ExtraPackages $Builder_Distribution $Builder_Depends
+
+  $RepositoryListFlat $bioccurrent $listdirectory $maxsize
+  $Lang $sources $builds $installMethods $binarch $maintainermail
+  $patchessourcedir $webdir
+
+  $AptSourcesList $AptStateDir $AptDpkgDir $AptCacheDir $AptParams
+  $AptAliothSourcesList $AptAliothStateDir $AptAliothDpkgDir
+  $AptAliothCacheDir    $AptAliothParams
+  $currentpackage
+);
+
+my $RepositoryList = ();
+use vars qw( $needpackagebefore );
+
+# auto Load the values of variables from the files.
+sub loadfile {
+    die "Variable File not found: $autogeneratevariable. Did you run "
+      . "r_pkg_prepare ??"
+      if ( !-f $autogeneratevariable );
+    my $if;
+    open( $if, "<$autogeneratevariable" ) or die "$autogeneratevariable : $!\n";
+    my ( $buf, $proj );
+    while ( $buf = <$if> ) { $proj .= $buf; }
+    close($if);
+
+    eval $proj;
+
+    die "Programming error, problem reading in '$autogeneratevariable':\n$@"
+      if $@;
+
+    die "Programming error: The variable \$RepositoryListFlat is not"
+      . "defined which was expected to have happened in r_pkg_prepare.\n"
+      unless defined($RepositoryListFlat);
+
+    @$RepositoryList = split( " ", $RepositoryListFlat );
+    print "binarch=$binarch\n";
+    $PBuilder_Base = "../" . $binarch . "_" . $PBuilder_Base;
+    $CowBuilder_Base = "../" . $binarch . "_" . $CowBuilder_Base;
+}
+
+# Loading the autogenerated files
+&loadfile();
+
+
+my %globalstuff = ();
+################
+# removed the already in some packages bundles in Debian
+
+%{ $globalstuff{AlreadyinDebian} } =
+  readList( $listdirectory . "/AlreadyIncludeInDebian.list" );
+
+
+
+################
+## adding some extra Targets to some build process.
+
+%{ $globalstuff{extraTargets} } =
+  readListListList( $listdirectory . "/extraTargets.list" );
+
+################
+# browse the 3 directories in the right order, so the import list is in the right order.
+
+my %globalpackage = ();
+my %repositoryOf  = ();
+
+# this assures that the resulting priority will be "cran > bioc > omegahat"
+&populate_source( "cran", "cran", $sources, \%repositoryOf, \%globalstuff,
+    $verbose )
+  if ( $RepositoryListFlat =~ /cran/ );
+
+&populate_source( "bioc", $bioccurrent, $sources, \%repositoryOf, \%globalstuff,
+    $verbose )
+  if ( $RepositoryListFlat =~ /bioc/ );
+
+&populate_source( "omegahat", "omegahat", $sources, \%repositoryOf,
+    \%globalstuff, $verbose )
+  if ( $RepositoryListFlat =~ /omegahat/ );
+
+# loading the DESCRIPTION FILES
+
+&populate_description( "cran", directoryof("cran"), $sources, \%repositoryOf,
+    \%globalpackage, \%globalstuff )
+  if ( $RepositoryListFlat =~ /cran/ );
+
+&populate_description( "bioc", directoryof("bioc"), $sources, \%repositoryOf,
+    \%globalpackage, \%globalstuff )
+  if ( $RepositoryListFlat =~ /bioc/ );
+
+&populate_description( "omegahat", directoryof("omegahat"), $sources,
+    \%repositoryOf, \%globalpackage, \%globalstuff )
+  if ( $RepositoryListFlat =~ /omegahat/ );
+
+
+
+foreach my $pkg ( sort { lc($a) cmp lc($b) }
+        keys %{ $globalstuff{extraTargets} } )
+{
+	print "===================\n";
+	print "* Found extra targets for package " . $pkg . "\n";
+	print "* Source:" . $globalpackage{$pkg}{TarGz} . "\n";
+	if( areHereFilesToCompile( $globalpackage{$pkg}{TarGz} ) ) {
+		print "\tThere is some BINARY file inside\n";
+	}
+	else { 
+		print "\tThere is NO binary file inside\n";
+	}
+
+	my $targets = $globalstuff{extraTargets}{$pkg};
+    if ( defined($targets) ) {
+        foreach my $aref ($targets) {
+            foreach my $tref ( @{$aref} ) {
+                print join( ", ", @$tref ) . "\n";
+            }
+        }
+    }
+    else {
+        print "BUGS!!! no extra targets defined for $pkg\n";
+    }
+}
+
+
+
+

Propchange: trunk/tools-ng/extra/test_isbinary.pl
------------------------------------------------------------------------------
    svn:executable = *




More information about the pkg-bioc-devel mailing list