After packaging fails, a softlink will be established, but this is wrong.
If the packaging fails, the softlink should not be established.
Signed-off-by: Sun Yukui <sun.yukui(a)foxmail.com>
---
tests/build-pkg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/build-pkg b/tests/build-pkg
index 6426f2da..4aaa4fef 100755
--- a/tests/build-pkg
+++ b/tests/build-pkg
@@ -101,10 +101,11 @@ build_source_pkg()
cgz_name="$PKG_MNT/${pack_to}/${pkgname}/${upstream_commit}.cgz"
PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg -A --check --skippgpcheck --config $LKP_SRC/etc/makepkg.conf 2>&1
+
+ [ "$?" == 0 ] && create_softlink
}
check_vars
mount_dest
request_pkg
build_source_pkg
-create_softlink
--
2.23.0