use makepkg -s to auto install depends in archlinux
ref: https://git.archlinux.org/pacman.git/plain/scripts/makepkg.sh.in
Signed-off-by: Wang Yong wangyong0117@qq.com --- tests/build-pkg | 11 +++++++++-- tests/cci-makepkg | 14 +++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/tests/build-pkg b/tests/build-pkg index 31762384d..db4007b20 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -92,7 +92,9 @@ create_cgz_name()
cgz_path="$PKG_MNT/${pack_to}/${pkgname}" cgz_name="${cgz_path}/${upstream_commit}.cgz" + pkg_args="-A --check --skippgpcheck" + [ "${os}" == "archlinux" ] && pkg_args="${pkg_args} -s --needed --noconfirm"
[ -n "$git_tag" ] && { cgz_name="${cgz_path}/${git_tag}-${pkgrel}.cgz" @@ -153,8 +155,13 @@ build_source_pkg() create_cgz_name get_config
- PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \ - $LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf + if [ "${os}" == "archlinux" ]; then + BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \ + $LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf + else + PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \ + $LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf + fi
local build_state="$?"
diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 7d1e5cb15..e4bab41eb 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -133,10 +133,18 @@ update_softlink()
build_source_pkg() { - local makepkg="$LKP_SRC/sbin/makepkg -A --skippgpcheck --config $LKP_SRC/etc/makepkg.conf" - echo "$makepkg" + if [ "${DISTRO}" == "archlinux" ]; then + local makepkg="$LKP_SRC/sbin/makepkg -A -s --needed --noconfirm --skippgpcheck --config $LKP_SRC/etc/makepkg.conf" + echo "$makepkg"
- PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg + BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg + + else + local makepkg="$LKP_SRC/sbin/makepkg -A --skippgpcheck --config $LKP_SRC/etc/makepkg.conf" + echo "$makepkg" + + PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg + fi
[ "$?" == 0 ] || exit 1 update_softlink
On Wed, Jan 13, 2021 at 02:49:40PM +0800, Wang Yong wrote:
use makepkg -s to auto install depends in archlinux
ref: https://git.archlinux.org/pacman.git/plain/scripts/makepkg.sh.in
Signed-off-by: Wang Yong wangyong0117@qq.com
tests/build-pkg | 11 +++++++++-- tests/cci-makepkg | 14 +++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/tests/build-pkg b/tests/build-pkg index 31762384d..db4007b20 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -92,7 +92,9 @@ create_cgz_name()
cgz_path="$PKG_MNT/${pack_to}/${pkgname}" cgz_name="${cgz_path}/${upstream_commit}.cgz"
pkg_args="-A --check --skippgpcheck"
[ "${os}" == "archlinux" ] && pkg_args="${pkg_args} -s --needed --noconfirm"
[ -n "$git_tag" ] && { cgz_name="${cgz_path}/${git_tag}-${pkgrel}.cgz"
@@ -153,8 +155,13 @@ build_source_pkg() create_cgz_name get_config
- PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
- if [ "${os}" == "archlinux" ]; then
BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
- else
PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
- fi
perhaps you should be like this:
local pacman="PACMAN=true" [ "${os}" == "archlinux" ] && pacman=""
"$pacman" BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \ $LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
local build_state="$?"
diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 7d1e5cb15..e4bab41eb 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -133,10 +133,18 @@ update_softlink()
build_source_pkg() {
- local makepkg="$LKP_SRC/sbin/makepkg -A --skippgpcheck --config $LKP_SRC/etc/makepkg.conf"
- echo "$makepkg"
- if [ "${DISTRO}" == "archlinux" ]; then
local makepkg="$LKP_SRC/sbin/makepkg -A -s --needed --noconfirm --skippgpcheck --config $LKP_SRC/etc/makepkg.conf"
echo "$makepkg"
- PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
- else
local makepkg="$LKP_SRC/sbin/makepkg -A --skippgpcheck --config $LKP_SRC/etc/makepkg.conf"
echo "$makepkg"
PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
- fi
ditto
Thanks, Liushaofei
[ "$?" == 0 ] || exit 1 update_softlink -- 2.23.0
On Wed, Jan 13, 2021 at 03:07:39PM +0800, Liu Shaofei wrote:
On Wed, Jan 13, 2021 at 02:49:40PM +0800, Wang Yong wrote:
use makepkg -s to auto install depends in archlinux
ref: https://git.archlinux.org/pacman.git/plain/scripts/makepkg.sh.in
Signed-off-by: Wang Yong wangyong0117@qq.com
tests/build-pkg | 11 +++++++++-- tests/cci-makepkg | 14 +++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/tests/build-pkg b/tests/build-pkg index 31762384d..db4007b20 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -92,7 +92,9 @@ create_cgz_name()
cgz_path="$PKG_MNT/${pack_to}/${pkgname}" cgz_name="${cgz_path}/${upstream_commit}.cgz"
pkg_args="-A --check --skippgpcheck"
[ "${os}" == "archlinux" ] && pkg_args="${pkg_args} -s --needed --noconfirm"
[ -n "$git_tag" ] && { cgz_name="${cgz_path}/${git_tag}-${pkgrel}.cgz"
@@ -153,8 +155,13 @@ build_source_pkg() create_cgz_name get_config
- PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
- if [ "${os}" == "archlinux" ]; then
BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
- else
PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
- fi
perhaps you should be like this: local pacman="PACMAN=true" [ "${os}" == "archlinux" ] && pacman="" "$pacman" BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \ $LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
good!
local build_state="$?"
diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 7d1e5cb15..e4bab41eb 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -133,10 +133,18 @@ update_softlink()
build_source_pkg() {
- local makepkg="$LKP_SRC/sbin/makepkg -A --skippgpcheck --config $LKP_SRC/etc/makepkg.conf"
- echo "$makepkg"
- if [ "${DISTRO}" == "archlinux" ]; then
local makepkg="$LKP_SRC/sbin/makepkg -A -s --needed --noconfirm --skippgpcheck --config $LKP_SRC/etc/makepkg.conf"
echo "$makepkg"
- PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
- else
local makepkg="$LKP_SRC/sbin/makepkg -A --skippgpcheck --config $LKP_SRC/etc/makepkg.conf"
echo "$makepkg"
PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
- fi
ditto
ok
Thanks, Yong
Thanks, Liushaofei
[ "$?" == 0 ] || exit 1 update_softlink -- 2.23.0