~alpine/users

2 2

Using repository tags ("@tag") with virtual packages

Andreas Kähäri <andreas.kahari@abc.se>
Details
Message ID
<aZg13CbA5CLeVI_0@dolores.invalid>
DKIM signature
missing
Download raw message
Hi,

A few months ago I asked this question on the "Unix & Linux"
StackExchange site, but without getting a proper answer, other than
a comment saying it's not possible.

I'm posting it here to see whether anyone has had a similar issue, or
knows of plans to support this in the future, or just in general has
thoughts on the matter.  It's not a critical issue for me.

Assuming I have the following repository configuration:

	http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
	http://dl-cdn.alpinelinux.org/alpine/latest-stable/community

	@edge http://dl-cdn.alpinelinux.org/alpine/edge/community
	@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing

I usually want to install packages associated with each other under a
common virtual package, e.g.,

	apk add -t docker-all docker docker-doc docker-cli-compose

This works fairly well, but it doesn't work if I want to use the @edge
tag, as in, e.g.,

	apk add -t docker-all docker@edge docker-doc@edge docker-cli-compose@edge

This fails with:

	ERROR: 'docker@edge' is not a valid child dependency, format is name([<>~=]version)

It would be nice if it were possible to use the tag in this context, as
it would allow me to easily install a set of related packages from a
tagged repository as a common virtual package.

-- 
Matti Andreas Kähäri
Uppsala, Sweden

.
Achill Gilgenast <achill@achill.org>
Details
Message ID
<DGJS6AOM9IBA.3IWZB0PG3L4Q2@achill.org>
In-Reply-To
<aZg13CbA5CLeVI_0@dolores.invalid> (view parent)
DKIM signature
missing
Download raw message
Hey Andreas,

On Fri Feb 20, 2026 at 11:22 AM CET, Andreas Kähäri wrote:
> Hi,
>
> A few months ago I asked this question on the "Unix & Linux"
> StackExchange site, but without getting a proper answer, other than
> a comment saying it's not possible.
>
> I'm posting it here to see whether anyone has had a similar issue, or
> knows of plans to support this in the future, or just in general has
> thoughts on the matter.  It's not a critical issue for me.
>
> Assuming I have the following repository configuration:
>
> 	http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
> 	http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
>
> 	@edge http://dl-cdn.alpinelinux.org/alpine/edge/community
> 	@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing
>

Please not that this is _very_ unsupported and you _will_ get into
issues with this way. Mixing repositories with different Alpine versions
is unsupported: https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk..html#_repositories_releases_and_mirrors

> I usually want to install packages associated with each other under a
> common virtual package, e.g.,
>
> 	apk add -t docker-all docker docker-doc docker-cli-compose
>
> This works fairly well, but it doesn't work if I want to use the @edge
> tag, as in, e.g.,
>
> 	apk add -t docker-all docker@edge docker-doc@edge docker-cli-compose@edge
>
> This fails with:
>
> 	ERROR: 'docker@edge' is not a valid child dependency, format is name([<>~=]version)
>
> It would be nice if it were possible to use the tag in this context, as
> it would allow me to easily install a set of related packages from a
> tagged repository as a common virtual package.

This is a known issue, because "virtual packages go to the package database as
locally generated packages. And package dependencies cannot have tags, because
tags are local configuration."

See <https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10902>.
Andreas Kähäri <andreas.kahari@abc.se>
Details
Message ID
<aZjF1fBC2bdUGGc4@dolores.invalid>
In-Reply-To
<DGJS6AOM9IBA.3IWZB0PG3L4Q2@achill.org> (view parent)
DKIM signature
missing
Download raw message
On Fri, Feb 20, 2026 at 01:16:48PM +0100, Achill Gilgenast wrote:
> Hey Andreas,
> 
> On Fri Feb 20, 2026 at 11:22 AM CET, Andreas Kähäri wrote:
> > Hi,
> >
> > A few months ago I asked this question on the "Unix & Linux"
> > StackExchange site, but without getting a proper answer, other than
> > a comment saying it's not possible.
> >
> > I'm posting it here to see whether anyone has had a similar issue, or
> > knows of plans to support this in the future, or just in general has
> > thoughts on the matter.  It's not a critical issue for me.
> >
> > Assuming I have the following repository configuration:
> >
> > 	http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
> > 	http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
> >
> > 	@edge http://dl-cdn.alpinelinux.org/alpine/edge/community
> > 	@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing
> >
> 
> Please not that this is _very_ unsupported and you _will_ get into
> issues with this way. Mixing repositories with different Alpine versions
> is unsupported: https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk..html#_repositories_releases_and_mirrors

I'm aware, but that's irrelevant here:

	% cat /etc/apk/repositories
	@thetag http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
	% doas apk update
	v3.23.3-157-g9590e1cfbc1
	[http://dl-cdn.alpinelinux.org/alpine/latest-stable/main]
	OK: 5999 distinct packages available
	% doas apk add -t docker-all docker@thetag docker-doc@thetag
	ERROR: 'docker@thetag' is not a valid package dependency, format is name([<>~=]version)
	zsh: exit 99    doas apk add -t docker-all docker@thetag docker-doc@thetag


> 
> > I usually want to install packages associated with each other under a
> > common virtual package, e.g.,
> >
> > 	apk add -t docker-all docker docker-doc docker-cli-compose
> >
> > This works fairly well, but it doesn't work if I want to use the @edge
> > tag, as in, e.g.,
> >
> > 	apk add -t docker-all docker@edge docker-doc@edge docker-cli-compose@edge
> >
> > This fails with:
> >
> > 	ERROR: 'docker@edge' is not a valid child dependency, format is name([<>~=]version)
> >
> > It would be nice if it were possible to use the tag in this context, as
> > it would allow me to easily install a set of related packages from a
> > tagged repository as a common virtual package.
> 
> This is a known issue, because "virtual packages go to the package database as
> locally generated packages. And package dependencies cannot have tags, because
> tags are local configuration."

Hmm.

> See <https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10902>.

Oh, well.

-- 
Matti Andreas Kähäri
Uppsala, Sweden

.
Reply to thread Export thread (mbox)