' . "\n"; echo '

Type: ' . $_GET['type'] . '


' . "\n"; } else { echo 'Please select which type of data you want to see.
' . "\n"; echo 'Supported are "proj" and "dev" types, for the two
' . "\n"; echo 'categories of overlays that we support.
' . "\n"; echo '
' . "\n"; echo '
' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '
' . "\n"; echo '' . "\n"; echo '' . "\n"; exit; } # Check that a name is set if(isset($_GET['name']) && $_GET['name'] != '') { $names_db = mysql_query('SELECT `overname` FROM `overlays` WHERE `overtype`= "' . $_GET['type'] . '"', $db); while($names = mysql_fetch_array($names_db)) { if($_GET['name'] === $names['overname']) { echo '

Name: ' . $_GET['name'] . '


' . "\n"; $exitinvalid = '0'; break; } else { $exitinvalid = '1'; } } if($exitinvalid === '1') { echo 'Invalid name supplied!
' . "\n"; echo '' . "\n"; echo '' . "\n"; exit; } } else { $names_db = mysql_query('SELECT `overname` FROM `overlays` WHERE `overtype`= "' . $_GET['type'] . '"', $db); echo 'Please select the name of the data you want to see.
' . "\n"; echo '
' . "\n"; echo '
' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '
' . "\n"; echo '' . "\n"; echo '' . "\n"; exit; } ?> B > C compare if($pkgs['versport'] != '-' && $pkgs['versover'] != '-' && $pkgs['versupst'] != '-') { # Let's consider upstream as being the reference here, so always up-to-date $upstclass = ' class="updated" title="from upstream script ( ' . $pkgs['upstscript'] . ' )"'; # First let's check the upstream <-> overlay relation switch(version_compare($pkgs['versupst'], $pkgs['versover'])) { case '-1': $overclass = ' class="updated"'; break; case '0': $overclass = ' class="updated"'; break; case '1': $overclass = ' class="outdated"'; break; } # Then let's check the overlay <-> portage relation switch(version_compare($pkgs['versover'], $pkgs['versport'])) { case '-1': $portclass = ' class="updated"'; break; case '0': $portclass = ' class="updated"'; break; case '1': $portclass = ' class="outdated"'; break; } } # Case 2: A def, B undef, C undef - A if($pkgs['versport'] != '-' && $pkgs['versover'] == '-' && $pkgs['versupst'] == '-') { # Only in Portage, so it's automatically ok $portclass = ' class="updated"'; } # Case 3: A def, B def, C undef - A > B compare if($pkgs['versport'] != '-' && $pkgs['versover'] != '-' && $pkgs['versupst'] == '-') { # Let's check the overlay <-> portage relation switch(version_compare($pkgs['versover'], $pkgs['versport'])) { case '-1': $overclass = ' class="outdated"'; $portclass = ' class="updated"'; break; case '0': $overclass = ' class="updated"'; $portclass = ' class="updated"'; break; case '1': $overclass = ' class="updated"'; $portclass = ' class="outdated"'; break; } } # Case 4: A def, B undef, C def - A > C compare if($pkgs['versport'] != '-' && $pkgs['versover'] == '-' && $pkgs['versupst'] != '-') { # Let's consider upstream as being the reference here, so always up-to-date $upstclass = ' class="updated" title="from upstream script ( ' . $pkgs['upstscript'] . ' )"'; # Let's check the upstream <-> portage relation switch(version_compare($pkgs['versupst'], $pkgs['versport'])) { case '-1': $portclass = ' class="updated"'; break; case '0': $portclass = ' class="updated"'; break; case '1': $portclass = ' class="outdated"'; break; } } # Case 5: A undef, B undef, C undef - nothing if($pkgs['versport'] == '-' && $pkgs['versover'] == '-' && $pkgs['versupst'] == '-') { # We have absolutely no info on this package, mark as dead $upstclass = ' class="deadinfo" title="no info available on this package at all"'; $overclass = ' class="deadinfo" title="no info available on this package at all"'; $portclass = ' class="deadinfo" title="no info available on this package at all"'; } # Case 6: A undef, B def, C def - B > C compare if($pkgs['versport'] == '-' && $pkgs['versover'] != '-' && $pkgs['versupst'] != '-') { # Let's consider upstream as being the reference here, so always up-to-date $upstclass = ' class="updated" title="from upstream script ( ' . $pkgs['upstscript'] . ' )"'; # Let's check the upstream <-> overlay relation switch(version_compare($pkgs['versupst'], $pkgs['versover'])) { case '-1': $overclass = ' class="updated"'; break; case '0': $overclass = ' class="updated"'; break; case '1': $overclass = ' class="outdated"'; break; } } # Case 7: A undef, B undef, C def - C if($pkgs['versport'] == '-' && $pkgs['versover'] == '-' && $pkgs['versupst'] != '-') { # Only Upstream, so it's automatically ok $upstclass = ' class="updated" title="from upstream script ( ' . $pkgs['upstscript'] . ' )"'; } # Case 8: A undef, B def, C undef - B if($pkgs['versport'] == '-' && $pkgs['versover'] != '-' && $pkgs['versupst'] == '-') { # Only in Overlay, so it's automatically ok $overclass = ' class="updated"'; } echo '' . "\n"; echo ' ' . "\n"; echo ' ' . $pkgs['versport'] . ' ' . "\n"; echo ' ' . $pkgs['versover'] . ' ' . "\n"; echo ' ' . $pkgs['versupst'] . ' ' . "\n"; echo '' . "\n"; } ?>
Package Name Latest in Portage Latest in Overlay Latest Upstream
' . $pkgs['name'] . '