Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont break long words for debian control fields #777

Closed

Conversation

ajorgensen
Copy link
Contributor

By default wrapping can split on - characters which creates the chance that any
dependency with a - in it that falls near the wrap threshold will get
split along two lines and render the control file invalid.

Text is preferably wrapped on whitespaces and right after the hyphens
in hyphenated words; only then will long words be broken if necessary,
unless TextWrapper.break_long_words is set to false.
https://docs.python.org/3.1/library/textwrap.html#textwrap.TextWrapper.break_long_words

This supersede #773 and closes #772

By default wrapping can split on `-` characters which creates the chance that any
dependency with a `-` in it that falls near the wrap threshold will get
split along two lines and render the control file invalid.

> Text is preferably wrapped on whitespaces and right after the hyphens
> in hyphenated words; only then will long words be broken if necessary,
> unless TextWrapper.break_long_words is set to false.
https://docs.python.org/3.1/library/textwrap.html#textwrap.TextWrapper.break_long_words
@damienmg
Copy link
Contributor

LGTM importing.

Thanks again for baring with me :)

@ajorgensen
Copy link
Contributor Author

@damienmg no problem, it was my pleasure.

bazel-io pushed a commit that referenced this pull request Jan 12, 2016
By default wrapping can split on `-` characters which creates the chance that any
dependency with a `-` in it that falls near the wrap threshold will get
split along two lines and render the control file invalid.

> Text is preferably wrapped on whitespaces and right after the hyphens
> in hyphenated words; only then will long words be broken if necessary,
> unless TextWrapper.break_long_words is set to false.
https://docs.python.org/3.1/library/textwrap.html#textwrap.TextWrapper.break_long_words

Fixes #772.

--
Reviewed-on: #777
MOS_MIGRATED_REVID=111925490
@damienmg
Copy link
Contributor

This has been merged

@damienmg damienmg closed this Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg_deb splits on - character breaking control file
2 participants