Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258475 - portage assumed build successful when unable to get pty
Summary: portage assumed build successful when unable to get pty
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 17:27 UTC by Michał Górny
Modified: 2010-04-12 05:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-02-10 17:27:50 UTC
Just started system using 'init=/bin/bash' and tried to rebuild module-init-tools. During the build process something output error that there were no available ptys (if I recall right), but portage continued like nothing happened.

The actual build didn't even start, but portage behaved like it was successful, and replaced older version with new, empty one - i.e. removed all files contained in it.

Such behavior can lead to very unpleasant things - like having system without module-init-tools.

----

Portage 2.2_rc23 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28-tuxonice-r1-mgorny-amd64 x86_64)
=================================================================
System uname: Linux-2.6.28-tuxonice-r1-mgorny-amd64-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.0.0
Timestamp of tree: Tue, 10 Feb 2009 01:45:01 +0000
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.6.1
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     9999
sys-apps/sandbox:    1.3.5
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/srv/nfs/common/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ask --jobs --load-average 9.0 --keep-going"
FEATURES="collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://src.gentoo.pl http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl en_US en"
MAKEOPTS="-j3"
PKGDIR="/srv/nfs/common/packages/athlon64"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/cache/portage/local /usr/portage/local/d /usr/portage/local/gnash-cvs /usr/portage/local/java-overlay /usr/portage/local/kvm /usr/portage/local/ltsp /usr/portage/local/perl-experimental /usr/portage/local/pro-audio /usr/portage/local/pythonhead /usr/portage/local/sunrise /usr/portage/local/vdr-devel /usr/portage/local/vdr-experimental /usr/portage/local/vdr-testing /usr/portage/local/voip /home/mgorny/projekty/emdzientoo"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 amrnb amrwb bash-completion bluetooth branding bzip2 cairo cdparanoia cdr cleartype cli cracklib crypt curl dbus dri dts dv dvb dvd dvdr dvdread emboss encode evo exif expat fame ffmpeg firefox flac fontconfig fortran fpx gif glib gmp gnutls gpg gpgme gs hal iconv idn imagemagick ipv6 isdnlog jack jbig jpeg jpeg2k kdeenablefinal latex lirc logrotate mad mbox midi mikmod mmap mmx mmxext mng modplug mp3 mpeg mudflap multilib musepack ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss oss4 pam pch pcre pdf perl png ppds pppd pulseaudio python qt3support quicktime readline reflection rle rtsp scanner sdl session slang speex spl sqlite3 sse sse2 ssl startup-notification svg sysfs syslog tcpd tetex tga theora threads tiff timidity truetype unicode usb v4l v4l2 vcd vhosts vim-syntax vorbis wmf xattr xcb xine xinetd xml xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel emu10k1 virmidi mpu401 pcsp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en_US en" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="nouveau nv nvidia vesa radeon radeonhd fglrx"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-11 19:42:21 UTC
I would like to notice that I've just tried to reproduce the bug and the current Portage version behaves correctly.
Comment 2 Zac Medico gentoo-dev 2010-04-11 21:55:34 UTC
(In reply to comment #0)
> Just started system using 'init=/bin/bash' and tried to rebuild
> module-init-tools. During the build process something output error that there
> were no available ptys (if I recall right), but portage continued like nothing
> happened.

This would actually be a bug at the ebuild level (failure to call die when appropriate).

It's allowed for ebuilds to install zero files even though a previous version may have installed files. This behavior is valid in cases when a normal ebuild is converted to a meta-package (like when x11-libs/qt transitioned from monolithic to split ebuilds).

There's an undocumented PORTAGE_PACKAGE_EMPTY_ABORT=1 setting that you can put in make.conf if you want portage to abort in cases like this. It may be useful for development, but it's not suitable for general use because of the meta-package transition case mentioned above.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-12 05:38:30 UTC
(In reply to comment #2)
> This would actually be a bug at the ebuild level (failure to call die when
> appropriate).

I don't think so. Especially that econf() has a die of its' own and unpack() too.

And by being unable to reproduce the issue, I mean that although portage warns about lack of free ptys once, it continues to build the package correctly. Previously, it complained about the ptys all the time.
Comment 4 Zac Medico gentoo-dev 2010-04-12 05:42:26 UTC
Ok, please go ahead and reopen if you can reproduce it.