X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by lists.alpinelinux.org (Postfix) with ESMTP id D059CF855C9 for ; Fri, 5 Apr 2019 13:43:41 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 4E0CA9E012E for ; Fri, 5 Apr 2019 13:43:41 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id BE06D9E0048 for ; Fri, 5 Apr 2019 13:43:40 +0000 (UTC) Date: Fri, 5 Apr 2019 15:43:33 +0200 From: Natanael Copa To: Alpine Development Subject: [alpine-devel] abuild and depends in subpackages Message-ID: <20190405154333.5d309856@ncopa-desktop.copa.dup.pw> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi, I tried to fix a problem in abuild with subpackages and depends, a problem that has been there for a long time. The problem is that depends is not unset for subpackages so for example, lets say we have a package named "foo" that is a tool, and a library. The tool has some dependencies that the library does not: pkgname="foo" depends="tooldep" subpackages="foo-libs" libs() { ... mv "$pkgdir"/usr/lib/libfoo "$subpkgdir"/usr/lib/ } The problem is that all the subpackages will currently inherit the depends from main package, so unless you explicitly unset it in your split function, the subpackage will inherit those. This affect packages which may have various subcomponents for which we may want package as separate subbackages, but we want let main package the the "install-all-subcomponents-in-one-go". For those we do: pkname=mainpkg depends="sub1 sub2" If we don't explicitly unset depends in the sub1 and sub2 we will end up with circular dependencies. sub1 will depend on itself + sub2. This happened with samba. In other words: you need to explicitly unset depends in subpackages unless you intentionally want to inherit those. The obvious fix for this is to unset depends before calling the split function. This is what I did in https://git.alpinelinux.org/abuild/commit/?id=8fbbffd201a28a06804c7f6d3a2b5cd948c6ce07 It turns out that there are various packages that depends on the previous behavior, which does subpkg() { depends="$depends foo bar" ... } I did a quick grep and found that there are potentially 109 packages in main and ~86 in community, and I don't have the time right now to review all those, so I had to revert to the previous behavior. :-( It seems that this affects py-* packages in particular. This means that everything that was built with abuild-3.4.0_rc1-r0 may have broken deps in subpackages. But we need to decide what behavior we want long term: Do we want explicitly (always) unset depends or avoid doing depends="$depends ..." in split functions? I would prefer avoid depends="$depends ..." -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---