summaryrefslogtreecommitdiffstats
path: root/apk_browser.module
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2013-05-10 17:54:11 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2013-05-10 17:54:11 +0200
commit462435a44b800d96bd723f436754b02d87bec29e (patch)
treedc9c971593c317f34123c4c372a37af05c473195 /apk_browser.module
parent1e3e4e23ebfe473571051428480b8b8f03f1ab88 (diff)
downloadapk_browser-462435a44b800d96bd723f436754b02d87bec29e.tar.bz2
apk_browser-462435a44b800d96bd723f436754b02d87bec29e.tar.xz
correctly add provides and remove version/abi numbers
This is a bit hackish. inside apk_tools deps can link to abi version or pkgver In our apk_browser this is not yet implemented.
Diffstat (limited to 'apk_browser.module')
-rw-r--r--apk_browser.module13
1 files changed, 11 insertions, 2 deletions
diff --git a/apk_browser.module b/apk_browser.module
index 5568016..ec54659 100644
--- a/apk_browser.module
+++ b/apk_browser.module
@@ -415,10 +415,19 @@ function apk_browser_apkindex_reader($apk_string) {
$apackage = preg_split("`\n`", $package);
foreach ($apackage as $apk_line) {
switch ($apk_line[0]) {
- //depend and install_if lines
+ /*
+ * Check all package names in install_if depends and provides
+ * put them in arrays and remove version/abi numbers.
+ * removing version/abi is a bit hackish.
+ */
case "D":
case "i":
- $result[$key][$apk_line[0]] = explode(" ", substr($apk_line, 2));
+ case "p":
+ $pkgnames = explode(" ", substr($apk_line, 2));
+ foreach ($pkgnames as $pkgname) {
+ $pkgname = explode('=', $pkgname);
+ $result[$key][$apk_line[0]][] = $pkgname[0];
+ }
break;
//other apk variables
default: