[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fink-commits
Subject:    [cvs] web/pdb package.php,1.94,1.95
From:       "Justin F. Hallett" <thesin () users ! sourceforge ! net>
Date:       2016-09-26 13:59:28
Message-ID: E1boWRP-0003Cw-8x () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Update of /cvsroot/fink/web/pdb
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6511

Modified Files:
	package.php 
Log Message:
Remove everythign after the - in distruction, so it's not trying to find 10.5-EOL or 10.9-libcxx

Index: package.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/package.php,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- package.php	22 Feb 2016 21:38:32 -0000	1.94
+++ package.php	26 Sep 2016 13:59:26 -0000	1.95
@@ -56,7 +56,16 @@
 	$fullQuery->addQuery("rel_id:\"$rel_id\"", true);
 } else { // no need to parse the other parameters
 	if ($distribution) {
-		$fullQuery->addQuery("dist_name:\"$distribution\"", true);
+		if (preg_match('/^([0-9\.]+)\-(.*)$/', $distribution, $matches)) {
+			if ($matches[2] == 'gcc3.3') {
+				$newdist = $distribution;
+			} else {
+				$newdist = $matches[1];
+			}
+		} else {
+			$newdist = $distribution;
+		}
+		$fullQuery->addQuery("dist_name:\"$newdist\"", true);
 	}
 	if ($release) {
 		if ($release == 'unstable' || $release == 'stable') {
@@ -103,7 +112,18 @@
 <?php
 } else {
 
-	$pobj = array_shift($result);
+	$pver = 0;
+	$pkey = 0;
+	foreach ($result as $k => $v) {
+		if ($v['sort_version'] > $pver) {
+			$pver = $v['sort_version'];
+			$pkey = $k;
+		}
+	}
+	$pobj = $result[$pkey];
+	unset($result[$pkey]);
+	unset($pver);
+	unset($pkey);
 	$fullversion = get_full_version($pobj);
 
 ?>


------------------------------------------------------------------------------
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic