Re: [PATCH v2] kbuild: control extra pacman packages with PACMAN_EXTRAPACKAGES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/08/07 06:40PM, Thomas Weißschuh wrote:
<snip>
> > > +
> > >  PHONY += pacman-pkg
> > >  pacman-pkg:
> > >         @ln -srf $(srctree)/scripts/package/PKGBUILD $(objtree)/PKGBUILD
> > > diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> > > index 663ce300dd06..8de869f9b1d4 100644
> > > --- a/scripts/package/PKGBUILD
> > > +++ b/scripts/package/PKGBUILD
> > > @@ -3,10 +3,13 @@
> > >  # Contributor: Jan Alexander Steffens (heftig) <heftig@xxxxxxxxxxxxx>
> > >
> > >  pkgbase=${PACMAN_PKGBASE:-linux-upstream}
> > > -pkgname=("${pkgbase}" "${pkgbase}-api-headers")
> > > -if grep -q CONFIG_MODULES=y include/config/auto.conf; then
> > > -       pkgname+=("${pkgbase}-headers")
> > > -fi
> > > +pkgname=("${pkgbase}")
> > > +
> > > +_extrapackages=${PACMAN_EXTRAPACKAGES:-}
> > 
> > 
> > Instead of adding inconsistent defaults in two places,
> > I would write like this:
> > 
> > _extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers}
> 
> Agreed.
> 

Closing the loop on this topic. I removed all changes made to Makefile.package
and set the default in PKGBUILD as suggested:

 _extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers}

Running the pacman-pkg target without setting PACMAN_EXTRAPACKAGES will build
all packages:

make pacman-pkg
...
==> Creating package "linux-upstream"...
...
==> Creating package "linux-upstream-headers"...
...
==> Creating package "linux-upstream-api-headers"...

Setting PACMAN_EXTRAPACKAGES to an empty value will build only the kernel
package:

make pacman-pkg PACMAN_EXTRAPACKAGES=""
objtree="/home/jose/Code/linux/linux" \
	BUILDDIR="/home/jose/Code/linux/linux/pacman" \
	CARCH="i386" \
	KBUILD_MAKEFLAGS="rR --no-print-directory -- PACMAN_EXTRAPACKAGES=" \
	KBUILD_REVISION="46" \
	makepkg 
...
==> Creating package "linux-upstream"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: linux-upstream 6.11.0_rc2+-46 (Sun 11 Aug 2024 01:13:45 PM MDT)

Make exports command line arguments as env variables to sub-processes and this
is how the PACMAN_EXTRAPACKAGES is passed to makepg without an explicit export
with this change. V3 will include this change.




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux