[pacman-dev] $startdir in PKGBUILDs
Can anyone think of an actual use of $startdir in PKGBUILDs? A change I am planning post 3.4 is to completely break $startdir/pkg == $pkgdir for single packages. I want all packaging to occur in $startdir/pkg/$pkgname as is currently done in split packages as this will make it a lot easier to split of debug symbols into a separate package. We have discouraged the use of $startdir for at least a couple of releases now, so people should be prepared... [1] So I would like to remove mention of $startdir from the PKGBUILD man page. Can anybody see a reason for keeping it? Allan [1] well, even some of the pacman devs still use it in PKGBUILDs... *cough* libarchive *cough* ;)
On Thursday, June 3, 2010, Allan McRae <allan@archlinux.org> wrote:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in VCS builds on occasion as the location of the dowloaded repo so that buildin clean (wiping out src/) doesn't force you to re-clone or whatever.
A change I am planning post 3.4 is to completely break $startdir/pkg == $pkgdir for single packages. I want all packaging to occur in $startdir/pkg/$pkgname as is currently done in split packages as this will make it a lot easier to split of debug symbols into a separate package. We have discouraged the use of $startdir for at least a couple of releases now, so people should be prepared... [1]
So I would like to remove mention of $startdir from the PKGBUILD man page.
Can anybody see a reason for keeping it?
Allan
[1] well, even some of the pacman devs still use it in PKGBUILDs... *cough* libarchive *cough* ;)
Hey now! You could fix it too! :) And by the way Allan, it was definitely me that broke [extra] today, whoops.
On 04/06/10 10:25, Dan McGee wrote:
On Thursday, June 3, 2010, Allan McRae<allan@archlinux.org> wrote:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in VCS builds on occasion as the location of the dowloaded repo so that buildin clean (wiping out src/) doesn't force you to re-clone or whatever.
That is indeed a good usage. We will keep it then! I suppose a big push in Arch to replace $startdir usage will remind people once again not to use $startdir/{src,pkg}. Allan
On Fri 04 Jun 2010 11:42 +1000, Allan McRae wrote:
On 04/06/10 10:25, Dan McGee wrote:
On Thursday, June 3, 2010, Allan McRae<allan@archlinux.org> wrote:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in VCS builds on occasion as the location of the dowloaded repo so that buildin clean (wiping out src/) doesn't force you to re-clone or whatever.
That is indeed a good usage. We will keep it then!
I suppose a big push in Arch to replace $startdir usage will remind people once again not to use $startdir/{src,pkg}.
$startdir is also useful for upstream if they want to maintain a PKGBUILD in their devel repo and build arch packages themselves. This is assuming that $srcdir or $pkgdir doesn't always mean $startdir/src and $startdir/pkg. Otherwise one of those vars could be used. Example: files tree: Makefile.am configure packaging/ archlinux/ PKGBUILD debian/ fedora/ build() { cd $startdir/../.. ./configure make make install }
Am 04.06.2010 02:06, schrieb Allan McRae:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in the kernel and module PKGBUILDs to mangle the install file prior to packaging: sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/xxx.install
On 04/06/10 17:43, Thomas Bächler wrote:
Am 04.06.2010 02:06, schrieb Allan McRae:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in the kernel and module PKGBUILDs to mangle the install file prior to packaging:
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/xxx.install
$srcdir should work there.
Am 04.06.2010 10:08, schrieb Allan McRae:
On 04/06/10 17:43, Thomas Bächler wrote:
Am 04.06.2010 02:06, schrieb Allan McRae:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in the kernel and module PKGBUILDs to mangle the install file prior to packaging:
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/xxx.install
$srcdir should work there.
The .install file is never part of the source, and as such it is never in $srcdir.
On 04/06/10 18:42, Thomas Bächler wrote:
Am 04.06.2010 10:08, schrieb Allan McRae:
On 04/06/10 17:43, Thomas Bächler wrote:
Am 04.06.2010 02:06, schrieb Allan McRae:
Can anyone think of an actual use of $startdir in PKGBUILDs?
It is used in the kernel and module PKGBUILDs to mangle the install file prior to packaging:
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/xxx.install
$srcdir should work there.
The .install file is never part of the source, and as such it is never in $srcdir.
Ah... so they do not. My test PKGBUILD had the .install file in the source array from testing some bug fix. But maybe they should move to $srcdir.
participants (4)
-
Allan McRae
-
Dan McGee
-
Loui Chang
-
Thomas Bächler