[csw-devel] SF.net SVN: gar:[15911] csw/mgar/pkg/pkg-get/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Oct 13 03:53:42 CEST 2011


Revision: 15911
          http://gar.svn.sourceforge.net/gar/?rev=15911&view=rev
Author:   bdwalton
Date:     2011-10-13 01:53:41 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
pkg-get/trunk: take Sebastian's suggestion and remove dependence on alternatives (no CAS for core package)

Modified Paths:
--------------
    csw/mgar/pkg/pkg-get/trunk/Makefile
    csw/mgar/pkg/pkg-get/trunk/files/pkg-get

Added Paths:
-----------
    csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall

Removed Paths:
-------------
    csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall

Modified: csw/mgar/pkg/pkg-get/trunk/Makefile
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/Makefile	2011-10-12 13:09:45 UTC (rev 15910)
+++ csw/mgar/pkg/pkg-get/trunk/Makefile	2011-10-13 01:53:41 UTC (rev 15911)
@@ -12,53 +12,35 @@
 endef
 
 MASTER_SITES = http://opencsw.org
-DISTFILES = CSWpkgget-deprecated.postinstall
+DISTFILES = CSWpkgget.postinstall
 
 CONFIGURE_SCRIPTS =
 BUILD_SCRIPTS = 
 TEST_SCRIPTS =
 INSTALL_SCRIPTS = custom
 
-PACKAGES = CSWpkgget CSWpkgget-deprecated
+PACKAGES = CSWpkgget
 
 CATALOGNAME_CSWpkgget = pkg_get_stub
 SPKG_DESC_CSWpkgget = A deprecated package delivery tool (User notice version)
-RUNTIME_DEP_PKGS_CSWpkgget = CSWpkgutil CSWpkgget-deprecated
+RUNTIME_DEP_PKGS_CSWpkgget = CSWpkgutil
 ARCHALL_CSWpkgget = 1
 CHECKPKG_OVERRIDES_CSWpkgget += surplus-dependency|CSWpkgutil
 CHECKPKG_OVERRIDES_CSWpkgget += catalogname-does-not-match-pkgname|pkgname=CSWpkgget|catalogname=pkg_get_stub|expected-catalogname=pkgget
-PKGFILES_CSWpkgget = $(bindir)/pkg-get.deprecationnotice
+CHECKPKG_OVERRIDES_CSWpkgget += file-with-bad-content|/usr/local|root/opt/csw/bin/pkg-get.deprecated
 
-SPKG_DESC_CSWpkgget-deprecated = A deprecated package delivery tool (Working legacy version)
-RUNTIME_DEP_PKGS_CSWpkgget-deprecated = CSWpkgutil
-ARCHALL_CSWpkgget-deprecated = 1
-CHECKPKG_OVERRIDES_CSWpkgget-deprecated += surplus-dependency|CSWpkgutil
-# going to extra effort to find wget, add /usr/local/bin to the path
-CHECKPKG_OVERRIDES_CSWpkgget-deprecated += file-with-bad-content|/usr/local|root/opt/csw/bin/pkg-get.deprecated
-PKGFILES_CSWpkgget-deprecated  = $(bindir)/pkg-get.deprecated
-PKGFILES_CSWpkgget-deprecated += $(sharedstatedir).* $(docdir)/pkg_get
-
-ALTERNATIVES_CSWpkgget = deprecationnotice
-ALTERNATIVE_deprecationnotice = $(bindir)/pkg-get pkg-get $(bindir)/pkg-get.deprecationnotice 10
-
-ALTERNATIVES_CSWpkgget-deprecated = deprecated
-ALTERNATIVE_deprecated = $(bindir)/pkg-get pkg-get $(bindir)/pkg-get.deprecated 5
-
-
 include gar/category.mk
 
 install-custom:
 	@(mkdir -p $(DESTDIR)$(bindir); \
 	  mkdir -p $(DESTDIR)$(docdir)/pkg_get_stub; \
-	  mkdir -p $(DESTDIR)$(docdir)/pkgget_deprecated; \
 	  mkdir -p $(DESTDIR)$(sharedstatedir); \
 	  mkdir -p $(DESTDIR)$(sysconfdir); \
 		ginstall -m 0755 $(FILEDIR)/pkg-get $(DESTDIR)$(bindir)/pkg-get.deprecationnotice; \
+		ln -s $(bindir)/pkg-get.deprecationnotice $(DESTDIR)$(bindir)/pkg-get; \
 		rsync -a --exclude=.svn $(FILEDIR)/bin/ $(DESTDIR)$(bindir)/;\
 		rsync -a --exclude=.svn $(FILEDIR)/share/ $(DESTDIR)$(sharedstatedir)/; \
 		rsync -a --exclude=.svn $(FILEDIR)/etc/ $(DESTDIR)$(sysconfdir)/; \
 		ginstall -m 0644 $(FILEDIR)/license $(DESTDIR)$(docdir)/pkg_get_stub; \
-		ginstall -m 0644 $(FILEDIR)/license $(DESTDIR)$(docdir)/pkgget_deprecated; \
-		ginstall -m 0644 $(FILEDIR)/license $(DESTDIR)$(docdir)/pkgget_deprecated; \
-		ln -s $(docdir)/pkgget_deprecated $(DESTDIR)$(docdir)/pkg_get)
+		ln -s $(docdir)/pkg_get_stub $(DESTDIR)$(docdir)/pkg_get)
 	@$(MAKECOOKIE)

Deleted: csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall	2011-10-12 13:09:45 UTC (rev 15910)
+++ csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall	2011-10-13 01:53:41 UTC (rev 15911)
@@ -1,78 +0,0 @@
-#!/bin/sh
-
-
-# This needs to somewhat track the CONFFILE handling in pkg-get itself now
-# to be more relocation friendly. technically.
-CONFFILE=$BASEDIR/etc/pkg-get.conf
-shortprefix=`echo $BASEDIR |sed 's:.*/::'`
-localconffile=/etc/opt/$shortprefix/pkg-get.conf
-
-echo ""
-
-
-##
-## Create a default pkg-get.conf file.
-# Note: "normally", i would depend on  CSWcswclassutils.
-# However, i want this to not be dependant on anything else.
-# Additionally, i need to check for both a global, OR a local, 
-# config file, before deciding to copy over a default one somewhere.
-#
-
-if [ -f $CONFFILE ] ; then
-	echo $CONFFILE already exists. Not altering it.
-elif [ -f $localconffile ] ; then
-	echo Local conf file $localconffile exists.
-	echo Not copying $CONFFILE.csw
-	
-else
-	# Note: "normally", i would depend on  CSWcswclassutils.
-	# However, i want this to not be dependant on anything else.
-	#
-
-	echo Installing $CONFFILE.csw to pkg-get.conf
-	cp $CONFFILE.csw $CONFFILE
-	echo ""
-	echo '**** IMPORTANT ****'
-	echo 'A default configuration file for pkg-get has been created in'
-	echo "    $CONFFILE"
-	echo "You should edit it to change the 'site' configuration, to point to"
-	echo "the most appropriate mirror for you, from the list at"
-	echo "   http://www.opencsw.org/mirrors"
-	echo ""
-fi
-
-case $BASEDIR in 
-	*/opt/csw)
-	:
-	# fall through and do long hairy stuff
-	;;
-	*)
-	exit 0
-	;;
-esac
-
-##################################################
-# Fix perms.
-# Really, the "default" line in prototype should take care of
-# this.. but it doesnt?!!
-#If the directory did not exist previously, it gets set to
-#root:other.
-# SO, fix that, in keeping with csw standards!
-
-# But.. only if we're not in read-only-PREFIX mode.
-# since there is no /bin/stat call, fake it and test by creating a file.
-
-touch $BASEDIR/testfile.$$
-if [ $? -ne 0 ] ; then
-	echo No permissions to create $BASEDIR/testfile.
-	echo Presuming read-only $BASEDIR. Quitting cleanly now
-	exit 0
-fi
-
-rm $BASEDIR/testfile.$$
-
-chown root:bin $BASEDIR
-for d in bin etc share share/man share/man/man1m ; do
-	chown root:bin $BASEDIR/$d
-done
-	

