Summary: | Fix tests. kill the [ x"$foo and fix the double == | ||
---|---|---|---|
Product: | Portland | Reporter: | Dan Douglas <ormaaj> |
Component: | xdg-utils | Assignee: | Portland Bugs <portland-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Dan Douglas
2011-12-31 20:30:39 UTC
As most are probably aware, the [ x"$var" = x"bar" ] convention used in many of the xdg-utils scripts is a rather ludicrous compatibility measure that only makes sense if extremely ancient Bourne shells need to be considered (which are themselves incompatible in many ways with such supposedly POSIX-compliant shells as Dash). If that's the general attitude, that's ok, but the fact that old-style POSIX [ tests are broken in many places due to use of the == operator indicates that nobody really cares about compatibility anyway. Any such test will fail on all but Bash/Korn family shells' built-in test variants, and Gnu coreutils standalone "test" command which allow the == operator as a non-standard extension. Dash doesn't allow this, and neither would any of the multiple-decades-old shells that might require the ugly x"$var" hack. I could go through and fix all these if anyone really wants, but it should be a simple enough task. I only bring it up after running across Freenode folks on more than one occasion who feel the need to stick to this (AFAICT) unwritten convention only to increase the likelihood that their patches are accepted. I personally don't care about carrying the compatibility measures around forever either. If you don't mind doing the work creating a patch to address the issues you posed, I'll be happy to review/commit it. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/57. |
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.