ports/110630: ports-mgmt/portupgrade deletes package on build failure

Angelo Turetta aturetta at bestunion.it
Wed Mar 21 17:10:09 UTC 2007


>Number:         110630
>Category:       ports
>Synopsis:       ports-mgmt/portupgrade deletes package on build failure
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 21 17:10:09 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Angelo Turetta
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD proxy.lan.bestunion.it 6.2-STABLE FreeBSD 6.2-STABLE #22: Wed Mar  7 17:38:45 CET 2007	aturetta at snape.lan.bestunion.it:/usr/obj/usr/src/sys/IPSEC i386

Relevant ports:

portupgrade-2.2.6_2,2       =  up-to-date with port
ruby-1.8.5.12,1             =  up-to-date with port
ruby18-bdb44-0.6.0          =  up-to-date with port
db44-4.4.20.4               =  up-to-date with port

	
>Description:
	Running portupgrade to update port versions, if for some reason the build 
	phase fails, portupgrade will no matter remove the installed port, breaking all 
	kinds of dependencies (and possibly making the machine unreacheable)

	It happened to me yesterday on two different machines for the tk84 port (which was broken 
        by a missing patch file in the morning (UTC) of 2007-03-20) 
	and on another machine for the port cvsup-mirror (which cannot be built in 'batch' 
        mode).

	I had already reported some strange behavior in case of build errors, but got no answers: 
	see http://lists.freebsd.org/pipermail/freebsd-ports/2006-September/035507.html

	I attach the portupgrade output for the two failures I noticed:

	---------------------- cvsup-mirror --------------
		--->  Upgrading 'cvsup-mirror-1.3_5' to 'cvsup-mirror-1.3_6' (net/cvsup-mirror)
		--->  Building '/usr/ports/net/cvsup-mirror'
		===>  Cleaning for cvsup-without-gui-16.1h_2
		===>  Cleaning for ezm3-1.2_1
		===>  Cleaning for gmake-3.81_1
		===>  Cleaning for gettext-0.16.1
		===>  Cleaning for libtool-1.5.22_4
		===>  Cleaning for libiconv-1.9.2_2
		===>  Cleaning for cvsup-mirror-1.3_6
		===>  cvsup-mirror-1.3_6 is an interactive port.
		*** Error code 1
		
		Stop in /usr/ports/net/cvsup-mirror.
		
		--->  Backing up the old version
		--->  Uninstalling the old version
		--->  Deinstalling 'cvsup-mirror-1.3_5'
		Do you want me to remove scheduled updates from "/etc/crontab" [y]? Done.
		Do you want me to remove the cvsupd logging from "/etc/syslog.conf" [y]? n
		Do you want me to remove the cvsup and cvsupd log entries from "/etc/newsyslog.conf" [y]? n
		Do you want me to remove group "cvsup" [y]? n
		Do you want me to remove user "cvsup" [y]? n
		Do you want me to remove group "cvsupin" [y]? n
		Do you want me to remove user "cvsupin" [y]? n
		pkg_delete: '/usr/local/etc/cvsup/config.sh' fails original MD5 checksum - deleted anyway.
		[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 483 packages found (-1 +0) (...) done]
		--->  Installing the new version via the port
		===>  cvsup-mirror-1.3_6 is an interactive port.
		*** Error code 1
		
		Stop in /usr/ports/net/cvsup-mirror.
		** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.24918.10 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=cvsup-mirror-1.3_5 UPGRADE_PORT_VER=1.3_5 make BATCH=yes DEPENDS_TARGET=package reinstall
	----------------- end cvsup mirror --------------

	------------------ x11-toolkits/tk84 ------------
		===>  Cleaning for tcl-8.4.14_2,1
		===>  Cleaning for xorg-libraries-6.9.0_1
		===>  Cleaning for imake-6.9.0_1
		===>  Cleaning for libdrm-2.0.2
		===>  Cleaning for freetype2-2.2.1_1
		===>  Cleaning for fontconfig-2.4.2,1
		===>  Cleaning for perl-5.8.8
		===>  Cleaning for gmake-3.81_1
		===>  Cleaning for libtool-1.5.22_4
		===>  Cleaning for pkg-config-0.21
		===>  Cleaning for expat-2.0.0_1
		===>  Cleaning for gettext-0.16.1
		===>  Cleaning for libiconv-1.9.2_2
		===>  Cleaning for tk-8.4.14_3,2
		===>  Extracting for tk-8.4.14_3,2
		=> MD5 Checksum OK for tk8.4.14-src.tar.gz.
		=> SHA256 Checksum OK for tk8.4.14-src.tar.gz.
		===>  Patching for tk-8.4.14_3,2
		===>  Applying FreeBSD patches for tk-8.4.14_3,2
		===>   tk-8.4.14_3,2 depends on executable in : tclsh8.4 - found
		===>   tk-8.4.14_3,2 depends on shared library: X11.6 - found
		===>  Configuring for tk-8.4.14_3,2
		
		   <<<<< snip >>>>>
		
		===>  Building for tk-8.4.14_3,2
		cc -pipe -c -O2 -fno-strict-aliasing (......)
		
		   <<<<< snip >>>>>
		
		cc -pipe -O2 -fno-strict-aliasing -pipe    tkAppInit.o -L/video/usr/ports/x11-toolkits/tk84/work/tk8.4.14/unix -ltk84  -L/usr/local/lib -ltcl84  -L/usr/X11R6/lib -lX11  -lm -Wl,-rpath,/usr/local/lib:/usr/X11R6/lib -o wish
		===>  Installing for tk-8.4.14_3,2
		===>   tk-8.4.14_3,2 depends on executable in : tclsh8.4 - found
		===>   tk-8.4.14_3,2 depends on shared library: X11.6 - found
		** Missing /usr/ports/x11-toolkits/tk84/files/pkgIndex.tcl.in for tk-8.4.14_3,2.
		*** Error code 1
		
		Stop in /usr/ports/x11-toolkits/tk84.
		*** Error code 1
		
		Stop in /usr/ports/x11-toolkits/tk84.
		
		
		pkg_delete: package 'tk-8.4.14_2,2' is required by these other packages
		and may not be deinstalled (but I'll delete it anyway):
		git-1.4.4.4
		graphviz-2.12_1
		[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 482 packages found (-1 +0) (...) done]
		** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.30568.1 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=tk-8.4.14_2,2 UPGRADE_PORT_VER=8.4.14_2,2 make BATCH=yes DEPENDS_TARGET=package reinstall
		pkg_create: can't find package 'tk-8.4.14_2,2' installed!
		pkg_create: package creation failed

	------------------ x11-toolkits/tk84 ------------

*******  Please note, 
in the case of tk84 the output is taken from the log file generated 
by the -L portupgrade option, PLUS the stderr output of the portupgrade command itself. My batch 
dumps the stdout of portupgrade to /dev/null (btw, this is due to another 'regression' I found 
in recent portupgrade, that even if you specify -L, the output from the build is always 
printed to stdout: this was not the case in pre 2.x versions, let's say one year ago)
>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list