Skip site navigation (1)Skip section navigation (2)
Date:      23 May 2003 22:13:55 +0000
From:      Franz Klammer <klammer@webonaut.com>
To:        Joe Marcus Clarke <marcus@FreeBSD.org>
Cc:        FreeBSD GNOME Users <gnome@FreeBSD.org>
Subject:   Re: HEADS UP TESTERS: New marcusmerge script
Message-ID:  <1053728035.1868.10.camel@sisko.webonaut.com>
In-Reply-To: <1053727046.1868.7.camel@sisko.webonaut.com>
References:  <1053712093.313.39.camel@gyros> <1053727046.1868.7.camel@sisko.webonaut.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-n27xyDztBNIaVKz9xOHY
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Am Fr, 2003-05-23 um 21.57 schrieb Franz Klammer:
> Am Fr, 2003-05-23 um 17.48 schrieb Joe Marcus Clarke:
> > Thanks to Lars' suggestion, I have updated marcusmerge to delete
> > obsolete port directories during the merge.  This should hopefully help
> > the upgrade procedure.  Be sure to download the latest version of the
> > script.
> 
> Good idea! since marcusmerge exists i always used the initial
> version. it's a good time to switch over to this version now :-)
> 
> attached a patch that enhances marcusmerge for my needs:
> 
> -p	do also a cvsup of the main ports tree
> -l	run pkg_version -l \< after marcusmerge to list the 
> 	outdated ports.
> 
> maybe it's useful an will be integrated into the official script.
> 

uups! made a mistake :-/

cvsup should be done _after_ removing obsolete ports.


> franz.
> 
> 
> > 
> > Joe
-- 
WEBONAUT.com
http://webonaut.com
mailto:klammer@webonaut.com


--=-n27xyDztBNIaVKz9xOHY
Content-Disposition: attachment; filename=marcusmerge.diff
Content-Type: text/plain; name=marcusmerge.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

--- marcusmerge.orig	Fri May 23 23:13:59 2003
+++ marcusmerge	Sat May 24 00:12:24 2003
@@ -5,17 +5,25 @@
 SRCDIR=			# The path to the MarcusCom ports.
 DESTDIR="/usr/ports"	# The path to the official ports collection.
 VERBOSE="no"		# If you want verbose output.
+SUPFILE=		# The path your ports-supfile.
 
 # You do not have to change anything beyond this line.
 
+PKGVERSION_CMD="/usr/sbin/pkg_version"
+PKGVERSION_ARGS="-l \<"
+
+CVSUP_CMD="/usr/local/bin/cvsup -g"
+
 CVSROOT=":pserver:anonymous@creme-brulee.marcuscom.com:/space/cvs/marcuscom-cvs"
 RMPORTS="RMPORTS"
 
+update_main="no"
+pkgversion="no"
 updating="no"
-args=`getopt uvs:d:c: $*`
+args=`getopt pluvs:d:c: $*`
 
 if [ $? != 0 ]; then
-    echo "usage: marcusmerge [-s <directory>] [-d <directory>] [-c <cvsroot>] [-u] [-v]"
+    echo "usage: marcusmerge [-s <directory>] [-d <directory>] [-c <cvsroot>] [-u] [-v] [-l] [-p]"
     exit 1
 fi
 
@@ -38,6 +46,12 @@
 	-u)
 		updating="yes";
 		shift;;
+	-l)
+		pkgversion="yes";
+		shift;;
+	-p)
+		update_main="yes";
+		shift;;
 	--)
 		shift; break;;
     esac
@@ -53,6 +67,17 @@
     exit 1
 fi
 
+if [ ${update_main} = "yes" ]; then
+    if [ -z ${SUPFILE} ]; then
+        printf "Update of main ports tree requestet but you forgot\nto set SUPFILE in this script; aborting...\n\n"
+        exit 1
+    fi
+    if [ ! -f ${SUPFILE} ]; then
+        printf "Update of main ports tree requestet but i could not\nfind SUPFILE: ${SUPFILE}; aborting...\n\n"
+        exit 1
+    fi
+fi
+
 if [ ! -d ${SRCDIR} ]; then
     printf "First we have to checkout the ports module from\nhttp://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi\nPlease type 'anoncvs' as your password.\n\n"
     cvs -d${CVSROOT} login
@@ -70,18 +95,26 @@
     echo "===> Updating done."
 fi
 
-echo "===> Merging files to the ports directory"
-echo "${SRCDIR} --> ${DESTDIR}"
-
 if [ -f "${SRCDIR}/${RMPORTS}" ]; then
+    echo "===> Removing obsolete ports from main tree"
     for i in `cat ${SRCDIR}/${RMPORTS}`; do
 	if [ "${VERBOSE}" = "yes" ]; then
-	    echo "Removing obsolete port ${i}"
+	    echo " Removing obsolete port ${i}"
 	fi
 	rm -rf ${DESTDIR}/${i}
     done
+    echo "===> done."
 fi
 
+if [ ${update_main} = "yes" ]; then
+    echo "===> Updating the main ports tree"
+    ${CVSUP_CMD} ${SUPFILE}
+    echo "===> Updating done."
+fi
+
+echo "===> Merging files to the ports directory"
+echo "${SRCDIR} --> ${DESTDIR}"
+
 if [ -d ${SRCDIR}/Mk ]; then
     if [ "${VERBOSE}" = "yes" ]; then
 	echo "Merging Mk files"
@@ -129,4 +162,13 @@
 
 echo "===> Merging done."
 echo
+
+if [ "${pkgversion}" = "yes" ]; then
+    echo "===> Listing outdated ports..."
+    ${PKGVERSION_CMD} ${PKGVERSION_ARGS}
+    echo "===> Listing done."
+fi
+
+echo
+
 printf "Now you should run portupgrade -r pkgconfig to update all of your GNOME 2\nports.\n"

--=-n27xyDztBNIaVKz9xOHY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1053728035.1868.10.camel>