Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 6A1DD782C94 for <~alpine/devel@lists.alpinelinux.org>; Sun, 23 Feb 2020 15:16:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D9E1C28D59 for <~alpine/devel@lists.alpinelinux.org>; Sun, 23 Feb 2020 16:16:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Eat9s_ZVGqsO for <~alpine/devel@lists.alpinelinux.org>; Sun, 23 Feb 2020 16:16:48 +0100 (CET) To: ~alpine/devel@lists.alpinelinux.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1582471008; bh=/IvTLzqOEId5XK6gXwQfJuC/dfYZ1Jw/07DS+wiTKOc=; h=To:From:Subject:Date; b=dwAuplA+LhT74q+Xr8XmfXkonJeSrpATzIhUjHGyAjLCdgLtyUUbHfwbKTjqpL+Aw kQ4EcGSZMepCmrZSUrgtsZMlr6Dhuq/AaErBj1wxPLFOd6dX4T4rKXzCrKLU9by6bc T/ditbxihpPvge12dD+Za2QUSRFRdeqCf9AUpXrjq/IkOvrxB0X15b/WZXUHP5kbpH xJsFJvpZoHrnocawHrrrP3YWbgYJyqd7W2HB9osiT2wAso93e7yDXPQCuxboPd2lOc Pq7BykwP7XMF8TLu9CKol8F+1bs4eWL+f6TwOcrciX+XDanAyNyNQKJvneu0ybpAmK xjfY2M+lbDlSw== From: Bart Ribbers Subject: Proper way to provide an alternative to a package Message-ID: <60dc3c46-b7e9-1e55-9726-82d82aec5ffc@disroot.org> Date: Sun, 23 Feb 2020 16:16:46 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hey all, In postmarketOS we sometimes have a package that's provided as an alternative to a different one (drop-in replacement). Our current example is that we have a package "mesa-git"[1] which tracks the latest git master of Mesa, intended to be used only on specific devices we support. This package is only to be used at runtime on these specific devices, in _every_ other case it should use the regular "mesa" package from the Alpine repositories. [1] https://gitlab.com/postmarketOS/pmaports/-/blob/master/temp/mesa-git/APKBUILD We've been messing for a while with the usual "provides" and "replaces", but we just _can't_ get it right. Previously the package got installed even if it was not required and explicitly instructed too but we did manage to prevent that with some hacks in our pmbootstrap tool. Now however it messes stuff up when you try to install -dev packages. For example I'm currently trying to compile a package locally on my device, and one of the -dev dependencies depends on "mesa-dev". However, since in this case "mesa-git-dev" is installed (which should just "provide" mesa-dev), it causes problems: ERROR: unsatisfiable constraints: mesa-git-glapi-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-glapi=19.3.4-r1] satisfies: mesa-git-dri-gallium-0_git20200202-r2[mesa-git-glapi] mesa-git-dri-gallium-0_git20200202-r2[so:libglapi.so.0] mesa-git-gl-0_git20200202-r2[so:libglapi.so.0] mesa-git-gles-0_git20200202-r2[so:libglapi.so.0] mesa-git-egl-0_git20200202-r2[so:libglapi.so.0] mesa-git-osmesa-0_git20200202-r2[so:libglapi.so.0] mesa-git-gl-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-gl=19.3.4-r1] satisfies: mesa-git-dri-gallium-0_git20200202-r2[mesa-git-gl] charging-sdl-0.1-r1[mesa-gl] osk-sdl-0.54-r0[mesa-gl] gst-plugins-base-1.16.2-r2[so:libGL.so.1] xorg-server-1.20.7-r0[so:libGL.so.1] qt5-qtwayland-5.12.5-r3[so:libGL.so.1] qt5-qtmultimedia-5.12.5-r2[so:libGL.so.1] plasma-framework-5.67.0-r1[so:libGL.so.1] xorg-server-xwayland-1.20.7-r0[so:libGL.so.1] mesa-git-gles-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-gles=19.3.4-r1] satisfies: mesa-git-dri-gallium-0_git20200202-r2[mesa-git-gles] qt5-qtbase-x11-9999-r17[so:libGLESv2.so.2] mesa-git-gbm-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-gbm=19.3.4-r1] satisfies: mesa-git-dri-gallium-0_git20200202-r2[mesa-git-gbm] xorg-server-1.20.7-r0[so:libgbm.so.1] kwin-5.18.1-r1[so:libgbm.so.1] qt5-qtbase-x11-9999-r17[so:libgbm.so.1] xdg-desktop-portal-kde-5.18.1-r1[so:libgbm.so.1] mesa-git-egl-0_git20200202-r2[so:libgbm.so.1] xorg-server-xwayland-1.20.7-r0[so:libgbm.so.1] mesa-git-egl-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-egl=19.3.4-r1] satisfies: mesa-git-dri-gallium-0_git20200202-r2[mesa-git-egl] gst-plugins-base-1.16.2-r2[so:libEGL.so.1] qt5-qtwayland-5.12.5-r3[so:libEGL.so.1] qt5-qtbase-x11-9999-r17[so:libEGL.so.1] plasma-framework-5.67.0-r1[so:libEGL.so.1] kwayland-5.67.0-r1[so:libEGL.so.1] mesa-git-osmesa-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-osmesa=19.3.4-r1] mesa-git-xatracker-0_git20200202-r2: breaks: mesa-dev-19.3.4-r1[mesa-xatracker=19.3.4-r1] Can anyone explain to me how an alternative package is to be configured to actually work as a drop-in replacement? Cheers, Bart (PureTryOut)