summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dibb <beandog@gentoo.org>2009-12-18 19:51:00 +0000
committerSteve Dibb <beandog@gentoo.org>2009-12-18 19:51:00 +0000
commit58e5f0abef4f49ff02da634ebf6b3e601f67588c (patch)
tree3b588bdea8e2783fcc3371a8f32bc8ac7c46b8a8
parentupdates (diff)
downloadznurt-org-backend-58e5f0abef4f49ff02da634ebf6b3e601f67588c.tar.gz
znurt-org-backend-58e5f0abef4f49ff02da634ebf6b3e601f67588c.tar.bz2
znurt-org-backend-58e5f0abef4f49ff02da634ebf6b3e601f67588c.zip
Change version to assume there is only one alpha after a digit version
git-svn-id: file:///var/svn/portage@4 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
-rw-r--r--class.portage.ebuild.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/class.portage.ebuild.php b/class.portage.ebuild.php
index d96f46a..2be24b7 100644
--- a/class.portage.ebuild.php
+++ b/class.portage.ebuild.php
@@ -427,8 +427,11 @@
$str = $this->stripCategory();
$str = $this->stripSlot($str);
- // Same pattern as in getPackageName()
- $pattern = '/\-\d+((\.?\d+)+)?([A-Za-z]+)?((_(alpha|beta|pre|rc|p)\d*)+)?(\-r\d+)?(\:.+)?$/';
+ // This pattern makes ONE grand assumption:
+ // That a version that has both digits and letters (see ([A-Za-z])? ) that there is
+ // ONLY one letter (fex: openssl-0.9a). This lets us catch the pn properly of
+ // atoms like font-adobe-100dpi, where it would normally think 100dpi = version.
+ $pattern = '/\-\d+((\.?\d+)+)?([A-Za-z])?((_(alpha|beta|pre|rc|p)\d*)+)?(\-r\d+)?(\:.+)?$/';
$arr = preg_split($pattern, $str);
$this->pn = $arr[0];