Commit 212009b5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgp: fix -b option (install buildreqs packages) to work in distro independent manner

parent 8238e8e0
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod rpm repl git load_mod rpm repl git rpm
# path to ALT Linux's repositories # path to ALT Linux's repositories
REPOSITORY="files/SRPMS obsolete orphaned" REPOSITORY="files/SRPMS obsolete orphaned"
...@@ -221,20 +221,21 @@ test -z "$LISTARGS" && fatal "Please run with spec/package name" ...@@ -221,20 +221,21 @@ test -z "$LISTARGS" && fatal "Please run with spec/package name"
# #
# - [] # - []
# install binary packages # install required for build binary packages
if [ -n "$INSTALLBINARY" ] ; then if [ -n "$INSTALLBINARY" ] ; then
parse_cmd_pre "$@" parse_cmd_pre "$@"
pack_src_rpm $LISTRPMARGS pack_src_rpm $LISTRPMARGS
echog "Running apt-get build-dep for install needed packages for $LISTBUILT" LISTPKG=$(rpmquery --requires -p $LISTBUILT | clean_pkgreq | sed -e "s|rpm-build-altlinux-compat||g")
# FIXME: ALT Specific DISTRVENDOR=$(distr_vendor -d)
$SUDO apt-get build-dep $LISTBUILT CMD=$(get_install_package_command $DISTRVENDOR interactive)
exit 0 echog "Running $SUDO $CMD $LISTPKG..."
$SUDO $CMD $LISTPKG
fi fi
# clone remote git # clone remote git
if [ -n "$CLONEGIT" ] ; then if [ -n "$CLONEGIT" ] ; then
PKGNAME=$1 PKGNAME=$1
INITLETTER=$(echo $PKGNAME | sed "s/^\(.\).*/\1/g") INITLETTER=$(echo $PKGNAME | cut -c1)
# http://git.altlinux.org/srpms/N/NAME.git # http://git.altlinux.org/srpms/N/NAME.git
echo "Remote clone from /srpms/$INITLETTER/$PKGNAME.git ..." echo "Remote clone from /srpms/$INITLETTER/$PKGNAME.git ..."
ssh $GIRARHOST clone /srpms/$INITLETTER/$PKGNAME.git packages/$PKGNAME.git || warning "Can't remote clone." ssh $GIRARHOST clone /srpms/$INITLETTER/$PKGNAME.git packages/$PKGNAME.git || warning "Can't remote clone."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment