Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36231 - Still some head/tail -\d+ users left in portage
Summary: Still some head/tail -\d+ users left in portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-21 05:26 UTC by Stephane Loeuillet
Modified: 2004-01-26 00:57 UTC (History)
3 users (show)

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 Stephane Loeuillet 2003-12-21 05:26:54 UTC
First, i see that there has been 3 ways to fix this breakage :
using sed
using perl regex
making and using a home made patch (even sometimes patching another patch)

usually, each one only fix tail -1 .... and head -1 ...
but sometimes, the parameter is not 1 but another number

shouldn't there be a policy to use the same universal fix for all 3 cases ?

---

using :

egrep -r "head -[0-9]" /usr/portage/*-*
egrep -r "tail -[0-9]" /usr/portage/*-*

i still see a few ebuilds and lots of files in local /files/ using the old broken syntax :

/usr/portage/app-editors/xemacs/xemacs-21.4.9.ebuild:           glibc_version=`/sbin/ldconfig -V | head -1 | sed -e "s/[^0-9]*[0-9]\.//" | sed -e "s/\.//"`
/usr/portage/fresco-base/fresco-cvs/files/rundemo.sh:REF=`head -1 ${TMPFILE} | cut -d " " -f 3`
/usr/portage/kde-base/kdeaddons/kdeaddons-3.1.2.ebuild: AMVERSION="`automake --version | head -1 | cut -d " " -f4`"
/usr/portage/net-mail/qmail/files/1.03-r12/badrcptto-morebadrcptto-accdias-gentoo:+     | sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
/usr/portage/net-mail/qmail/files/1.03-r12/badrcptto-morebadrcptto-accdias-gentoo:+     | sed s}BREAK}"`head -1 conf-break`"}g \
/usr/portage/net-mail/qmail/files/1.03-r12/badrcptto-morebadrcptto-accdias-gentoo:+     | sed s}SPAWN}"`head -1 conf-spawn`"}g \
/usr/portage/net-mail/cvm-vmailmgr/files/run-cvm-vmailmgr:exec cvm-vmailmgr-local `head -1 /etc/vmailmgr/cvm-vmailmgr-socket` 2>&1
/usr/portage/net-mail/mailfront/files/run-pop3front:SOCKET=`head -1 /etc/vmailmgr/cvm-vmailmgr-socket`
/usr/portage/net-mail/mailfront/files/run-smtpfront:SOCKET=`head -1 /etc/vmailmgr/cvm-vmailmgr-socket`
/usr/portage/net-mail/qmail-ldap/files/supervise/run-qmailpop3d:LL=`head -1 /var/qmail/control/qmail-pop3d-loglevel`
/usr/portage/net-mail/qmail-ldap/files/supervise/run-qmailpop3d:SL=`head -1 /var/qmail/control/qmail-pop3d-softlimit`
/usr/portage/net-mail/qmail-ldap/files/supervise/run-qmailpop3d:HOSTNAME=`head -1 /var/qmail/control/me`
/usr/portage/net-mail/spamass-milter/files/spamass-milter.rc:    && kill -1 `head -1 /var/run/sendmail.pid`
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-20030510.ebuild:     cat mod_auth_mysql.c | head -81 \
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild: cat mod_auth_mysql.c | tail +84 | head -101 \
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-20030510-r1.ebuild:  cat mod_auth_mysql.c | head -81 \
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-20030510-r2.ebuild:  cat mod_auth_mysql.c | head -81 \
/usr/portage/net-zope/zope/files/zope:          pid=`head -1 /var/run/$1.pid`
/usr/portage/net-zope/zope/files/zope:          pid=`head -1 /var/run/$1.pid`
/usr/portage/net-zope/zope/files/zope.rc6:              pid=`head -1 /var/run/$1.pid`
/usr/portage/net-zope/zope/files/zope.rc6:              pid=`head -1 /var/run/$1.pid`

/usr/portage/media-sound/speech-tools/files/speech-tools-gcc3.3.diff: COMPILER_VERSION_COMMAND=$(CXX) -v 2>&1 | tail -1 | sed -e 's/^....//'
/usr/portage/media-tv/rivatv/files/rivatv-0.8.3-configure.patch:+bgcc=`gcc -v 2>&1 | tail -1 | sed 's/\(.*\)gcc version \([0-9.]*\).*/\2/'`
/usr/portage/media-video/nvidia-kernel/files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-20030402.diff:+        echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" > $@
/usr/portage/media-video/nvidia-kernel/files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-20030402.diff:+        echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" > $@
/usr/portage/media-video/nvidia-kernel/files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-20030402.diff:+        MODULE=$($* -v 2>&1 | tail -1 | cut -d ' ' -f 3)
/usr/portage/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff:+        echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" > $@
/usr/portage/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff:+        echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" > $@
/usr/portage/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff:+        MODULE=$($* -v 2>&1 | tail -1 | cut -d ' ' -f 3)
/usr/portage/media-video/mtxdrivers/mtxdrivers-0.3.0.ebuild:    tail -4434 "${DISTDIR}/${At}" | tar -xvzf -
/usr/portage/net-fs/shfs/files/shfs.mount:      SSH_AGENT_PID=`ps -C ssh-agent -opid=,uid= | sed -n "s/^[ \t]\{1,\}\([0-9]\{1,\}\)\{1,\}[ \t]\{1,\}$ID\$/\1/p" | tail -1`
/usr/portage/net-fs/shfs/files/shfs.mount:      SSH_AUTH_SOCK=`find /tmp -follow -maxdepth 4 -type s -user "$ID" | grep ssh | grep agent | tail -1`
/usr/portage/sys-devel/distcc/files/2.11/distcc-config: dccc_show_env | grep "$1" | tail -1 | sed -e "s,${1}=,,"
/usr/portage/sys-devel/distcc/files/2.11/distcc-config:                 grep -v '^#' | tail -1)"
/usr/portage/sys-devel/distcc/files/2.10/distcc-config: dccc_show_env | grep "$1" | tail -1 | sed -e "s,${1}=,,"
/usr/portage/sys-devel/distcc/files/2.10/distcc-config:                 grep -v '^#' | tail -1)"
/usr/portage/sys-devel/distcc/files/2.8/distcc-config:  dccc_show_env | grep "$1" | tail -1 | sed -e "s,${1}=,,"
/usr/portage/sys-devel/distcc/files/2.8/distcc-config:                  grep -v '^#' | tail -1)"
/usr/portage/sys-devel/distcc/files/2.9/distcc-config:  dccc_show_env | grep "$1" | tail -1 | sed -e "s,${1}=,,"
/usr/portage/sys-devel/distcc/files/2.9/distcc-config:                  grep -v '^#' | tail -1)"

Please correct those and mark them as done here just after. perhaps it would help ending individual package XXX does not compile bugs. If 'head/tail' bugs bother you, close this one as a dupe/invalid.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-05 15:37:04 UTC
The following are fixed now:
/usr/portage/app-editors/xemacs/xemacs-21.4.9.ebuild
/usr/portage/kde-base/kdeaddons/kdeaddons-3.1.2.ebuild
/usr/portage/net-mail/qmail-ldap/files/supervise/run-qmailpop3d
/usr/portage/net-mail/cvm-vmailmgr/files/run-cvm-vmailmgr
/usr/portage/net-mail/mailfront/files/run-pop3front
/usr/portage/net-mail/mailfront/files/run-smtpfront
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-20030510.ebuild
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-20030510-r1.ebuild
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-1.11.ebuild
/usr/portage/net-www/mod_auth_mysql/mod_auth_mysql-20030510-r2.ebuild
/usr/portage/net-zope/zope/files/zope
/usr/portage/net-zope/zope/files/zope.rc6
/usr/portage/sys-devel/distcc/files/2.8/distcc-config
/usr/portage/sys-devel/distcc/files/2.9/distcc-config
/usr/portage/sys-devel/distcc/files/2.10/distcc-config
/usr/portage/sys-devel/distcc/files/2.11/distcc-config

These are the remaining ones that may cause possible problems still:
/usr/portage/fresco-base/fresco-cvs/files/rundemo.sh
/usr/portage/media-video/mplayer/files/mplayer-0.90-ppc-benh.patch
/usr/portage/net-mail/spamass-milter/files/spamass-milter.rc
/usr/portage/media-tv/rivatv/files/rivatv-0.8.3-configure.patch
/usr/portage/media-video/nvidia-kernel/files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-20030402.diff
/usr/portage/media-sound/speech-tools/files/speech-tools-gcc3.3.diff
/usr/portage/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff

please note that /usr/portage/net-mail/qmail/files/1.03-r12/badrcptto-morebadrcptto-accdias-gentoo is a special case as after patches are applied, then all the instances of head/tail brokeness are fixed.
Comment 2 Spider (RETIRED) gentoo-dev 2004-01-12 21:18:26 UTC
hmm , are theese still actual?  *ping* to the bug, sorta.
Comment 3 Stephane Loeuillet 2004-01-18 18:00:04 UTC
seems robin forgot one or two ones. here is my actual list :

first, those which are in his list and still actual : (all his list so)
/usr/portage/fresco-base/fresco-cvs/files/rundemo.sh
/usr/portage/media-sound/speech-tools/files/speech-tools-gcc3.3.diff
/usr/portage/media-tv/rivatv/files/rivatv-0.8.3-configure.patch
/usr/portage/media-video/mplayer/files/mplayer-0.90-ppc-benh.patch
/usr/portage/media-video/nvidia-kernel/files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-20030402.diff
/usr/portage/media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff
/usr/portage/net-mail/spamass-milter/files/spamass-milter.rc

then, those i have found : (any false positive ?)

/usr/portage/net-zope/zope/files/zope:	        pid=`head -1 /var/run/$1.pid`
/usr/portage/net-zope/zope/files/zope.rc6:	        pid=`head -1 /var/run/$1.pid`
/usr/portage/media-video/mtxdrivers/mtxdrivers-0.3.0.ebuild:	tail -4434 "${DISTDIR}/${At}" | tar -xvzf -
/usr/portage/net-fs/shfs/files/shfs.mount:	SSH_AGENT_PID=`ps -C ssh-agent -opid=,uid= | sed -n "s/^[ \t]\{1,\}\([0-9]\{1,\}\)\{1,\}[ \t]\{1,\}$ID\$/\1/p" | tail -1`
/usr/portage/net-fs/shfs/files/shfs.mount:	SSH_AUTH_SOCK=`find /tmp -follow -maxdepth 4 -type s -user "$ID" | grep ssh | grep agent | tail -1`
Comment 4 SpanKY gentoo-dev 2004-01-18 19:15:24 UTC
i just fixed:
fresco-base/fresco-cvs/files/rundemo.sh
media-tv/rivatv/files/rivatv-0.8.3-configure.patch
media-video/nvidia-kernel/files/1.0.4349/NVIDIA_kernel-1.0-4349-2.5-20030402.diff
media-video/nvidia-kernel/files/1.0.4363/NVIDIA_kernel-1.0-4363-2.5-20030714.diff
net-mail/spamass-milter/files/spamass-milter.rc
net-zope/zope/files/zope
net-zope/zope/files/zope.rc6
media-video/mtxdrivers/mtxdrivers-0.3.0.ebuild
net-fs/shfs/files/shfs.mount

media-video/mplayer/files/mplayer-0.90-ppc-benh.patch is no longer used, i removed it

media-sound/speech-tools is only thing left i guess
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2004-01-19 09:46:13 UTC
Mike, you rock :)
Comment 6 SpanKY gentoo-dev 2004-01-26 00:57:41 UTC
well since no one felt like fixing speech tools i did ... god that package is ugly