Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 605530

Summary: redirected output of "equery -N u" is out of order
Product: Portage Development Reporter: Donald <dcljr>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: CONFIRMED ---    
Severity: normal CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 346443    

Description Donald 2017-01-13 08:17:27 UTC
When using equery-0.3.2-r1, listing the USE flags of multiple packages to the console works as expected:

- - -

# equery u openssl openssh
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-libs/openssl-1.0.2j:
 U I
 - - abi_x86_32    : 32-bit (x86) libraries
 + + asm           : Support assembly hand optimized crypto functions (i.e.
                     faster run time)
 + + bindist       : Disable EC algorithms (as they seem to be patented) --
                     note: changes the ABI
 - - gmp           : Add support for dev-libs/gmp (GNU MP library)
 - - kerberos      : Add kerberos support
 - - rfc3779       : Enable support for RFC 3779 (X.509 Extensions for IP
                     Addresses and AS Identifiers)
 - - sctp          : Support for Stream Control Transmission Protocol
 - - sslv2         : Support for the old/insecure SSLv2 protocol -- note: not
                     required for TLS/https
 + + sslv3         : Support for the old/insecure SSLv3 protocol -- note: not
                     required for TLS/https
 - - static-libs   : Build static versions of dynamic libraries as well
 - - test          : Workaround to pull in packages needed to run with
                     FEATURES=test. Portage-2.1.2 handles this internally, so
                     don't set it in make.conf/package.use anymore
 + + tls-heartbeat : Enable the Heartbeat Extension in TLS and DTLS
 - - vanilla       : Do not add extra patches which change default behaviour;
                     DO NOT USE THIS ON A GLOBAL SCALE as the severity of the
                     meaning changes drastically
 + + zlib          : Add support for zlib (de)compression

 * Found these USE flags for net-misc/openssh-7.3_p1-r7:
 U I
 + + X        : Add support for X11
 - - X509     : Adds support for X.509 certificate authentication
 + + bindist  : Disable EC/RC5 algorithms in OpenSSL for patent reasons.
 - - debug    : Enable extra debug codepaths, like asserts and extra output. If
                you want to get meaningful backtraces see https://wiki.gentoo.o
                rg/wiki/Project:Quality_Assurance/Backtraces
 + + hpn      : Enable high performance ssh
 - - kerberos : Add kerberos support
 + + ldap     : Add support for storing SSH public keys in LDAP
 - - ldns     : Use LDNS for DNSSEC/SSHFP validation.
 - - libedit  : Use the libedit library (replacement for readline)
 - - livecd   : Enable root password logins for live-cd environment.
 + + pam      : Add support for PAM (Pluggable Authentication Modules) -
                DANGEROUS to arbitrarily flip
 + + pie      : Build programs as Position Independent Executables (a security
                hardening technique)
 - - sctp     : Support for Stream Control Transmission Protocol
 - - skey     : Enable S/Key (Single use password) authentication support
 - - ssh1     : Support the legacy/weak SSH1 protocol
 + + ssl      : Enable additional crypto algorithms via OpenSSL
 - - static   : !!do not set this during bootstrap!! Causes binaries to be
                statically linked instead of dynamically
 - - test     : Workaround to pull in packages needed to run with
                FEATURES=test. Portage-2.1.2 handles this internally, so don't
                set it in make.conf/package.use anymore

- - -

But listing the same thing to a file using --no-pipe results in output that's out of order, making it extremely difficult to understand:

- - -

# equery -N u openssl openssh > foo
# cat foo
 - - abi_x86_32    : 32-bit (x86) libraries
 + + asm           : Support assembly hand optimized crypto functions (i.e. faster run time)
 + + bindist       : Disable EC algorithms (as they seem to be patented) -- note: changes the ABI
 - - gmp           : Add support for dev-libs/gmp (GNU MP library)
 - - kerberos      : Add kerberos support
 - - rfc3779       : Enable support for RFC 3779 (X.509 Extensions for IP Addresses and AS Identifiers)
 - - sctp          : Support for Stream Control Transmission Protocol
 - - sslv2         : Support for the old/insecure SSLv2 protocol -- note: not required for TLS/https
 + + sslv3         : Support for the old/insecure SSLv3 protocol -- note: not required for TLS/https
 - - static-libs   : Build static versions of dynamic libraries as well
 - - test          : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
 + + tls-heartbeat : Enable the Heartbeat Extension in TLS and DTLS
 - - vanilla       : Do not add extra patches which change default behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically
 + + zlib          : Add support for zlib (de)compression
 + + X        : Add support for X11
 - - X509     : Adds support for X.509 certificate authentication
 + + bindist  : Disable EC/RC5 algorithms in OpenSSL for patent reasons.
 - - debug    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + hpn      : Enable high performance ssh
 - - kerberos : Add kerberos support
 + + ldap     : Add support for storing SSH public keys in LDAP
 - - ldns     : Use LDNS for DNSSEC/SSHFP validation.
 - - libedit  : Use the libedit library (replacement for readline)
 - - livecd   : Enable root password logins for live-cd environment.
 + + pam      : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 + + pie      : Build programs as Position Independent Executables (a security hardening technique)
 - - sctp     : Support for Stream Control Transmission Protocol
 - - skey     : Enable S/Key (Single use password) authentication support
 - - ssh1     : Support the legacy/weak SSH1 protocol
 + + ssl      : Enable additional crypto algorithms via OpenSSL
 - - static   : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
 - - test     : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-libs/openssl-1.0.2j:
 U I

 * Found these USE flags for net-misc/openssh-7.3_p1-r7:
 U I

- - -

The second (piped with -N) output should not differ in any significant way from the first (unpiped).
Comment 1 Donald 2017-01-13 08:21:46 UTC
I meant:

The second (redirected with -N) output should not differ in any significant way from the first (not redirected).
Comment 2 Donald 2017-01-13 08:23:33 UTC
Note that using

# equery -N u openssl openssh

with no redirection results in the same output as

# equery u openssl openssh
Comment 3 Donald 2017-01-13 08:26:29 UTC
OMG...

I also meant:

Using gentoolkit-0.3.2-r1 [...]

- - -

# emerge --info
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.4, glibc-2.22-r4, 3.14.27-gentoo-wl x86_64)
=================================================================
System uname: Linux-3.14.27-gentoo-wl-x86_64-AMD_Athlon-tm-_II_X3_440_Processor-with-gentoo-2.3
KiB Mem:     3985960 total,   2013480 free
KiB Swap:    4128764 total,   4128764 free
Timestamp of repository gentoo: Tue, 10 Jan 2017 19:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://lug.mtu.edu/gentoo/ http://gentoo.cs.uni.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv jpeg lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support readline sdl seccomp session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ice1724" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc emu" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON