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

Fix some small issues with rpm support #796

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/legacy/rpm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def _pkg_rpm_impl(ctx):
inputs = files,
outputs = [ctx.outputs.rpm],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/private/deb/deb.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def _pkg_deb_impl(ctx):
inputs = files,
outputs = [output_file, changes_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/private/tar/tar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def _pkg_tar_impl(ctx):
arguments = [args],
outputs = [output_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/private/zip/zip.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def _pkg_zip_impl(ctx):
arguments = [args],
outputs = [output_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/releasing/git.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def _git_changelog_impl(ctx):
arguments = [args],
outputs = [ctx.outputs.out],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
Expand Down
8 changes: 4 additions & 4 deletions pkg/rpm_pfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -675,17 +675,17 @@ def _pkg_rpm_impl(ctx):
inputs = files,
outputs = [output_file],
env = {
"LANG": "en_US.UTF-8",
"LC_CTYPE": "UTF-8",
"LANG": ctx.configuration.default_shell_env.get("LANG", "en_US.UTF-8"),
"LC_CTYPE": ctx.configuration.default_shell_env.get("LC_CTYPE", "UTF-8"),
"PYTHONIOENCODING": "UTF-8",
"PYTHONUTF8": "1",
},
tools = tools,
)

changes = []
if ctx.attr.changelog:
changes = [ctx.attr.changelog]
if ctx.file.changelog:
changes = [ctx.file.changelog]

output_groups = {
"out": [default_file],
Expand Down