Copied: csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall (from rev 15774, csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall)
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall	                        (rev 0)
+++ csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall	2011-10-13 01:53:41 UTC (rev 15911)
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+
+# This needs to somewhat track the CONFFILE handling in pkg-get itself now
+# to be more relocation friendly. technically.
+CONFFILE=$BASEDIR/etc/pkg-get.conf
+shortprefix=`echo $BASEDIR |sed 's:.*/::'`
+localconffile=/etc/opt/$shortprefix/pkg-get.conf
+
+echo ""
+
+
+##
+## Create a default pkg-get.conf file.
+# Note: "normally", i would depend on  CSWcswclassutils.
+# However, i want this to not be dependant on anything else.
+# Additionally, i need to check for both a global, OR a local, 
+# config file, before deciding to copy over a default one somewhere.
+#
+
+if [ -f $CONFFILE ] ; then
+	echo $CONFFILE already exists. Not altering it.
+elif [ -f $localconffile ] ; then
+	echo Local conf file $localconffile exists.
+	echo Not copying $CONFFILE.csw
+	
+else
+	# Note: "normally", i would depend on  CSWcswclassutils.
+	# However, i want this to not be dependant on anything else.
+	#
+
+	echo Installing $CONFFILE.csw to pkg-get.conf
+	cp $CONFFILE.csw $CONFFILE
+	echo ""
+	echo '**** IMPORTANT ****'
+	echo 'A default configuration file for pkg-get has been created in'
+	echo "    $CONFFILE"
+	echo "You should edit it to change the 'site' configuration, to point to"
+	echo "the most appropriate mirror for you, from the list at"
+	echo "   http://www.opencsw.org/mirrors"
+	echo ""
+fi
+
+case $BASEDIR in 
+	*/opt/csw)
+	:
+	# fall through and do long hairy stuff
+	;;
+	*)
+	exit 0
+	;;
+esac
+
+##################################################
+# Fix perms.
+# Really, the "default" line in prototype should take care of
+# this.. but it doesnt?!!
+#If the directory did not exist previously, it gets set to
+#root:other.
+# SO, fix that, in keeping with csw standards!
+
+# But.. only if we're not in read-only-PREFIX mode.
+# since there is no /bin/stat call, fake it and test by creating a file.
+
+touch $BASEDIR/testfile.$$
+if [ $? -ne 0 ] ; then
+	echo No permissions to create $BASEDIR/testfile.
+	echo Presuming read-only $BASEDIR. Quitting cleanly now
+	exit 0
+fi
+
+rm $BASEDIR/testfile.$$
+
+chown root:bin $BASEDIR
+for d in bin etc share share/man share/man/man1m ; do
+	chown root:bin $BASEDIR/$d
+done
+	

Modified: csw/mgar/pkg/pkg-get/trunk/files/pkg-get
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/files/pkg-get	2011-10-12 13:09:45 UTC (rev 15910)
+++ csw/mgar/pkg/pkg-get/trunk/files/pkg-get	2011-10-13 01:53:41 UTC (rev 15911)
@@ -11,7 +11,8 @@
 echo "have been installed at the same time as this CSWpkgget update."
 echo
 echo "If you _really_ want to run pkg-get still, you can enable it by:"
-echo "/opt/csw/sbin/alternatives --set pkg-get /opt/csw/bin/pkg-get.deprecated"
+echo "rm /opt/csw/bin/pkg-get"
+echo " ln -s /opt/csw/bin/pkg-get.deprecated /opt/csw/bin/pkg-get"
 echo
 echo "We apologize for any inconveniences this causes you."
 echo

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list