aboutsummaryrefslogtreecommitdiff
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/DEB6
-rw-r--r--Functions/RPM15
2 files changed, 17 insertions, 4 deletions
diff --git a/Functions/DEB b/Functions/DEB
index 1c0e498..5d59135 100644
--- a/Functions/DEB
+++ b/Functions/DEB
@@ -17,7 +17,7 @@ function thirdparty_arch() {
fi
}
-function thirdparty_distribution() {
+function thirdparty_distribution_name() {
local debfile="$1"
local distro=$(dpkg-deb --field "$debfile" "Distribution")
if [ -z "$distro" ]
@@ -26,6 +26,10 @@ function thirdparty_distribution() {
fi
}
+function thirdparty_distribution_code() {
+ return
+}
+
function thirdparty_dependencies() {
local debfile="$1"
local deps=$(dpkg-deb --field "$debfile" "Depends")
diff --git a/Functions/RPM b/Functions/RPM
index 635f643..a166fb0 100644
--- a/Functions/RPM
+++ b/Functions/RPM
@@ -11,11 +11,16 @@ function thirdparty_arch() {
rpminfo --arch "$rpmfile"
}
-function thirdparty_distribution() {
+function thirdparty_distribution_name() {
local rpmfile="$1"
rpminfo --distribution "$rpmfile"
}
+function thirdparty_distribution_code() {
+ local rpmfile="$1"
+ echo "$rpmfile" | awk -F. '{print $(NF-2)}'
+}
+
function thirdparty_dependencies() {
local rpmfile="$1"
rpminfo --dependencies "$rpmfile"
@@ -64,8 +69,12 @@ function thirdparty_url() {
function thirdparty_search_remotedb() {
local path="$1"
local arch="$2"
- local distro="$3"
- RPMFinder --path="$path" --arch="$arch" --distro="$distro"
+ local distroname="$3"
+ local distrocode="$4"
+ local result=$(RPMFinder --path="$path" --arch="$arch" --distroname="$distroname" --distrocode="$distrocode")
+ [ -z "$result" ] && [ "$arch" = "noarch" ] && result=$(RPMFinder --path="$path" --arch="$(uname -m)" --distroname="$distroname" --distrocode="$distrocode")
+ [ -z "$result" ] && return
+ echo "$result"
}
function thirdparty_uncompress() {