Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 11577780ED9 for <~alpine/apk-tools@lists.alpinelinux.org>; Sun, 9 Feb 2020 14:06:06 +0000 (UTC) Received: by mail-lj1-f179.google.com with SMTP id d10so4154097ljl.9 for <~alpine/apk-tools@lists.alpinelinux.org>; Sun, 09 Feb 2020 06:06:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=44TmPF6ESO3GOMS+4wDeyXw7HOWqYKpyQ2NfhRMn3eM=; b=iVpx51FpyLmgSErG7ynH/zVSdpKEz2lB+fOUrn8IE4OboPwPaEjr/f/zwK58PgBwUt atCUgW7VCOXzPqkvGd72dbsDRagShTrUY2kX76SiHWIOYNllcg29vqtlWSXBEni0Ye6u 7Bkv3GPdB284VVE8cGPe9tBtLs4QJX2KZ+c/QvCY8VVk96MhO7dBscVFS/BjOzIc76pD oUAY89VpPnpDnhxTztM5CWUBWmtTV2OITKm3O7fP0A9N12cM/lTZ8gYOhoaED/bYePQE 3lQiFpS+GZv5QAISlMcmrF1eVJ4TJnJY/oADgwjeCY2cpJo3M8OGZHg1mxle5DehfJe2 RO6A== X-Gm-Message-State: APjAAAWaDWryYsDqPHSGcnCgET3wyRIwivDU4gE3lMo6KLDU2qu2WxE/ k2zA+7Wzrnq7zEHA3d+oQig= X-Google-Smtp-Source: APXvYqxuu1d4iCAI3y8P+S9SAVjRvdWHeMyNMusEOrs/ubxQbUF4B7vbqtd7BL6ytCHsdBtbre1vBg== X-Received: by 2002:a2e:9e4c:: with SMTP id g12mr5116958ljk.15.1581257165544; Sun, 09 Feb 2020 06:06:05 -0800 (PST) Received: from vostro.wlan (dtc5qkyyyyyyyyyyyyx9y-3.rev.dnainternet.fi. [2001:14ba:80b2:d400::4fa]) by smtp.gmail.com with ESMTPSA id t29sm3895988lfg.84.2020.02.09.06.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 06:06:05 -0800 (PST) Date: Sun, 9 Feb 2020 16:06:01 +0200 From: Timo Teras To: Clayton Craft Cc: ~alpine/apk-tools@lists.alpinelinux.org Subject: Re: supporting multiple versions of same package in single repo Message-ID: <20200209160555.144c01f9@vostro.wlan> In-Reply-To: <20200209023706.rizdc3333ljjjrie@computer.craftyguy.net> References: <20200203222821.wty53efr5u2sx3gk@computer.craftyguy.net> <20200204110646.2d9f80b4@vostro> <20200209023706.rizdc3333ljjjrie@computer.craftyguy.net> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 8 Feb 2020 18:37:06 -0800 Clayton Craft wrote: > On Tue, Feb 04, 2020 at 11:06:52AM +0200, Timo Teras wrote: > >Interesting setup. I wonder if in Arch it is a feature where a global > >substitution rule diverts mesa-dev to mesa-git-dev or similar. > > > >Using purely apk dependencies, you could try the following: > > > >1. mesa-git-dev > > provides="mesa-dev" > > provider_priority=1 > > > > The provides tells it's good for 'mesa-dev'. Since there's no > > provided version specified it's not good for automatic install; the > > provider_priority=1 makes that happen. > > > > One caveat is at least that if someone depends e.g > > "mesa-dev>19.0", it would not get satisfied with the mesa-git-dev. > > > > OR > > > > provides="mesa-dev=19.2" > > > > To make the git act as if it was this version. You probably then > > want a smaller version than what the real mesa is so that the > > mesa-git-dev does not get preferred always. > > Hmm, I think either option could cause issues. The first option is an > issue because there do seem to be some packages that depend on > 'mesa-dev>=19.3'. With the second option, some packages would pull in > mesa-dev if they depended on a version greater than what is set in > mesa-git-dev's "provides". > > When apk is faced with two packages that 'provide' a virtual package > (e.g. 'mesa' vs 'mesa-git'), and 'provider_priority' is not set in > either one, what breaks the tie? Is it the one with the higher > version (assuming one is specified in the 'provides=')? > > > > >2. mesa-git > > depends="!mesa" > > I was attempting to test this, but apk complains: > (2363538) [18:28:58] ERROR: Package '!mesa': Could not find aport, > and could not find this package in any APKINDEX! > > > > > To make sure that depending on 'mesa-dev' does not prefer the real > > package and try to pull in it's dependencies. > > > >Interesting to hear if the above works. If you are using separate repositories of which only one get's picked up (or even if just the mesa-git providing repository is additional), you can just have each mesa-git-* package provides="mesa-*=$pkgver" where $pkgver should compare to something grater than the regular mesa. Timo