[aur-general] PKGBUILD: depends vs. makedepends and namcap warning
Baptiste Jonglez
baptiste at bitsofnetworks.org
Mon Jul 11 08:38:41 UTC 2016
On Mon, Jul 11, 2016 at 10:18:32AM +0200, Lukas Böger wrote:
> Dear AUR list,
>
> simple question about dependencies in PKGBUILDs:
>
> Package A provides some header files and build scripts. Package B
> provides additional headers, and their usage only work out if A's
> headers are in place. Additionaly, package B can only be compiled using
> A's build scripts.
>
> 1) Is it correct to have package A in B's depends AND makedepends arrays?
In general, no. If you need a dependency both at compile time and at
runtime, you should put it in depends only.
> 2) Am I supposed to ignore namcap's warning 'Dependency included and not
> neede' because it doesn't take header dependencies into account?
It seems similar to this situation: https://bugs.archlinux.org/task/48277
Basically, your package B looks like a library. B should only makedepends
on A, and any package depending on B should also makedepends on A.
The rationale is that header files and build scripts are not needed to run
a program, so they should not be installed as dependencies. They should
only be installed as makedepends, for every package that needs them (even
indirectly).
One such example is boost:
https://www.archlinux.org/packages/extra/x86_64/boost/
Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20160711/ee95d0b4/attachment.asc>
More information about the aur-general
mailing list