Received: from mx.nixnet.email (mx.nixnet.email [5.161.67.119]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 96656225C11 for <~alpine/users@lists.alpinelinux.org>; Thu, 15 May 2025 17:50:01 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id 0B50E7D32D; Thu, 15 May 2025 19:49:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pwned.life; s=202002021149; t=1747331400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ovPW1Vf/uJZw6nXCtMXJtWMs1mu1aEsgKMlHm4oMn00=; b=QFsG/XlcADPqN0whUg5YVhjCLLSE9SvGdPp7gAz+3YzN9a/DWausx9qrvM2oRx1yxHbire Utc5+hQQ/0yqPK58OS3oeRc3yJrQjO0tTK1P6FbvuUXiSy9KsIfsjrLC85EtclZkXJ82Iq NTDiiwrddqhT0zSDTnKMrNT3F/Zrq0Y= Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 15 May 2025 19:49:57 +0200 Message-Id: Subject: Re: What exatly is install_if in apk? From: "fossdd" To: "Pramod V U" , "~alpine/users@lists.alpinelinux.org" <~alpine/users@lists.alpinelinux.org> X-Greeting: Hi mom! Look, I'm in somebodys mail client! X-Mailer: aerc 0.20.1-0-g2ecb8770224a References: In-Reply-To: On Thu May 15, 2025 at 7:38 PM CEST, Pramod V U wrote: > I'm extremely sorry, I couldn't find any documentation on it. Yeah, documentation is a bit missing in this case. > > In the alpine testing repo, there's a service management suite named 66. > I will be packaging frontends (analogous to openrc initscripts) for 66, f= or alpine. > They will be the name of the binary "$pkgnam" with "-66" suffix; Named "$= pkgnam-66"\ Note that Alpine for now won't add new subpackages for various init systems. Alternative init systems are not really supported at the moment. > > In order to make these packages install by themselves, similar to "$pkgna= m-openrc" if "openrc" is installed, I understood that there is a feature kn= own as "install_if". > But I am unable to find any info on how to use it, or even what exactly i= s it. It's defining a "optional dependency" to the referenced package. If `test-66` has a install if on `test 66`, test-66 gets installed if `test` and `66` is installed, if there is only one package referenced, it gets installed if the single package is installed. But install_if's are not strict dependencies, as the usual apk dependencies. For example, in this case we can still run `apk add !test-66` to remove the package. Often install_ifs are combined with subpackages which contain files only relevant to a related other package: =09 pkgname=3Dsomeservice pkgver=3D1 pkgrel=3D0 subpackages=3D"$pkgname-somethingelse" ... somethingelse() { depends=3D"$pkgname=3D$pkgver-r$pkgrel somethingelse" install_if=3D"$pkgname=3D$pkgver-r$pkgrel somethingelse" =09 amove ... } > > Help will be appreciated. > > Regards, Pramod V U