[Lsb-messages] /var/www/bzr/lsb/devel/componenttodb r37: Do not dump ScriptInterpreter to distribution data

Denis Silakov denis.silakov at rosalab.ru
Thu May 31 12:30:52 UTC 2012


------------------------------------------------------------
revno: 37
committer: Denis Silakov <denis.silakov at rosalab.ru>
branch nick: componenttodb
timestamp: Thu 2012-05-31 16:30:52 +0400
message:
  Do not dump ScriptInterpreter to distribution data
modified:
  apptodb.pl
  componenttodb.pl
  distrtodb.pl
  upload_app_data.pl
  upload_distr_data.pl
-------------- next part --------------
=== modified file 'apptodb.pl'
--- a/apptodb.pl	2012-03-29 08:36:23 +0000
+++ b/apptodb.pl	2012-05-31 12:30:52 +0000
@@ -7,7 +7,7 @@
 # one file that can be used by 'upload_app_data.pl' for adding information
 # to the database.
 #
-# Copyright (C) 2007-2011 The Linux Foundation
+# Copyright (C) 2007-2012 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
 # Author: Denis Silakov <dsilakov at gmail.com>

=== modified file 'componenttodb.pl'
--- a/componenttodb.pl	2012-03-29 08:36:23 +0000
+++ b/componenttodb.pl	2012-05-31 12:30:52 +0000
@@ -20,7 +20,7 @@
 #
 # For shared objects, the script obtains ABItag using objdump
 #
-# Copyright (C) 2007-2011 The Linux Foundation
+# Copyright (C) 2007-2012 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
 # Author: Denis Silakov <dsilakov at gmail.com>
@@ -67,6 +67,8 @@
 my $quiet=1;
 my $totally_quiet;
 my $analyze_il=1; # Should we analyze interpreter language modules used by scripts and other modules
+                  # If this flag is set to 0, we will also omit dumping of
+                  # interpreters specified in scripts shebangs
 my $analyze_cmds=1; # Should we analyze dependencies of executable files
 my $analyze_ldpath=0; # Should we analyze ldconfig path modifications introduced by component
 my $trsp_symlink;
@@ -81,7 +83,7 @@
             "quiet|q!" => \$totally_quiet,
             "arch|a=s" => \$ComponentArch,
             "java|j!" => \$opt_java,
-            "distromode!" => sub {$analyze_il=0; $analyze_cmds=0; $analyze_ldpath=1},
+            "distromode!" => sub {$analyze_il=0; $analyze_cmds=0; $analyze_ldpath=1;},
             "packagemanager|m=s" => \$PackageManager,
             "comp-dbname|c=s" => \$ComponentDbName,
             "version|v=s" => \$ComponentVersion,
@@ -334,16 +336,16 @@
         }
 
         if( $type =~ /perl\s+script/i or $interpreter =~ /perl/ ) {
-            print COMPONENT_DATA "  PerlInterpreter: $interpreter\n";
             if( $analyze_il ) {
+                print COMPONENT_DATA "  PerlInterpreter: $interpreter\n";
                 close( COMPONENT_DATA );
                 system( "./interpreted\\ languages/analyze_perl.pl $filename >> $OutputFile_esc" ) == 0 or die();
                 open( COMPONENT_DATA, ">> $OutputFile" );
             }
         }
         elsif( $type =~ /python\s+script/i or $interpreter =~ /python/ ) {
-            print COMPONENT_DATA "  PythonInterpreter: $interpreter\n";
             if( $analyze_il ) {
+                print COMPONENT_DATA "  PythonInterpreter: $interpreter\n";
                 close( COMPONENT_DATA );
                 system( "./interpreted\\ languages/analyze_python.py $filename | LC_ALL=C sort -u >> $OutputFile_esc" ) == 0 or die();
                 open( COMPONENT_DATA, ">> $OutputFile" );
@@ -389,14 +391,14 @@
                     $interpreter = "";
                     print COMPONENT_DATA "!PythonModule '$basename' '$soname_p' 'python'\n";
                 }
-                print COMPONENT_DATA "  PythonInterpreter: $interpreter\n";
                 if( $analyze_il ) {
+                    print COMPONENT_DATA "  PythonInterpreter: $interpreter\n";
                     print COMPONENT_DATA $pythonResult;
                 }
 
             }
         }
-        else {
+        elsif( $analyze_il ) {
             print COMPONENT_DATA "  ScriptInterpreter: $interpreter\n";
         }
 
@@ -550,8 +552,8 @@
                 $interpreter = "";
                 print COMPONENT_DATA "!PythonModule '$basename' '$soname_p' 'python'\n";
             }
-            print COMPONENT_DATA "  PythonInterpreter: $interpreter\n";
             if( $analyze_il ) {
+                print COMPONENT_DATA "  PythonInterpreter: $interpreter\n";
                 print COMPONENT_DATA $pythonResult;
             }
         }

=== modified file 'distrtodb.pl'
--- a/distrtodb.pl	2012-03-29 08:36:23 +0000
+++ b/distrtodb.pl	2012-05-31 12:30:52 +0000
@@ -7,7 +7,7 @@
 # one file that can be used by 'upload_data.pl' for adding information
 # to the database.
 #
-# Copyright (C) 2007-2011 The Linux Foundation
+# Copyright (C) 2007-2012 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
 # Author: Denis Silakov <dsilakov at gmail.com>

=== modified file 'upload_app_data.pl'
--- a/upload_app_data.pl	2012-03-29 08:36:23 +0000
+++ b/upload_app_data.pl	2012-05-31 12:30:52 +0000
@@ -3,7 +3,7 @@
 # Upload data about application to the database.
 # Script takes data from the file generated by 'apptodb.pl'
 #
-# Copyright (C) 2007-2011 The Linux Foundation
+# Copyright (C) 2007-2012 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
 # Author: Denis Silakov <dsilakov at gmail.com>

=== modified file 'upload_distr_data.pl'
--- a/upload_distr_data.pl	2012-03-29 08:36:23 +0000
+++ b/upload_distr_data.pl	2012-05-31 12:30:52 +0000
@@ -4,7 +4,7 @@
 # Script takes data from the file generated by 'componenttodb.pl'
 # or 'distrtodb.pl' scripts on the target distribution.
 #
-# Copyright (C) 2007-2011 The Linux Foundation
+# Copyright (C) 2007-2012 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
 # Author: Denis Silakov <dsilakov at gmail.com>



More information about the lsb-messages mailing list