Summary: | non portable sed usage in xorgversion.m4 | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Matthieu Herrb <matthieu.herrb> | ||||
Component: | Build/Modular | Assignee: | Xorg Project Team <xorg-team> | ||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | normal | ||||||
Priority: | high | ||||||
Version: | 7.2 (2007.02) | ||||||
Hardware: | x86 (IA32) | ||||||
OS: | OpenBSD | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 6666 | ||||||
Attachments: |
|
Description
Matthieu Herrb
2006-12-16 11:26:34 UTC
Created attachment 8140 [details] [review] proposed patch: use 'cut' instead. Would be nice to fix for 7.2. xf86-video-nv 1.2.1 doesn't build on systems with non-cgnu sed without this. Thank you - this fixes the xf86-video-nv build failure on Solaris. I've committed the fix to git, but the bug isn't really fixed until the packages which use it are regenerated with the new macros installed, so I'm not marking as fixed yet. (In reply to comment #1) > Created an attachment (id=8140) [edit] > proposed patch: use 'cut' instead. > The patch was written to work w/ shorter version strings. The 'cut' version of this patch doesn't work correctly: dilinger@sticky:~/Desktop$ echo 1.2.3 | cut -d . -f 3 3 dilinger@sticky:~/Desktop$ echo 1.2 | cut -d . -f 3 dilinger@sticky:~/Desktop$ echo 1 | cut -d . -f 3 1 That last one should be ' ', not '1'. I think what we want here is 'cut -s'. How portable is that? cut -s works on Solaris: alanc@alf:~ [7:25pm - 203] echo 1.2.3 | cut -s -d . -f 3 3 alanc@alf:~ [7:25pm - 204] echo 1.2 | cut -s -d . -f 3 alanc@alf:~ [7:25pm - 205] echo 1 | cut -s -d . -f 3 alanc@alf:~ [7:25pm - 206] (In reply to comment #3) > I've committed the fix to git, but the bug isn't really fixed until the packages > which use it are regenerated with the new macros installed, so I'm not marking as > fixed yet. urgh. that's a hell of a lot of packages. cut -s is standard. So no objection to use it. However if some of the PACKAGE_VERSION_* macros end up empty, things like drivers that use them to initialize integers in a structure will still fail. We can leave with that I think. Daniel, when I checked the source tarballs that I build for OpenBSD, there are only a two of them which use the new macros: xf86-video-nv and xf86-video-mga. These macros where added pretty recently to xorgversion.m4. Not all packages - just those that use the definitions - I haven't done a full scan, but thought that was currently limited to xf86-video-nv & xf86-video-mga. Since these #defines were just added, not many packages have had time to adopt them yet. Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. packages have been regenerated now. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.