File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def _pkg_deb_impl(ctx):
116116 fail ("Neither description_file nor description attribute was specified" )
117117
118118 if ctx .attr .changelog :
119- args .append ("--changelog" + "@" + ctx .file .changelog .path )
119+ args .add ("--changelog" , "@" + ctx .file .changelog .path )
120120 files .append (ctx .file .changelog )
121121
122122 # Built using can also be specified by a file or inlined (but is not mandatory)
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ pkg_deb(
7474 name = "test_deb" ,
7575 breaks = ["oldbrokenpkg" ],
7676 built_using = "some_test_data (0.1.2)" ,
77+ changelog = "changelog" ,
7778 conffiles = [
7879 "/etc/nsswitch.conf" ,
7980 "/etc/other" ,
Original file line number Diff line number Diff line change 1+ fizzbuzz (4.5.6) trusty; urgency=low
2+
3+ * Add changelog coverage.
4+
5+ -- Some One <someone@somewhere.com> Thu, 01 Jan 1970 00:00:00 +0000
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ def test_description(self):
173173
174174 def test_control_files (self ):
175175 expected = [
176+ {'name' : './changelog' , 'mode' : 0o644 },
176177 {'name' : './conffiles' , 'mode' : 0o644 },
177178 {'name' : './config' , 'mode' : 0o755 },
178179 {'name' : './control' , 'mode' : 0o644 },
@@ -189,6 +190,16 @@ def test_conffiles(self):
189190 conffiles ,
190191 '/etc/nsswitch.conf\n /etc/other\n ' )
191192
193+ def test_changelog (self ):
194+ changelog = self .deb_file .get_deb_ctl_file ('changelog' )
195+ self .assertEqual (
196+ changelog ,
197+ 'fizzbuzz (4.5.6) trusty; urgency=low\n '
198+ '\n '
199+ ' * Add changelog coverage.\n '
200+ '\n '
201+ ' -- Some One <someone@somewhere.com> Thu, 01 Jan 1970 00:00:00 +0000\n ' )
202+
192203 def test_config (self ):
193204 config = self .deb_file .get_deb_ctl_file ('config' )
194205 self .assertEqual (config , '# test config file\n ' )
You can’t perform that action at this time.
0 commit comments