From e817d470ab17037b80bdef919534c3ea74545f13 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 13 Dec 2008 07:04:53 +0100 Subject: [PATCH] Added a new conf option: XBPS_PACKAGESDIR. This is to specify where to store the binary packages. --HG-- extra : convert_revision : 16d810d058b78662a33d8492caf7981e0700808e --- utils/sh/binpkg.sh | 5 ++--- utils/sh/chroot.sh | 8 ++++++-- utils/xbps-pkgdb.c | 2 +- xbps.conf | 9 ++++++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/utils/sh/binpkg.sh b/utils/sh/binpkg.sh index 2e2dc4eb11..2db3776995 100644 --- a/utils/sh/binpkg.sh +++ b/utils/sh/binpkg.sh @@ -100,13 +100,12 @@ _EOF xbps_make_binpkg() { local destdir=$XBPS_DESTDIR/$pkgname-$version - local pkgsdir=$XBPS_DISTRIBUTIONDIR/packages cd $destdir || exit 1 run_rootcmd tar cfjp $destdir-xbps.tbz2 . - [ ! -d $pkgsdir ] && mkdir -p $pkgsdir - mv -f $destdir-xbps.tbz2 $pkgsdir + [ ! -d $XBPS_PACKAGESDIR ] && mkdir -p $XBPS_PACKAGESDIR + mv -f $destdir-xbps.tbz2 $XBPS_PACKAGESDIR echo "=> Built package: $pkgname-$version-xbps.tbz2." } diff --git a/utils/sh/chroot.sh b/utils/sh/chroot.sh index e3716b79b3..8cc7c6787a 100644 --- a/utils/sh/chroot.sh +++ b/utils/sh/chroot.sh @@ -61,7 +61,8 @@ else msg_normal "Entering into the chroot on $XBPS_MASTERDIR." fi -EXTDIRS="xbps xbps_builddir xbps_destdir xbps_srcdistdir xbps_crossdir" +EXTDIRS="xbps xbps_builddir xbps_destdir xbps_packagesdir \ + xbps_srcdistdir xbps_crossdir" REQDIRS="bin sbin tmp var sys proc dev ${EXTDIRS}" for f in ${REQDIRS}; do [ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f @@ -71,6 +72,7 @@ unset f REQDIRS echo "XBPS_DISTRIBUTIONDIR=/xbps" > $XBPS_MASTERDIR/etc/xbps.conf echo "XBPS_MASTERDIR=/" >> $XBPS_MASTERDIR/etc/xbps.conf echo "XBPS_DESTDIR=/xbps_destdir" >> $XBPS_MASTERDIR/etc/xbps.conf +echo "XBPS_PACKAGESDIR=/xbps_packagesdir" >> $XBPS_MASTERDIR/etc/xbps.conf echo "XBPS_BUILDDIR=/xbps_builddir" >> $XBPS_MASTERDIR/etc/xbps.conf echo "XBPS_SRCDISTDIR=/xbps_srcdistdir" >> $XBPS_MASTERDIR/etc/xbps.conf echo "XBPS_CFLAGS=\"$XBPS_CFLAGS\"" >> $XBPS_MASTERDIR/etc/xbps.conf @@ -121,7 +123,8 @@ mount_chroot_fs() { local cnt= - REQFS="sys proc dev xbps xbps_builddir xbps_destdir xbps_srcdistdir" + REQFS="sys proc dev xbps xbps_builddir xbps_destdir \ + xbps_packagesdir xbps_srcdistdir" if [ -d "$XBPS_CROSS_DIR" ]; then local cross=yes REQFS="$REQFS xbps_crossdir" @@ -136,6 +139,7 @@ mount_chroot_fs() xbps_builddir) blah=$XBPS_BUILDDIR;; xbps_destdir) blah=$XBPS_DESTDIR;; xbps_srcdistdir) blah=$XBPS_SRCDISTDIR;; + xbps_packagesdir) blah=$XBPS_PACKAGESDIR;; xbps_crossdir) [ -n $cross ] && blah=$XBPS_CROSS_DIR ;; diff --git a/utils/xbps-pkgdb.c b/utils/xbps-pkgdb.c index a301db22fe..193d2e2252 100644 --- a/utils/xbps-pkgdb.c +++ b/utils/xbps-pkgdb.c @@ -273,7 +273,7 @@ list_pkgs_in_dict(prop_dictionary_t dict) prop_dictionary_get_cstring_nocopy(obj, "version", &version); prop_dictionary_get_cstring_nocopy(obj, "short_desc", &short_desc); if (pkgname && version && short_desc) - printf("%s-%s\t%s\n", pkgname, version, short_desc); + printf("%s (%s)\t%s\n", pkgname, version, short_desc); } prop_object_iterator_release(iter); } diff --git a/xbps.conf b/xbps.conf index 332e8d1705..85843225d4 100644 --- a/xbps.conf +++ b/xbps.conf @@ -15,10 +15,17 @@ XBPS_DISTRIBUTIONDIR=$HOME/xbps XBPS_MASTERDIR=$XBPS_DISTRIBUTIONDIR/depot # -# Destination directory: this is where all packages will be installed. +# Destination directory: this is where all package files will be +# installed. # XBPS_DESTDIR=$XBPS_DISTRIBUTIONDIR/destdir +# +# Binary packages directory: this is where the binary packages will +# be created to. +# +XBPS_PACKAGESDIR=$XBPS_DISTRIBUTIONDIR/packages + # # Directory where source files will be extracted to. #