Skip to content

Conversation

@reidmv
Copy link
Contributor

@reidmv reidmv commented Apr 12, 2012

Previously, the concatfragments.sh script was would default to using GNU-specific flags for find, sort, and xargs. This necessitated explicit passing of a "gnu = false" parameter to the concat define in order to successfully run the script without GNU-specific flags when working with systems that do not by default include GNU versions of the utilities (solaris, for example).

This commit modifies the concatfragments script such that GNU versions of the utilities are not needed at all. It does this while preserving the original use case for the GNU flags, which was to allow special characters (like spaces) in the filenames, which it accomplished by using GNU flags to separate fields using null characters instead of newlines.

In order to preserve backwards-compatibility with existing puppet installations that make use of the "gnu = false" parameter, the parameter list for the concat define has not been changed. Rather, the gnu parameter is now deprecated and ignored.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the XARGSARG here? also from the comments to of the code, they are unused now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're totally right, neither FINDARG nor XARGSARG are used if this change is made. Pull request updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind also correcting the comment block - it still mentions the old -g switch, then I think we're good to go!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. :-)

Previously, the concatfragments.sh script was would default to using
GNU-specific flags for find, sort, and xargs. This necessitated
explicit passing of a "gnu = false" parameter to the concat define in
order to successfully run the script without GNU-specific flags when
working with systems that do not by default include GNU versions of the
utilities (solaris, for example).

This commit modifies the concatfragments script such that GNU versions
of the utilities are not needed at all. It does this while preserving
the original use case for the GNU flags, which was to allow special
characters (like spaces) in the filenames, which it accomplished by
using GNU flags to separate fields using null characters instead of
newlines.

In order to preserve backwards-compatibility with existing puppet
installations that make use of the "gnu = false" parameter, the
parameter list for the concat define has not been changed. Rather, the
gnu parameter is now deprecated and ignored.
@reidmv
Copy link
Contributor Author

reidmv commented Apr 17, 2012

Comment block updated to remove reference to -g switch

ripienaar added a commit that referenced this pull request Apr 17, 2012
Remove the gnu parameter from concat
@ripienaar ripienaar merged commit b4a80d4 into puppetlabs:master Apr 17, 2012
@ripienaar
Copy link
Contributor

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants