@Scimmia is correct, this has not been and will likely never be supported in makepkg
itself; see the wiki.
I fundamentally disagree with cloning in prepare()
, because any proper AUR helper (which, even though officially unsupported, realistically many of the users use for the sake of automating ultimately repetitive tasks) will wipe out $srcdir
. For example, if a patch needs to be reapplied, it should be reapplied on the original source, so if we put a clone command in package()
, it will re-download the entire repo (or whatever applicable part of the repo, but point stands).
On the other hand, those helpers can take advantage of whatever is downloaded to $SRCDEST
and ultimately cache that for future builds (which means, for VCS packages, it will simply fetch the new changes in rather than re-downloading the entire repo/branch/whatever).
This type of discussion has been had on the mailing list before, and unless makepkg
adds support for single-branch cloning within the source
array, I don't think there's a good reason to make changes here.
Secondly, keeping it in the source
array makes it explicit where the PKGBUILD
is downloading from directly on aurweb. Yes, users are supposed to read all the PKGBUILD
s in full, but keeping it in the source
array avoids masking what we are doing.
Either way, a maintainer has to decide one way or another, one option downloads too much in the short term but less in the long term, the other does the opposite. I choose to go with the first option. Assuming you are not using AUR helpers, you can clone this package and make the modifications yourself on your personal machine if you have a specific need. If you are using AUR helpers, any decent one will allow you to review and make edits to the PKGBUILD
before building them (aurutils
is a good option for this).
Pinned Comments
fwalch commented on 2016-07-04 19:52 (UTC) (edited on 2016-07-04 19:54 (UTC) by fwalch)