[why]
The create_softlink function needs to be called in build_source_pkg
function.
Signed-off-by: Sun Yukui <sun.yukui(a)foxmail.com>
---
tests/build-pkg | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/tests/build-pkg b/tests/build-pkg
index 1eed784f..6426f2da 100755
--- a/tests/build-pkg
+++ b/tests/build-pkg
@@ -65,6 +65,21 @@ request_pkg()
[ -s PKGBUILD ] || die "PKGBUILD is empty"
}
+create_softlink()
+{
+ [ -e "$cgz_name" ] || return 0
+
+ local soft_path="$PKG_MNT/${pack_to}/${pkgname}"
+ local bm_name=$(basename $(realpath ${cgz_name}))
+
+ if [ -n "$upstream_tag" ]; then
+ echo "create soft link: ${upstream_tag}.cgz -> ${bm_name}"
+ ln -sf "${bm_name}" "${soft_path}/${upstream_tag}.cgz"
+ fi
+
+ echo "create soft link: latest.cgz -> ${bm_name}"
+ ln -sf "${bm_name}" "${soft_path}/latest.cgz"
+}
build_source_pkg()
{
@@ -88,22 +103,6 @@ build_source_pkg()
$LKP_SRC/sbin/makepkg -A --check --skippgpcheck --config $LKP_SRC/etc/makepkg.conf 2>&1
}
-create_softlink()
-{
- [ -e "$cgz_name" ] || return 0
-
- local soft_path="$PKG_MNT/${pack_to}/${pkgname}"
- local bm_name=$(basename $(realpath ${cgz_name}))
-
- if [ -n "$upstream_tag" ]; then
- echo "create soft link: ${upstream_tag}.cgz -> ${bm_name}"
- ln -sf "${bm_name}" "${soft_path}/${upstream_tag}.cgz"
- fi
-
- echo "create soft link: latest.cgz -> ${bm_name}"
- ln -sf "${bm_name}" "${soft_path}/latest.cgz"
-}
-
check_vars
mount_dest
request_pkg
--
2.23.0