I'll post a patch with several changes to the latest util-linux ebuild. There are several operations that happen that touch the disk that don't check the status. This is dangerous as those of us who are pushing the limits of our diskspace may experience temporary disk space issues that can result in very hard to find errors. Also, I notice that util-linux *could* support `use static` but doesn't. I'll use this bug to bring this up and possibly post a patch to support it if it sounds like something people might be interested in. Reproducible: Always Steps to Reproduce: 1. cat /usr/portage/*/util-linux/*ebuild Actual Results: see the ebuilds. Expected Results: visualize the ebuilds with my patch applied. Portage 2.0.47-r10 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r8) ================================================================= System uname: 2.4.19-gentoo-r9 i586 Pentium MMX GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/bash_completion /usr/X11R6/lib/X11/xkb /etc/X11/serverconfig /etc/X11/starthere /etc/ssmtp /etc/sound/events /etc/X11/rstart /etc/X11/xdm /etc/pango /etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 oss 3dnow apm crypt cups encode libg++ mikmod mmx mpeg ncurses pdflib spell truetype xml2 xv berkdb esd gdbm gif gnome gnome-libs gtk guile libwww oggvorbis pam perl png python readline slang snmp ssl tcpd tetex tiff X -java -xmms -jpeg -avi -dvd -opengl -doc -quicktime -sdl -svga -motif -nls -imlib -kde -qt -arts gpm mozilla gtk2" COMPILER="" CHOST="i586-pc-linux-gnu" CFLAGS="-march=i586 -O3 -pipe" CXXFLAGS="-march=i586 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
Created attachment 10859 [details, diff] util-linux.ebuild patch This patch adds some || die code to some disk-touching ops. Works for me here. Also, some mild tidying.
in fact, I think it's better to add >=sed-4.0.5 as a DEPEND, and make the sed's inline
Lets do as seemant suggested, and convert the greps and seds to 'sed -i -e', also, I'd love to see more ebuilds properly support USE="static" so if you want to add that, I'd like to see it. Also, if possible, adding die messages to your die statements like: blah || die "Message" would be preferred, this makes finding the reason for death much easier when debugging. (I usually just use "cp 1" "cp 2" "sed 1" etc. when there is no obvious verbose message that can be used, but any thing that can quickly identify the line where the ebuild died is nice to have. Thanks!
Created attachment 10979 [details, diff] enhanced patch to util-linux ebuild based on comments. Ok, here is a patch that I think fulfills all the requirements mentioned so far: Requires the new sed (this seems odd to me since it makes it into RDEPEND but whatever, sed is required by the system anyhow). Replaces the greps and file copies with "sed -i" Adds comments to the die functions Adds support for USE=static Some minor cleanup Let me know if there's anything else that needs to be done to this. Also, note that I changed the way USE=-nls is done. In the INSTALL doc the way to configure the package is through MCONFIG which is the way it's mostly done. However, the nls stuff used to be removed separately in the src_config() function. Since MCONFIG supports turning off nls I moved that functionality to the src_unpack() function with the rest of the MCONFIG whacking code. It seems to work well for me here and seems cleaner overall.
done in unstable, test it out, and make sure I didnt' regress anything.,