diff options
-rw-r--r-- | apk_browser.module | 13 |
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: |