Subject: minor hack on ${ECHO_MSG} calls to make the commands cut/paste
To: None <tech-pkg@netbsd.org>
From: George Michaelson <ggm@apnic.net>
List: tech-pkg
Date: 10/24/2005 12:12:48
I have done this minor hack on mk/bsd.pkg.mk to make the reinstall
commands cut-n-paste happy.
This cuts down on meta-pkg/gnome insanity re-installing on top of gnome
(60+ separate things all complaining that pkg_delete is needed)
Now all I have to do is cut/paste the line from the output:
===> libsoup-devel-2.2.3 is already installed - perhaps an older
version? *** If so, you may use any of:
(pkg_delete -f libsoup-devel-2.2.3 && /usr/bin/make)
*** (optionally AKE reinstall) to upgrade properly
*** - "/usr/bin/make update" to rebuild the package and all of its
dependencies *** - "/usr/bin/make replace" to replace only the package
without re-linking *** dependencies, risking various problems.
*** Error code 1
(ie the line (pkg_delete -f libsoup-devel-2.2.3 && /usr/bin/make) above)
-George--- mk/bsd.pkg.mk 2005-10-24 11:58:52.000000000 +1000
+++ mk/bsd.pkg.mk.orig 2005-10-24 11:40:43.000000000 +1000
@@ -244,8 +244,7 @@
. if exists(${LOCALBASE}/lib/X11/config/buildlinkX11.def) || \
exists(${X11BASE}/lib/X11/config/buildlinkX11.def)
PKG_FAIL_REASON+= "${PKGNAME} uses imake, but the buildlink-x11
package was found." \
- " Please deinstall it with: " \
- " pkg_delete -f buildlink-x11 "
+ " Please deinstall it (pkg_delete buildlink-x11)."
. endif
.endif # USE_IMAKE
@@ -2070,9 +2069,8 @@
found="`${PKG_BEST_EXISTS} \"${PKGWILDCARD}\" ||
${TRUE}`"; \ if [ "$$found" != "" ];
then \ ${ECHO_MSG}
"${_PKGSRC_IN}> $$found is already installed - perhaps an older
version?"; \
- ${ECHO_MSG} "*** If so, you may use any of:"; \
- ${ECHO_MSG} "(pkg_delete -f $$found && ${MAKE})"; \
- ${ECHO_MSG} "*** (optionally $MAKE reinstall) to
upgrade properly"; \
+ ${ECHO_MSG} "*** If so, you may use either of:"; \
+ ${ECHO_MSG} "*** - \"pkg_delete $$found\" and
\"${MAKE} reinstall\" to upgrade properly"; \ ${ECHO_MSG} "*** -
\"${MAKE} update\" to rebuild the package and all of its dependencies";
\ ${ECHO_MSG} "*** - \"${MAKE} replace\" to replace only the package
without re-linking"; \ ${ECHO_MSG} "*** dependencies, risking
various problems."; \ @@ -3507,9 +3505,8 @@ @found="`${PKG_BEST_EXISTS}
\"${PKGWILDCARD}\" || ${TRUE}`"; \ if [ "$$found" != "" ];
then \ ${ECHO_MSG}
"${_PKGSRC_IN}> $$found is already installed - perhaps an older
version?"; \
- ${ECHO_MSG} "*** If so, you may wish to:"; \
- ${ECHO_MSG} "(pkg_delete -f $$found && ${MAKE}
bin-install)"; \
- ${ECHO_MSG} "*** to upgrade it properly."; \
+ ${ECHO_MSG} "*** If so, you may wish to \`\`pkg_delete
$$found'' and install"; \
+ ${ECHO_MSG} "*** this package again by \`\`${MAKE}
bin-install'' to upgrade it properly."; \ ${SHCOMMENT} ${ECHO_MSG} "***
or use \`\`${MAKE} bin-update'' to upgrade it and all of its
dependencies."; \ exit
1; \ fi