Date: Thu, 17 Apr 2008 22:42:10 -0400 (EDT) From: Wesley Shields <wxs@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/122877: [PATCH]: Mk/bsd.port.mk - Show all pkg-message files Message-ID: <20080418024210.CA6FD5C38@syn.atarininja.org> Resent-Message-ID: <200804180300.m3I3016Q016959@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 122877 >Category: ports >Synopsis: [PATCH]: Mk/bsd.port.mk - Show all pkg-message files >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 18 03:00:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Wesley Shields >Release: FreeBSD 7.0-RELEASE amd64 >Organization: >Environment: System: FreeBSD syn.csh.rit.edu 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Mar 18 20:07:25 EDT 2008 root@syn.csh.rit.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: One thing that often confuses new users to FreeBSD is the fact that pkg-message files fly past their terminal as the ports infrastructure builds and installs things. It would be nice if all of those messages were collected and displayed at the end of the install. This is a patch I've been sitting on for a month or two now, so it may not apply cleanly anymore. If that is the case I'll be happy to submit a new one. In order to not break POLA this patch is currently a nop if SHOW_ALL_PKG_MSGS is not defined. I'm hesitant to make it the default behavior since there are probably lots of third party things that will likely be broken if it is the default. I'm open to suggestions on other ways to do this, or even if it's an idea not worth pursuing further. :) >How-To-Repeat: N/A >Fix: Index: bsd.commands.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.commands.mk,v retrieving revision 1.1 diff -u -u -r1.1 bsd.commands.mk --- bsd.commands.mk 4 Aug 2007 11:37:23 -0000 1.1 +++ bsd.commands.mk 20 Feb 2008 03:52:17 -0000 @@ -64,6 +64,7 @@ MV?= /bin/mv OBJCOPY?= /usr/bin/objcopy OBJDUMP?= /usr/bin/objdump +PAGER?= /usr/bin/less PASTE?= /usr/bin/paste PAX?= /bin/pax PRINTF?= /usr/bin/printf Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.589 diff -u -u -r1.589 bsd.port.mk --- bsd.port.mk 17 Oct 2007 10:12:24 -0000 1.589 +++ bsd.port.mk 20 Feb 2008 03:52:18 -0000 @@ -2313,6 +2313,7 @@ PKGMESSAGE?= ${PKGDIR}/pkg-message TMPPLIST?= ${WRKDIR}/.PLIST.mktmp +ALLPKGMSGS?= ${WRKDIR}/all-pkg-messages .for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} @@ -3933,6 +3934,30 @@ .endif .endif +.if !target(collect-all-pkg-message) +collect-all-pkg-message: +.if defined(SHOW_ALL_PKG_MSGS) + @if [ -f ${PKGMESSAGE} ]; then \ + ${ECHO_MSG} "===> Collecting pkg-message for later display."; \ + ${ECHO_CMD} "pkg-message for ${PKGNAME}:" >> ${ALLPKGMSGS}; \ + ${CAT} ${PKGMESSAGE} >> ${ALLPKGMSGS}; \ + fi; +.else + @${DO_NADA} +.endif +.endif + +.if !target(display-all-pkg-message) +display-all-pkg-message: +.if defined(SHOW_ALL_PKG_MSGS) + @if [ ${WRKDIR} = `dirname ${ALLPKGMSGS}` -a -e ${ALLPKGMSGS} ]; then \ + ${PAGER} ${ALLPKGMSGS}; \ + fi; +.else + @${DO_NADA} +.endif +.endif + .if !target(security-check) .if !defined(OLD_SECURITY_CHECK) @@ -4109,13 +4134,15 @@ _INSTALL_DEP= build _INSTALL_SEQ= install-message check-conflicts \ run-depends lib-depends apply-slist pre-install \ - pre-install-script generate-plist check-already-installed + pre-install-script generate-plist collect-all-pkg-message \ + check-already-installed _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ pre-su-install-script do-install install-desktop-entries \ post-install post-install-script add-plist-info \ add-plist-docs add-plist-examples add-plist-data \ add-plist-post install-rc-script compress-man \ - install-ldconfig-file fake-pkg security-check + install-ldconfig-file fake-pkg security-check \ + display-all-pkg-message _PACKAGE_DEP= install _PACKAGE_SEQ= package-message pre-package pre-package-script \ do-package post-package-script @@ -4817,15 +4844,15 @@ dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \ if [ X${DEPENDS_PRECLEAN} != "X" ]; then \ target="clean $$target"; \ - depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ + depends_args="$$depends_args NOCLEANDEPENDS=yes ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ if [ X${DEPENDS_CLEAN} != "X" ]; then \ target="$$target clean"; \ - depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ + depends_args="$$depends_args NOCLEANDEPENDS=yes ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ else \ target="${DEPENDS_TARGET}"; \ - depends_args="${DEPENDS_ARGS}"; \ + depends_args="${DEPENDS_ARGS} ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ if ${EXPR} "$$prog" : \\/ >/dev/null; then \ if [ -e "$$prog" ]; then \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080418024210.CA6FD5C38>