makepkg: Use pkgbase in pkgdesc for debug packages

Message ID 20211219175825.546399-1-foxboron@archlinux.org
State New
Headers show
Series makepkg: Use pkgbase in pkgdesc for debug packages | expand

Commit Message

Morten Linderud Dec. 19, 2021, 5:58 p.m. UTC
From: Morten Linderud <morten@linderud.pw>

When trying to identify debug packages among other packages we
discovered that it's pkgname used in pkgdesc. Since pkgname can
sometimes be an array when building debug packages for a split package,
this could potentially include a pkgname that might not make sense
depending on the order of the array.

This patch simply uses pkgbase as it seems more correct.

Signed-off-by: Morten Linderud <morten@linderud.pw>
---
 scripts/makepkg.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Allan McRae Jan. 2, 2022, 8:15 a.m. UTC | #1
On 20/12/21 03:58, Morten Linderud wrote:
> From: Morten Linderud <morten@linderud.pw>
> 
> When trying to identify debug packages among other packages we
> discovered that it's pkgname used in pkgdesc. Since pkgname can
> sometimes be an array when building debug packages for a split package,
> this could potentially include a pkgname that might not make sense
> depending on the order of the array.
> 
> This patch simply uses pkgbase as it seems more correct.
> 
> Signed-off-by: Morten Linderud <morten@linderud.pw>
> ---
>   scripts/makepkg.sh.in | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 9f5fd401..27d3373d 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -766,7 +766,7 @@ create_debug_package() {
>   		fi
>   	done
>   
> -	pkgdesc="Detached debugging symbols for $pkgname"
> +	pkgdesc="Detached debugging symbols for $pkgbase"

Makes sense - applied to my patchqueue branch.

>   	pkgname=$pkgbase-@DEBUGSUFFIX@
>   	pkgtype=debug
>

Patch

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 9f5fd401..27d3373d 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -766,7 +766,7 @@  create_debug_package() {
 		fi
 	done
 
-	pkgdesc="Detached debugging symbols for $pkgname"
+	pkgdesc="Detached debugging symbols for $pkgbase"
 	pkgname=$pkgbase-@DEBUGSUFFIX@
 	pkgtype=debug