Re: bsd.port.mk dependency loop checking patch (Re: Who broke 'make clean' for ports ?)
On Sat, May 11, 2002 at 04:00:53PM +0300, Maxim Sobolev wrote: > KOMATSU Shinichiro wrote: > > > > (add To: [EMAIL PROTECTED]) > > > > From: Garrett Rooney <[EMAIL PROTECTED]> > > Subject: Re: Who broke 'make clean' for ports ? > > Date: Sat, May 11, 2002 at 02:31:32AM JST > > > > > there's a circular dependency that was just introduced to gettext. > > > gettext now depends on expat, which depends on gmake, which depends on > > > gettext. > > > > Recently, I wrote a patch for bsd.port.mk that checks circular dependency. > > If a dependency loop is found, it gives you a warning and > > does not invoke 'make' process any further. > > > > Someone, please test the patch below. > > If no problem is found, I will send-pr(8). > > I don't think that we really need such patch. In 99.% of cases it > would just waste CPU cycles. Circular dependency is a bug and as such > it doesn't need to be a supported "special case". Actually it would be useful to have this functionality somewhere. I recently spent a couple of hours trying to track down a circular dependency I had introduced via a bsd.port.mk patch. The main symptom was that the make_index script would just go into a loop and exhaust memory. I ended up finding it by adding all sorts of debugging printfs to the perl script, but this was pretty ugly. Kris msg38195/pgp0.pgp Description: PGP signature
Re: bsd.port.mk dependency loop checking patch (Re: Who broke 'make clean' for ports ?)
* Maxim Sobolev <[EMAIL PROTECTED]> [2002-05-11 15:00]: > KOMATSU Shinichiro wrote: > > > > (add To: [EMAIL PROTECTED]) > > > > From: Garrett Rooney <[EMAIL PROTECTED]> > > Subject: Re: Who broke 'make clean' for ports ? > > Date: Sat, May 11, 2002 at 02:31:32AM JST > > > > > there's a circular dependency that was just introduced to gettext. > > > gettext now depends on expat, which depends on gmake, which depends on > > > gettext. > > > > Recently, I wrote a patch for bsd.port.mk that checks circular dependency. > > If a dependency loop is found, it gives you a warning and > > does not invoke 'make' process any further. > > > > Someone, please test the patch below. > > If no problem is found, I will send-pr(8). > I don't think that we really need such patch. In 99.% of cases it > would just waste CPU cycles. Circular dependency is a bug and as such > it doesn't need to be a supported "special case". But it might be a good idea to incorporate this functionality into ${PORTSDIR}/devel/portlint. Regards, Olli -- Institute for Software Technology & Institute for Information Systems Department of Computing Science, Federal Armed Forces University Munich --- http://ist.unibw-muenchen.de/People/obraun/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: bsd.port.mk dependency loop checking patch (Re: Who broke 'make clean' for ports ?)
KOMATSU Shinichiro wrote: > > (add To: [EMAIL PROTECTED]) > > From: Garrett Rooney <[EMAIL PROTECTED]> > Subject: Re: Who broke 'make clean' for ports ? > Date: Sat, May 11, 2002 at 02:31:32AM JST > > > there's a circular dependency that was just introduced to gettext. > > gettext now depends on expat, which depends on gmake, which depends on > > gettext. > > Recently, I wrote a patch for bsd.port.mk that checks circular dependency. > If a dependency loop is found, it gives you a warning and > does not invoke 'make' process any further. > > Someone, please test the patch below. > If no problem is found, I will send-pr(8). I don't think that we really need such patch. In 99.% of cases it would just waste CPU cycles. Circular dependency is a bug and as such it doesn't need to be a supported "special case". -Maxim To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
bsd.port.mk dependency loop checking patch (Re: Who broke 'make clean' for ports ?)
(add To: [EMAIL PROTECTED]) From: Garrett Rooney <[EMAIL PROTECTED]> Subject: Re: Who broke 'make clean' for ports ? Date: Sat, May 11, 2002 at 02:31:32AM JST > there's a circular dependency that was just introduced to gettext. > gettext now depends on expat, which depends on gmake, which depends on > gettext. Recently, I wrote a patch for bsd.port.mk that checks circular dependency. If a dependency loop is found, it gives you a warning and does not invoke 'make' process any further. Someone, please test the patch below. If no problem is found, I will send-pr(8). Index: bsd.port.mk === RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.411 diff -u -u -r1.411 bsd.port.mk --- bsd.port.mk 27 Apr 2002 11:22:59 - 1.411 +++ bsd.port.mk 8 May 2002 17:13:40 - @@ -684,6 +684,16 @@ .else PORTSDIR?= /usr/ports .endif +.if exists(/bin/realpath) +PORTSDIR!= /bin/realpath ${PORTSDIR} +.else +PORTSDIR_IS_SYMLINK!= if [ -L ${PORTSDIR} ]; then echo "yes" ; fi +. if ${PORTSDIR_IS_SYMLINK} == "yes" +. error"PORTSDIR" must not be a symlink +. endif +. undef PORTSDIR_IS_SYMLINK +.endif + LOCALBASE?=${DESTDIR}/usr/local X11BASE?= ${DESTDIR}/usr/X11R6 LINUXBASE?=${DESTDIR}/compat/linux @@ -3068,11 +3078,20 @@ @${ALL-DEPENDS-LIST} ALL-DEPENDS-LIST= \ + parents="${PARENTS} ${.CURDIR}"; \ checked="${PARENT_CHECKED}"; \ - for dir in $$(${ECHO_CMD} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ + for dir in $$( { ${ECHO_CMD} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} +${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' ; +${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'; } | sort -u); do \ if [ -d $$dir ]; then \ - if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ - child=$$(cd $$dir; ${MAKE} PARENT_CHECKED="$$checked" all-depends-list); \ + for p in $$parents; do \ + if [ "$$p" = "$$dir" ]; then \ + ${ECHO_MSG} "Dependency loop:" >&2; \ + ${ECHO_MSG} "${.CURDIR} => $$p" >&2; \ + ${ECHO_MSG} "" >&2; \ + exit 1;\ + fi; \ + done; \ + if $$( for c in $$checked; do if [ "$$dir" = "$$c" ]; then +exit 1; fi ; done ); then \ + child=$$(cd $$dir; ${MAKE} PARENTS="$$parents" +PARENT_CHECKED="$$checked" all-depends-list); \ for d in $$child; do ${ECHO_CMD} $$d; done; \ ${ECHO_CMD} $$dir; \ checked="$$dir $$child $$checked"; \ @@ -3155,11 +3174,20 @@ if [ "${CHILD_DEPENDS}" ]; then \ ${ECHO_CMD} "${PKGNAME} ${.CURDIR}"; \ fi; \ + parents="${PARENTS} ${.CURDIR}"; \ checked="${PARENT_CHECKED}"; \ - for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ + for dir in $$( { ${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' +'\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' ; ${ECHO_CMD} ${DEPENDS} | ${TR} '\040' +'\012' | ${SED} -e 's/:.*//'; } | sort -u); do \ if [ -d $$dir ]; then \ - if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ - childout=$$(cd $$dir; ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ + for p in $$parents; do \ + if [ "$$p" = "$$dir" ]; then \ + ${ECHO_MSG} "Dependency loop:" >&2; \ + ${ECHO_MSG} "${.CURDIR} => $$p" >&
Re: Who broke 'make clean' for ports ?
On 10-May-2002 (17:44:21/GMT) Garrett Rooney wrote: >> Ok, thanks. Sorry for alarm but I don't see any message before >> my own. Can I back-cvsup to a stable date? When (sh)it happens? > the change is just a few hours old. you can just remove expat2 > from the LIB_DEPENDS in textproc/gettext/Makefile and you should > be fine for now. Yes, it works. Thanks again. Riccardo. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Who broke 'make clean' for ports ?
On Fri, May 10, 2002 at 07:41:44PM +0200, Riccardo Torrini wrote: > On 10-May-2002 (17:31:32/GMT) Garrett Rooney wrote: > > > there's a circular dependency that was just introduced to gettext. > > gettext now depends on expat, which depends on gmake, which depends > > on gettext. > > it's a known problem, and is being worked on. > > Ok, thanks. Sorry for alarm but I don't see any message before > my own. Can I back-cvsup to a stable date? When (sh)it happens? the change is just a few hours old. you can just remove expat2 from the LIB_DEPENDS in textproc/gettext/Makefile and you should be fine for now. -garrett -- garrett rooneyRemember, any design flaw you're [EMAIL PROTECTED] sufficiently snide about becomes http://electricjellyfish.net/ a feature. -- Dan Sugalski To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Who broke 'make clean' for ports ?
On 10-May-2002 (17:31:32/GMT) Garrett Rooney wrote: > there's a circular dependency that was just introduced to gettext. > gettext now depends on expat, which depends on gmake, which depends > on gettext. > it's a known problem, and is being worked on. Ok, thanks. Sorry for alarm but I don't see any message before my own. Can I back-cvsup to a stable date? When (sh)it happens? Riccardo. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Who broke 'make clean' for ports ?
On 10-May-2002 (17:26:56/GMT) Dan Nelson wrote: >> After a cvsup of 10 minutes ago either on 5.0-CURRENT and on >> 4.6-PRERELEASE (both of May 8, 02:46 CEST) making a >> # make clean >> into /usr/ports/deve/gettext spawn zillions(!) of make process, >> lead to cpu load average at 96.xx before a reboot :-( > Syntax errors (or defining things that bsd.port.mk wants to control > itself) in /etc/make.conf can cause this. What things? I don't'think. Why into /usr/ports/astro/luna works? Without changing my /etc/make.conf obviously... Anyway this are my 4.6 and 5.0 make.conf(s) -8<-[ 4.6-PRERELEASE ]-8< KERNCONF= SILOS CFLAGS= -O2 -pipe NOPROFILE= true USA_RESIDENT= NO SUP_UPDATE= yes SUP=/usr/local/bin/cvsup SUPFLAGS= -g -L 2 -z SUPFILE=/usr/local/etc/cvsup.stable PORTSSUPFILE= /usr/local/etc/cvsup.ports SENDMAIL_MC=/etc/mail/silos.mc # Resume ##FETCH_BEFORE_ARGS=-rR -o $${file}.resume ##FETCH_AFTER_ARGS=&& mv $${file}.resume $${file} # Ports WITHOUT_CUPS= yes # qpopper WITHOUT_IPV6= yes -8<-[ 5.0-CURRENT ]-8<- KERNCONF= TRUDY CPUTYPE=p3 CFLAGS= -O2 -pipe NOPROFILE= true COMPAT3X= yes COMPAT4X= yes XFREE86_VERSION=4 USA_RESIDENT= NO SUP_UPDATE= yes SUP=/usr/local/bin/cvsup SUPFLAGS= -g -L 2 -z SUPFILE=/usr/local/etc/cvsup.current PORTSSUPFILE= /usr/local/etc/cvsup.ports SENDMAIL_MC=/etc/mail/trudy.mc # Resume ##FETCH_BEFORE_ARGS=-rR -o $${file}.resume ##FETCH_AFTER_ARGS=&& mv $${file}.resume $${file} # Ports A4= yes # ghostscript-gnu WITH_GPHOTO2= yes # sane-backends WITH_GIMP= yes # sane-frontends # mplayer WITH_GUI= yes WITH_DVD= yes WITH_VORBIS=yes # bocsh WITH_BOCHS_CPU_LEVEL= 6 WITH_BOCHS_PROCESSORS= 1 # libmpeg2 WITH_SDL= yes Riccardo. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Who broke 'make clean' for ports ?
On Fri, May 10, 2002 at 12:26:56PM -0500, Dan Nelson wrote: > In the last episode (May 10), Riccardo Torrini said: > > After a cvsup of 10 minutes ago either on 5.0-CURRENT and on > > 4.6-PRERELEASE (both of May 8, 02:46 CEST) making a > > > > # make clean > > > > into /usr/ports/deve/gettext spawn zillions(!) of make process, > > lead to cpu load average at 96.xx before a reboot :-( > > > > Up to yesterday it works. Doing this into others ports works... > > Syntax errors (or defining things that bsd.port.mk wants to control > itself) in /etc/make.conf can cause this. there's a circular dependency that was just introduced to gettext. gettext now depends on expat, which depends on gmake, which depends on gettext. it's a known problem, and is being worked on. -garrett -- garrett rooneyRemember, any design flaw you're [EMAIL PROTECTED] sufficiently snide about becomes http://electricjellyfish.net/ a feature. -- Dan Sugalski To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Who broke 'make clean' for ports ?
In the last episode (May 10), Riccardo Torrini said: > After a cvsup of 10 minutes ago either on 5.0-CURRENT and on > 4.6-PRERELEASE (both of May 8, 02:46 CEST) making a > > # make clean > > into /usr/ports/deve/gettext spawn zillions(!) of make process, > lead to cpu load average at 96.xx before a reboot :-( > > Up to yesterday it works. Doing this into others ports works... Syntax errors (or defining things that bsd.port.mk wants to control itself) in /etc/make.conf can cause this. -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Who broke 'make clean' for ports ?
On 10-May-2002 (17:01:26/GMT) Riccardo Torrini wrote: > into /usr/ports/deve/gettext s/deve/devel/ I use make clean to show dependencies before install/update. No, I don't use neither pkg_update nor portupgrade. Riccardo. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message