[Lsb-messages] /var/www/bzr/lsb/devel/componenttodb r36: Do not use cache_AppRIntLib.UniqId, minor updates

Denis Silakov denis.silakov at rosalab.ru
Thu Mar 29 08:36:23 UTC 2012


------------------------------------------------------------
revno: 36
committer: Denis Silakov <denis.silakov at rosalab.ru>
branch nick: componenttodb
timestamp: Thu 2012-03-29 12:36:23 +0400
message:
  Do not use cache_AppRIntLib.UniqId, minor updates
modified:
  Distros.pm
  apptodb.pl
  componenttodb.pl
  distrtodb.pl
  upload_app_data.pl
  upload_distr_data.pl
-------------- next part --------------
=== modified file 'Distros.pm'
--- a/Distros.pm	2011-12-06 08:28:20 +0000
+++ b/Distros.pm	2012-03-29 08:36:23 +0000
@@ -428,6 +428,9 @@
             warn "Can't get $EntityName url!";
         }
 
+        if( $url eq '(none)' ) {
+            $url = "";
+        }
         return $url;
     }
 
@@ -442,6 +445,9 @@
             warn "Can't get $EntityName url!" if( !$totally_quiet );
         }
 
+        if( $url eq '(none)' ) {
+	    $url = "";
+        }
         return $url;
     }
 
@@ -494,6 +500,10 @@
         warn "Can't get $EntityName url - package manager '$PackageManager' is not supproted" if( !$totally_quiet );
     }
 
+    if( $url eq '(none)' ) {
+        $url = "";
+    }
+		    
     return $url;
 }
 

=== modified file 'apptodb.pl'
--- a/apptodb.pl	2011-12-06 08:28:20 +0000
+++ b/apptodb.pl	2012-03-29 08:36:23 +0000
@@ -7,10 +7,10 @@
 # one file that can be used by 'upload_app_data.pl' for adding information
 # to the database.
 #
-# Copyright (C) 2007-2010 The Linux Foundation
+# Copyright (C) 2007-2011 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
-# Author: Denis Silakov <silakov at ispras.ru>
+# Author: Denis Silakov <dsilakov at gmail.com>
 ##############################################################################
 
 use strict;
@@ -38,9 +38,13 @@
 my $OutputFile;
 my $Packager="";
 my $URL="";
-my $LicenseType="";
-my $AppUI="";
-my $AppFuncCategory="";
+# Use loud default values so user will likely notice then
+# if look into generated file.
+# If these values are left in the upload file 'as is',
+# they will be replaced with 'Unknown' value during upload
+my $LicenseType="!!!SPECIFY LICENSE!!!";
+my $AppUI="!!!SPECIFY UI!!!";
+my $AppFuncCategory="!!!SPECIFY CATEGORY!!!";
 
 # Package manager used in the distribution
 my $PackageManager;
@@ -220,7 +224,7 @@
     }
 }
 
-if( !$LicenseType ) {
+if( $LicenseType eq "!!!SPECIFY LICENSE!!!" ) {
     if( $AppFilesList or $ComponentsFile or $RpmFileList or $DebFileList or $tgz or $tbz2 or $txz or $zip ) {
         print STDERR "You should specify license type manually when you use files or components list.\n";
     }
@@ -229,7 +233,7 @@
     }
 }
 
-if( !$AppFuncCategory ) {
+if( $AppFuncCategory eq "!!!SPECIFY CATEGORY!!!" ) {
     if( $AppFilesList or $ComponentsFile or $RpmFileList or $DebFileList or $tgz or $tbz2 or $txz or $zip ) {
         print STDERR "You should specify application functional category manually when you use files or components list.\n";
     }
@@ -249,7 +253,7 @@
 
 # Do not allow illegal UI values
 if( $AppUI and ($AppUI ne "GUI") and ($AppUI ne "non-GUI") ) {
-    $AppUI = "";
+    $AppUI = "!!!SPECIFY UI!!!";
 }
 
 # Normally, we use 'x86', but db only knows about 'IA32'
@@ -608,7 +612,7 @@
         }
         else {
             warn "Can't detect application functional category!" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY CATEGORY!!!";
         }
     }
 
@@ -620,7 +624,7 @@
         }
         else {
             warn "Can't detect application functional category!" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY CATEGORY!!!";
         }
     }
 
@@ -632,7 +636,7 @@
         }
         else {
             warn "Can't detect application functional category!" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY CATEGORY!!!";
         }
     }
 
@@ -643,12 +647,12 @@
         }
         else {
             warn "Can't detect application functional category!" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY CATEGORY!!!";
         }
     }
 
     warn "Can't detect application functional category - package manager '$PackageManager' is not supproted" if( !$totally_quiet );
-    return "";
+    return "!!!SPECIFY CATEGORY!!!";
 }
 
 # Translate app category ('group') obtained from package manager
@@ -679,7 +683,7 @@
         return "System Tools";
     }
 
-    return "";
+    return "!!!SPECIFY CATEGORY!!!";
 }
 
 # Given the license name, decide if this is an 'Open Source' license
@@ -695,7 +699,7 @@
         return "Proprietary";
     }
 
-    return "";
+    return "!!!SPECIFY LICENSE!!!";
 }
 
 # Get app name from RPM file
@@ -796,7 +800,7 @@
         $License = `rpm --query -p --nosignature --qf '\%{LICENSE}' $filename`;
         if( !$License ) {
             warn "Can't detect application license type" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY LICENSE!!!";
         }
 
         return guess_license_type($License);
@@ -804,7 +808,7 @@
 
     if( $DebFile ) {
         warn "Can't detect application license type - license auto-detection is not supported for deb packages" if( !$totally_quiet );
-        return "";
+        return "!!!SPECIFY LICENSE!!!";
     }
 
     if( $PackageManager eq "rpm" ) {
@@ -813,12 +817,12 @@
         $License = `rpm --query --qf '\%{LICENSE}' $AppName_esc`;
         if( !$License ) {
             warn "Can't detect application license type" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY LICENSE!!!";
         }
     }
     elsif( $PackageManager eq "dpkg" or $PackageManager eq "emerge" ) {
         warn "Can't detect application license type - license autodetection is not supported for $PackageManager" if( !$totally_quiet );
-        return "";
+        return "!!!SPECIFY LICENSE!!!";
     }
     elsif( $PackageManager eq "pacman" ) {
         my $AppName_esc = escape_shell_symbols($AppName);
@@ -830,12 +834,12 @@
         }
         else {
             warn "Can't detect application license type" if( !$totally_quiet );
-            return "";
+            return "!!!SPECIFY LICENSE!!!";
         }
     }
     else {
         warn "Can't detect application license - package manager '$PackageManager' is not supproted" if( !$totally_quiet );
-        return "";
+        return "!!!SPECIFY LICENSE!!!";
     }
 
     return guess_license_type($License);

=== modified file 'componenttodb.pl'
--- a/componenttodb.pl	2011-12-06 08:28:20 +0000
+++ b/componenttodb.pl	2012-03-29 08:36:23 +0000
@@ -20,10 +20,10 @@
 #
 # For shared objects, the script obtains ABItag using objdump
 #
-# Copyright (C) 2007-2010 The Linux Foundation                                                                                                               
+# Copyright (C) 2007-2011 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
-# Author: Denis Silakov <silakov at ispras.ru>
+# Author: Denis Silakov <dsilakov at gmail.com>
 #################################################################################
 
 use strict;

=== modified file 'distrtodb.pl'
--- a/distrtodb.pl	2012-01-03 14:13:59 +0000
+++ b/distrtodb.pl	2012-03-29 08:36:23 +0000
@@ -7,10 +7,10 @@
 # one file that can be used by 'upload_data.pl' for adding information
 # to the database.
 #
-# Copyright (C) 2007-2010 The Linux Foundation
+# Copyright (C) 2007-2011 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
-# Author: Denis Silakov <silakov at ispras.ru>
+# Author: Denis Silakov <dsilakov at gmail.com>
 ##############################################################################
 
 use strict;

=== modified file 'upload_app_data.pl'
--- a/upload_app_data.pl	2011-12-06 08:28:20 +0000
+++ b/upload_app_data.pl	2012-03-29 08:36:23 +0000
@@ -3,10 +3,10 @@
 # Upload data about application to the database.
 # Script takes data from the file generated by 'apptodb.pl'
 #
-# Copyright (C) 2007-2010 The Linux Foundation
+# Copyright (C) 2007-2011 The Linux Foundation
 # Copyright (C) 2007-2010 Institute for System Programming, RAS
 #
-# Author: Denis Silakov <silakov at ispras.ru>
+# Author: Denis Silakov <dsilakov at gmail.com>
 ##############################################################################
 
 use strict;
@@ -1027,7 +1027,7 @@
                 ."  JOIN AppLib ON ALaid=Application.Aid\n"
                 ."  JOIN RawLibrary ON RLname=RIlibrary AND (RLsoname=ALrunname OR RLrunname=ALrunname);\n";
     print $sqlFileHandle "REPLACE INTO cache_AppRIntLib\n"
-                ."  SELECT Aname, Aversion, Aarch, ARIaid, RawInterface.RIid, RawInterface.RIlibrary, RawInterface.RIname, RIunmangled, RLibRIntId, RIversion, Iid AS Iid, Iid AS UniqId FROM AppRInt\n"
+                ."  SELECT Aname, Aversion, Aarch, ARIaid, RawInterface.RIid, RawInterface.RIlibrary, RawInterface.RIname, RIunmangled, RLibRIntId, RIversion, Iid AS Iid FROM AppRInt\n"
                 ."  LEFT JOIN RawInterface ON ARIriid=RawInterface.RIid\n"
                 ."  LEFT JOIN cache_IntCorrespondance USING(RIid)\n"
                 ."  LEFT JOIN cache_RLibRIntMapping ON cache_RLibRIntMapping.RIname=RawInterface.RIname AND cache_RLibRIntMapping.RIlibrary=RawInterface.RIlibrary\n"
@@ -1046,7 +1046,7 @@
                 JOIN AppLib ON ALaid=Application.Aid
                 JOIN RawLibrary ON RLname=RIlibrary AND (RLsoname=ALrunname OR RLrunname=ALrunname)");
     $dbh->do("REPLACE INTO cache_AppRIntLib
-                SELECT Aname, Aversion, Aarch, ARIaid, RawInterface.RIid, RawInterface.RIlibrary, RawInterface.RIname, RIunmangled, RLibRIntId, RIversion, Iid AS Iid, Iid AS UniqId FROM AppRInt
+                SELECT Aname, Aversion, Aarch, ARIaid, RawInterface.RIid, RawInterface.RIlibrary, RawInterface.RIname, RIunmangled, RLibRIntId, RIversion, Iid AS Iid FROM AppRInt
                 LEFT JOIN RawInterface ON ARIriid=RawInterface.RIid
                 LEFT JOIN cache_IntCorrespondance USING(RIid)
                 LEFT JOIN cache_RLibRIntMapping ON cache_RLibRIntMapping.RIname=RawInterface.RIname AND cache_RLibRIntMapping.RIlibrary=RawInterface.RIlibrary

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



More information about the lsb-messages mailing list