[pacman-dev] [PATCH] Allow xdelta options to be set per package.

Dan McGee dpmcgee at gmail.com
Thu Nov 8 16:50:12 EST 2007


On Nov 8, 2007 3:36 PM, Nathan Jones <nathanj at insightbb.com> wrote:
> On Thu, Nov 08, 2007 at 01:46:34PM -0600, Aaron Griffin wrote:
> > On Nov 8, 2007 1:37 PM, Nathan Jones <nathanj at insightbb.com> wrote:
> > > Setting xdelta (or !xdelta) in the options array in a PKGBUILD will
> > > override the makepkg.conf setting.
> >
> > So this means we can generate deltas on a package by package basis,
> > like for OpenOffice or the like, correct?
> >
> > The reason I ask is... well, if it's per-package now, do we really
> > need a buildenv option for this as well?
>
> If a person maintains 100 packages and decides to start creating deltas,
> I would think he would prefer to add xdelta to makepkg.conf rather than
> to 100 different PKGBUILDs.
>
> In regards to the patch, I looked back through makepkg and noticed that
> check_option checks the PKGBUILD first then makepkg.conf. I was thinking
> that check_option only checked the PKGBUILD. I might resubmit the patch
> after I test it.

When I suggested this, I was thinking of the following type code that
is already in makepkg (line 659):
  # use ccache if it is requested (check buildenv and PKGBUILD opts)
  if [ "$(check_buildenv ccache)" = "y" -a "$(check_option ccache)" !=
"n" ]; then
    [ -d /usr/lib/ccache/bin ] && export PATH="/usr/lib/ccache/bin:$PATH"
  fi

Note that ccache is a BUILDENV var in makepkg.conf, but can still be
denied in a PKGBUILD by using !ccache (for those packages that don't
build correctly with it). I feel like a if clause just like the above
would work for xdelta as well (and cut your patch from -1/+3 to
-1/+1).

-Dan




More information about the pacman-dev mailing list