Subject: [alpine-devel] [abuild RFC] abuild: add config option to globally enable dbg

From: Carlo Landmeter <[email-masked]>
Date: Fri, 16 Jun 2017 11:41:40 +0200

---
 abuild.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/abuild.in b/abuild.in
index 1db1a4a..ff37162 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2317,6 +2317,11 @@ fi
 # for recursive action
 export REPODEST SRCDEST
 
+# add dbg subpackage if its enabled globally
+if [ -n "$DEFAULT_DBG" ] && ! subpackage_types_has "dbg" && ! options_has "!dbg" && [ "$arch" != "noarch" ]; then
+        subpackages="$pkgname-dbg $subpackages"
+fi
+
 # if we want build debug package
 if [ -n "$DEBUG" ] || subpackage_types_has "dbg"; then
 	CFLAGS="$CFLAGS -g"
-- 
2.13.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Alba Pompeo <[email-masked]>
Date: Fri, 16 Jun 2017 09:24:10 -0300

Why not create a dbgs metapackage like the docs metapackage?
https://git.alpinelinux.org/cgit/abuild/tree/abuild.in#n1476
https://git.alpinelinux.org/cgit/aports/tree/main/docs/APKBUILD

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 16 Jun 2017 16:09:26 +0200

On Fri, 16 Jun 2017 09:24:10 -0300

> https://git.alpinelinux.org/cgit/aports/tree/main/docs/APKBUILD

Why would someome want install all the -dbg packages?

-nc

---

---

From: Timo Teras <[email-masked]>
Date: Sun, 18 Jun 2017 10:00:36 +0300

On Fri, 16 Jun 2017 16:09:26 +0200

> Why would someome want install all the -dbg packages?

I would. When trying to analyze core dump. Global meta package would be
nicer than trying to hunt individually the -dbg packagaes needed.
Though, we might hold that for the big projects. Getting firefox,
libreoffice etc. -dbg might be just too much.

/Timo

---

---

From: Seamus Caveney <[email-masked]>
Date: Sun, 18 Jun 2017 02:20:59 -0700

> libreoffice etc. -dbg might be just too much.

Better to opt for wildcards for install. More useful than adding a dbg 
meta package and replaces the current solution for docs metapkg, which 
is brittle imo, where is it documented that you must have the installif 
entry in a custom doc function in an APKBUILD?

apk add *-dbg
apk add *-doc

Or say install many subpackages:

apk add qemu-system-*

The function already exists for search, why not for add as well?

---

---

From: Timo Teras <[email-masked]>
Date: Sun, 18 Jun 2017 14:03:58 +0300

On Sun, 18 Jun 2017 02:20:59 -0700
Seamus Caveney <[email-masked]> wrote:

> > I would. When trying to analyze core dump. Global meta package
> > would be nicer than trying to hunt individually the -dbg packagaes
> > needed. Though, we might hold that for the big projects. Getting
> > firefox, libreoffice etc. -dbg might be just too much.
> 
> Better to opt for wildcards for install. More useful than adding a
> dbg meta package and replaces the current solution for docs metapkg,
> which is brittle imo, where is it documented that you must have the
> installif entry in a custom doc function in an APKBUILD?

It's in the 'default_doc' split function. But yes, it's not explicitly
documented.

> apk add *-doc

This would add -dbg packages for everything in the entire index, not
just for the packages which are already installed.

Also the install_if works so that if you have 'docs' installed and you
do 'apk add foo' you will automatically get 'foo-doc' too if it exists.
Basically "apk add docs" means that I want to have docs on all packages
installed on system now, or any time in the future.

"apk del foo" would also remove the docs package with the 'docs' meta.
"apk add *-docs" would add dependency in 'world' and require explcit
removal of the docs too.

The point of the install_if / docs packages is to be more dynamic and
follow the installation status of the main package.

> The function already exists for search, why not for add as well?

But, it does exist for add and delete too. I use regularly "apk del
*-dev". However, the use case is different than from the 'docs'
metapackage and install_if.

/Timo

---

---

From: Cág <[email-masked]>
Date: Mon, 19 Jun 2017 11:57:07 +0100

> metapackage and install_if.

"apk add" doesn't work for me:

# apk -i add xfce4-*
ERROR: unsatisfiable constraints:
  xfce4-* (missing):
    required by: world[xfce4-*]

"apk del" does:

# apk -i del lx*
The following packages will be REMOVED:
  lxappearance-doc lxappearance-lang lxappearance

-- 
caóc

---

---

From: William Pitcock <[email-masked]>
Date: Wed, 21 Jun 2017 14:04:20 -0500

Hello,

>     required by: world[xfce4-*]

Indeed, this is because apk add adds dependency rules, not packages.
However, it is possible that we could do wildcard expansion for simple
package names.
I will look into it.

William

---