xbps-src: remove unnecessary variable assignments.

This commit is contained in:
Juan RP 2011-07-18 18:50:23 +02:00
parent e4ba462dc2
commit cfb09f2d9f
3 changed files with 22 additions and 23 deletions

View file

@ -29,27 +29,26 @@ set_defvars()
instsharedir=@@XBPS_INSTALL_SHAREDIR@@
: ${XBPS_HELPERSDIR:=$instsharedir/helpers}
: ${XBPS_SHUTILSDIR:=$instsharedir/shutils}
: ${XBPS_COMMONVARSDIR:=$instsharedir/common}
: ${XBPS_DBDIR:=$XBPS_MASTERDIR/var/db/xbps}
: ${XBPS_META_PATH:=$XBPS_DBDIR/}
: ${XBPS_PKGMETADIR:=$XBPS_DBDIR/metadata}
: ${XBPS_SRCPKGDIR:=$XBPS_DISTRIBUTIONDIR/srcpkgs}
XBPS_HELPERSDIR=$instsharedir/helpers
XBPS_SHUTILSDIR=$instsharedir/shutils
XBPS_COMMONVARSDIR=$instsharedir/common
XBPS_META_PATH=$XBPS_MASTERDIR/var/db/xbps
XBPS_PKGMETADIR=$XBPS_META_PATH/metadata
XBPS_SRCPKGDIR=$XBPS_DISTRIBUTIONDIR/srcpkgs
if [ -n "$IN_CHROOT" ]; then
: ${XBPS_DESTDIR:=/destdir}
XBPS_DESTDIR=/destdir
else
: ${XBPS_DESTDIR:=$XBPS_MASTERDIR/destdir}
XBPS_DESTDIR=$XBPS_MASTERDIR/destdir
fi
if [ -n "$XBPS_HOSTDIR" ]; then
: ${XBPS_PACKAGESDIR:=$XBPS_HOSTDIR/binpkgs}
: ${XBPS_SRCDISTDIR:=$XBPS_HOSTDIR/sources}
XBPS_PACKAGESDIR=$XBPS_HOSTDIR/binpkgs
XBPS_SRCDISTDIR=$XBPS_HOSTDIR/sources
else
: ${XBPS_SRCDISTDIR:=$XBPS_MASTERDIR/host/sources}
: ${XBPS_PACKAGESDIR:=$XBPS_MASTERDIR/host/binpkgs}
XBPS_SRCDISTDIR=$XBPS_MASTERDIR/host/sources
XBPS_PACKAGESDIR=$XBPS_MASTERDIR/host/binpkgs
fi
: ${XBPS_BUILDDIR:=$XBPS_MASTERDIR/builddir}
: ${XBPS_TRIGGERSDIR:=$XBPS_SRCPKGDIR/xbps-triggers/files}
XBPS_BUILDDIR=$XBPS_MASTERDIR/builddir
XBPS_TRIGGERSDIR=$XBPS_SRCPKGDIR/xbps-triggers/files
DDIRS="TRIGGERSDIR HELPERSDIR SRCPKGDIR COMMONVARSDIR SHUTILSDIR"
DDIRS="$DDIRS DISTRIBUTIONDIR"

View file

@ -77,7 +77,7 @@ xbps_write_metadata_pkg()
#
xbps_write_metadata_pkg_real()
{
local metadir=${DESTDIR}/var/db/xbps/metadata/$pkgname
local metadir=${XBPS_PKGMETADIR}/$pkgname
local f i j found arch dirat lnkat newlnk lver TMPFLIST TMPFPLIST
local fpattern="s|${DESTDIR}||g;s|^\./$||g;/^$/d"

View file

@ -24,14 +24,14 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
: ${XBPS_CONFIG_FILE:=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf}
XBPS_CONFIG_FILE=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
: ${progname:=$(basename $0)}
: ${fakeroot_cmd:=/usr/bin/fakeroot}
: ${fakeroot_cmd_args:=--}
: ${sudo_cmd:=sudo}
: ${chroot_cmd:=chroot}
: ${xbps_machine:=$(uname -m)}
progname=$(basename $0)
fakeroot_cmd=/usr/bin/fakeroot
fakeroot_cmd_args="--"
sudo_cmd=sudo
chroot_cmd=chroot
xbps_machine=$(uname -m)
# Required utilities in host system.
REQHOST_UTILS="awk bash bison sed gcc msgfmt patch makeinfo \