Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pkg/private/deb/deb.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _pkg_deb_impl(ctx):
fail("Neither description_file nor description attribute was specified")

if ctx.attr.changelog:
args.append("--changelog" + "@" + ctx.file.changelog.path)
args.add("--changelog", "@" + ctx.file.changelog.path)
files.append(ctx.file.changelog)

# Built using can also be specified by a file or inlined (but is not mandatory)
Expand Down
1 change: 1 addition & 0 deletions tests/deb/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pkg_deb(
name = "test_deb",
breaks = ["oldbrokenpkg"],
built_using = "some_test_data (0.1.2)",
changelog = "changelog",
conffiles = [
"/etc/nsswitch.conf",
"/etc/other",
Expand Down
5 changes: 5 additions & 0 deletions tests/deb/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fizzbuzz (4.5.6) trusty; urgency=low

* Add changelog coverage.

-- Some One <someone@somewhere.com> Thu, 01 Jan 1970 00:00:00 +0000
11 changes: 11 additions & 0 deletions tests/deb/pkg_deb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def test_description(self):

def test_control_files(self):
expected = [
{'name': './changelog', 'mode': 0o644},
{'name': './conffiles', 'mode': 0o644},
{'name': './config', 'mode': 0o755},
{'name': './control', 'mode': 0o644},
Expand All @@ -189,6 +190,16 @@ def test_conffiles(self):
conffiles,
'/etc/nsswitch.conf\n/etc/other\n')

def test_changelog(self):
changelog = self.deb_file.get_deb_ctl_file('changelog')
self.assertEqual(
changelog,
'fizzbuzz (4.5.6) trusty; urgency=low\n'
'\n'
' * Add changelog coverage.\n'
'\n'
' -- Some One <someone@somewhere.com> Thu, 01 Jan 1970 00:00:00 +0000\n')

def test_config(self):
config = self.deb_file.get_deb_ctl_file('config')
self.assertEqual(config, '# test config file\n')
Expand Down
Loading