Verified Commit c848600b authored by Morten Linderud's avatar Morten Linderud 🏄
Browse files

db-functions: Add more (terrible) heuristics for detecting debug packages


Signed-off-by: Morten Linderud's avatarMorten Linderud <morten@linderud.pw>
parent 796bed5b
Pipeline #13898 canceled with stage
......@@ -249,12 +249,27 @@ getpkgarch() {
echo "$_ver"
}
getpkgdesc() {
local _desc
_desc="$(_grep_pkginfo "$1" "pkgdesc")"
if [[ -z $_desc ]]; then
error "Package '%s' has no pkgdesc in the PKGINFO. Fail!" "$1"
exit 1
fi
echo "$_desc"
}
# TODO: We need to not depend on pkgdesc
# here be dragons
is_debug_package() {
local pkgfile=${1}
local pkgbase="$(getpkgbase "${pkgfile}")"
local pkgname="$(getpkgname "${pkgfile}")"
local pkgdesc="$(getpkgdesc "${pkgfile}")"
[[ ${pkgbase}-debug = ${pkgname} ]]
[[ ${pkgdesc} == "Detached debugging symbols for "* && ${pkgbase}-debug = ${pkgname} ]]
}
check_packager() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment