After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 136500 - "head -number" is evil (and deprecated/unportable)
"head -number" is evil (and deprecated/unportable)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 0.7.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-03-07 22:52 UTC by Stephane Loeuillet
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
common patch (701 bytes, patch)
2004-03-07 23:11 UTC, Stephane Loeuillet
none Details | Review
gst-ffmpeg specific patch (823 bytes, patch)
2004-03-07 23:11 UTC, Stephane Loeuillet
none Details | Review

Description Stephane Loeuillet 2004-03-07 22:52:56 UTC
as i saw several warnings at gst-ffmpeg autogen, i did the following grep :
grep -r "head -[0-9]" /usr/portage/distfiles/cvs-src/gst*

and found :

gst-ffmpeg/gst-libs/ext/ffmpeg/patch/autotools.diff:+       
actual_version=`$checkprog --version | head -1 | \

and

gst-editor/common/m4/ax_create_stdint_h.m4:ac_cv_stdint_message="using gnu
compiler "`$CC --version | head -1`
/gst-ffmpeg/common/m4/ax_create_stdint_h.m4:ac_cv_stdint_message="using gnu
compiler "`$CC --version | head -1`
gst-player/common/m4/ax_create_stdint_h.m4:ac_cv_stdint_message="using gnu
compiler "`$CC --version | head -1`
gst-plugins/common/m4/ax_create_stdint_h.m4:ac_cv_stdint_message="using gnu
compiler "`$CC --version | head -1`
gstreamer/common/m4/ax_create_stdint_h.m4:ac_cv_stdint_message="using gnu
compiler "`$CC --version | head -1`

head -number (or any number) as well as tail -number is deprecated and
non-portable. (and would be removed in later head/tail versions)

the following should be used : head -n number or tail -n number

as there is a 'common' CVS repository, i suppose it contains this directory
for every gstreamer part, so only one change required.

the only part which a second bad use of head -1 is gst-ffmpeg


here are the warnings i have :

configure: slurping FFmpeg CVS source
configure: checking out ffmpeg cvs code from 2004-02-29 20:00 GMT into
gst-libs/ext/ffmpeg
cvs checkout: warning: failed to open
/usr/portage/tmp/portage/homedir/.cvspass for reading: No such file or
directory
configure: setting up ffmpeg build system and applying patches
checking for libtool >= 1.5...
  testing libtoolize... head: `-1' option is obsolete; use `-n 1' since
this will be removed in the future
found.
checking for autoconf >= 2.53...
  testing autoconf... head: `-1' option is obsolete; use `-n 1' since this
will be removed in the future
found.
checking for automake >= 1.6...
  testing automake... head: `-1' option is obsolete; use `-n 1' since this
will be removed in the future
too old (found version 1.5)
  testing automake-1.7... head: `-1' option is obsolete; use `-n 1' since
this will be removed in the future
found.
aclocal: configure.ac: 547: macro `AM_PATH_IMLIB' not found in library
checking whether byte ordering is bigendian... no
Comment 1 Stephane Loeuillet 2004-03-07 23:11:10 UTC
Created attachment 25304 [details] [review]
common patch
Comment 2 Stephane Loeuillet 2004-03-07 23:11:54 UTC
Created attachment 25305 [details] [review]
gst-ffmpeg specific patch
Comment 3 Thomas Vander Stichele 2004-03-09 15:20:10 UTC
Ronald apparently already fixed it in ffmpeg - please verify if I'm right.

commited to HEAD, closing.