Commit 82ea757e authored by Vitaly Lipatov's avatar Vitaly Lipatov

use distr_vendor from git repo if possible

parent ed82d2cb
......@@ -14,7 +14,7 @@
. `dirname $0`/../share/eterbuild/functions/common
load_mod repl rpm git
DISTRVERSION=`distr_vendor -v`
DISTRVERSION=`$DISTRVENDOR -v`
altspec_to_local()
{
......@@ -69,8 +69,10 @@ cat $SPECNAME | grep rpm-build-compat &>/dev/null && BUILDREQ=""
FIXMKTEMP=""
DISTRSYS="$($DISTRVENDOR -d)"
# fix readlink -m, introduced by new libtool and missed in RHEL4 (replace with readlink -f)
if [ "`distr_vendor -d`/$DISTRVERSION" = "ASPLinux/11.2" ] ; then
if [ "$DISTRSYS/$DISTRVERSION" = "ASPLinux/11.2" ] ; then
test -z "$VERBOSE" || echo "Add subst readlink -m"
FIXMKTEMP="%__subst 's|readlink -m|readlink -f|g' libtool ltmain.sh"
fi
......@@ -81,7 +83,7 @@ if [ "$VENDOR" = "generic" ] ; then
FIXMKTEMP="%__subst 's|readlink -mv|realpath|g' configure ltmain.sh"
fi
if [ "`distr_vendor -d`" = "Ubuntu" ] || [ "`distr_vendor -d`" = "Debian" ]; then
if [ "$DISTRSYS" = "Ubuntu" ] || [ "$DISTRSYS" = "Debian" ]; then
test -z "$VERBOSE" || echo "Add remove_optflags -m64"
FIXMKTEMP="%remove_optflags -m64"
fi
......@@ -243,12 +245,12 @@ if [ "$VENDOR" = "alt" ] ; then
export USE_LEGACY_COMPRESSION=1
fi
subst "1i# This spec is backported to `distr_vendor -d` $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- backport to `distr_vendor -d` $DISTRVERSION (by rpmbph script)"
subst "1i# This spec is backported to $DISTRSYS $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- backport to $DISTRSYS $DISTRVERSION (by rpmbph script)"
DISTRARG="-$MDISTR"
else
subst "1i# This spec is autoported from ALT Linux Sisyphus to `distr_vendor -d` $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- autoport to `distr_vendor -d` $DISTRVERSION (by rpmbph script)"
subst "1i# This spec is autoported from ALT Linux Sisyphus to $DISTRSYS $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- autoport to $DISTRSYS $DISTRVERSION (by rpmbph script)"
export USE_VENDOR=$RPMVENDOR
export USE_LEGACY_COMPRESSION=1
DISTRARG=""
......
......@@ -225,8 +225,7 @@ if [ -n "$INSTALLBINARY" ] ; then
# pack by LISTNAMES list
pack_src_rpm --commit $LISTRPMARGS
LISTPKG=$(rpmquery --requires -p $LISTBUILT | clean_pkgreq | sed -e "s|rpm-build-altlinux-compat||g")
DISTRVENDOR=$(distr_vendor -d)
CMD=$(get_install_package_command $DISTRVENDOR interactive)
CMD=$(get_install_package_command `$DISTRVENDOR -d` interactive)
echog "Running $SUDO $CMD $LISTPKG"
exec $SUDO $CMD $LISTPKG
fi
......
......@@ -18,6 +18,8 @@ set_eterbuilddir()
[ -n "$TOPDIR" ] || TOPDIR=../
ETERBUILDDIR=$(realpath `dirname $0`/$TOPDIR/share/eterbuild)
ETERBUILDETC=$(realpath `dirname $0`/$TOPDIR/etc)
DISTRVENDOR=$(realpath `dirname $0`/$TOPDIR/../rpm-build-altlinux-compat/bin/distr_vendor)
[ -x "$DISTRVENDOR" ] || DISTRVENDOR=distr_vendor
if [ -r "$ETERBUILDETC/../AUTHORS" ] ; then
if [ -n "$VERBOSE" ] ; then
echo "Note: run from source tree, datadir=$ETERBUILDDIR, sysconfdir=$ETERBUILDETC"
......@@ -136,11 +138,11 @@ fi
# Internal
detect_target_env()
{
local DISTRNAME=`distr_vendor -e`
local DISTRNAME=$($DISTRVENDOR -e)
MENVARG=""
TARGET=`distr_vendor -p`
VENDOR=`distr_vendor -s`
RPMVENDOR=`distr_vendor -n`
TARGET=$($DISTRVENDOR -p)
VENDOR=$($DISTRVENDOR -s)
RPMVENDOR=$($DISTRVENDOR -n)
if [ "$VENDOR" = "alt" ] && [ -n "$MENV" ] ; then
#[ -n "$APTCONF" ] && fatal "Internal error: APTCONF already defined as $APTCONF for $MENV"
......
......@@ -76,7 +76,7 @@ print_replbased_list()
{
local REPLBASE="$1"
# VENDOR, TARGET is already defined in detect_target_env() func
[ -z "$DISTRVERSION" ] && DISTRVERSION=`distr_vendor -v`
[ -z "$DISTRVERSION" ] && DISTRVERSION=`$($DISTRVENDOR -v)`
# separate checking for x86_64
if [ $DEFAULTARCH = "x86_64" ] ; then
......
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