[Lsb-messages] /var/www/bzr/lsb/devel/dbadmin r280: Handle interface migration between modules

Denis Silakov denis.silakov at rosalab.ru
Thu Feb 28 07:20:17 UTC 2013


------------------------------------------------------------
revno: 280
committer: Denis Silakov <denis.silakov at rosalab.ru>
branch nick: dbadmin
timestamp: Thu 2013-02-28 11:20:17 +0400
message:
  Handle interface migration between modules
modified:
  int_single.inc
-------------- next part --------------
=== modified file 'int_single.inc'
--- a/int_single.inc	2012-09-10 17:07:47 +0000
+++ b/int_single.inc	2013-02-28 07:20:17 +0000
@@ -1680,8 +1680,20 @@
             print " from ".$rowModLib['Mname']." module (<a href=\"module.php?cmd=display_module&amp;module=".rawurlencode($rowModLib['SMname'])."\">".$rowModLib['SMname']."</a> submodule).<br/>\n" ;
         }
 
-        // We are actually in trouble if interface is assigned to many modules...
-        return $rowModLib['SMmandatorysince'];
+	// If there are several ModSMod entries for the symbol
+	// (e.g., it was moved from one module to another)
+	// then choose the minimal SMmandatorysince value
+        $selectMndt = "SELECT MIN(SMmandatorysince) FROM LGInt
+                        LEFT JOIN LibGroup ON LGid=LGIlibg
+                        LEFT JOIN SModLib ON SMLlid=LGlib
+                        LEFT JOIN SubModule ON SMid=SMLsmid
+                        LEFT JOIN ModSMod ON MSMsmid=SMid
+                        LEFT JOIN Module ON Mid=MSMmid
+                        WHERE LGIint=$Iid
+                        AND MSMappearedin > '' ";
+        $SMmandatorysince = Query_value($selectMndt);
+
+        return $SMmandatorysince;
     }
     else {
         return "";



More information about the lsb-messages mailing list