diff options
author | Roman Neuhauser <rneuhauser@suse.cz> | 2014-05-08 19:05:58 +0200 |
---|---|---|
committer | Roman Neuhauser <rneuhauser@suse.cz> | 2014-05-08 19:47:22 +0200 |
commit | e5efe0e1d38097992013f599e9ed3a78d7a2bf8c (patch) | |
tree | afdb1fab3f9cab3699d71feac34145b9bbf4acfe | |
parent | e83a60a52aa375ee8e234da37a4c01cffd968f48 (diff) |
ArchLinux packages need working symlinks in $srcdir
fixes https://github.com/openSUSE/open-build-service/issues/658
problem:
`makepkg -o` does (with `PWD=$TOPDIR/SOURCES`):
mkdir src
for s in ${source[@]}; do
ln -s $SRCDEST/$s src/
done
where `$SRCDEST` is `$PWD` unless overridden.
then we move `$TOPDIR/SOURCES/*` (`s/SOURCES/BUILD/`), and the
symlinks still contain the old paths.
solution:
run `makepkg -o` in `$TOPDIR/BUILD`.
-rw-r--r-- | build-recipe-arch | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/build-recipe-arch b/build-recipe-arch index 73a7618..d89c795 100644 --- a/build-recipe-arch +++ b/build-recipe-arch @@ -18,12 +18,11 @@ recipe_setup_arch() { recipe_prepare_arch() { echo "Preparing sources..." - chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && makepkg -s -o 2>&1 >/dev/null" - $BUILD_USER - mv $BUILD_ROOT/$TOPDIR/SOURCES/* -t $BUILD_ROOT/$TOPDIR/BUILD + _arch_recipe_makepkg -so "2>&1" ">/dev/null" } recipe_build_arch() { - chroot $BUILD_ROOT su -c "cd $TOPDIR/BUILD && makepkg -e -f" - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true + _arch_recipe_makepkg -ef < /dev/null && BUILD_SUCCEEDED=true for PKG in $BUILD_ROOT/$TOPDIR/BUILD/*.pkg.tar.?z ; do test -e "$PKG" && mv "$PKG" "$BUILD_ROOT/$TOPDIR/ARCHPKGS" done @@ -32,3 +31,7 @@ recipe_build_arch() { recipe_resultdirs_arch() { echo ARCHPKGS } + +_arch_recipe_makepkg() { + chroot $BUILD_ROOT su -lc "cd $TOPDIR/BUILD && SRCDEST=$TOPDIR/SOURCES makepkg -p ../SOURCES/PKGBUILD $*" $BUILD_USER +} |