Runtime dependencies not required for building
Hugo Osvaldo Barrera
hugo at whynothugo.nl
Tue Aug 2 09:36:55 UTC 2022
On 2022-08-01 20:05, Archange wrote:
> Hi,
>
> Le 01/08/2022 à 18:37, Hugo Osvaldo Barrera a écrit :
> > Some packages I maintain have a lot of runtime dependencies that are not
> > required at build time (this is common for packages which only ship scripts and
> > have no tests).
> >
> > When building on a clean chroot, I have to wait for hundreds of megabytes in
> > packages to be copied and installed. This is rather inefficient, since these
> > are not required. However, the `makedepends` ARE required in this case, but
> > there is no overlap.
> >
> > I'd like some way to indicate that a PKGBUILD does not require its runtime
> > dependencies for building the package.
> >
> > Perhaps something like `options=(!depends)`
> >
> > I'd like to hear feedback on this, thoughts?
>
> Just set the depends array inside the package() function, this way they
> won’t be installed during the build.
>
> Regards,
> Bruno/Archange
>
Ah, that's nice and simple.
I see it's also possible to define the normal depends=() with dependencies that
are both runtime and buildtime dependencies, and then extend that depends array
inside the package() function by adding runtime-only dependencies there.
Seems like `mksrcinfo` handles this fine too. Nice.
--
Hugo Osvaldo Barrera
More information about the pacman-dev
mailing list