-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "package: Expand "*" to empty if it matches CC"
This reverts commit 2e079dd. Given a package list containing `=category/package-${PV}*`, nattka will remove the `*` and not replace it with a list of architecture keywords iff the set of architectures to be CC'd matches the set of stable keywords for `=category/package-${PV}`. This behavior was added in commit 2e079dd ("package: Expand "*" to empty if it matches CC") to allow reusing a stabilization bug for an additional architecture by only adding the new architecture to the CC list. This has the unfortunate side-effect of making a nattka-processed package list unacceptable to nattka itself if the package list needs to be modified. See https://bugs.gentoo.org/920053#c18 for example. Revert to the original behavior of always expanding `*` to the architecture list. If a stabilization needs to happen on an additional architecture, the additional architecture keyword should be added to the package list so nattka can sanity-check it. Signed-off-by: Matt Turner <[email protected]> Closes: #86 Signed-off-by: Michał Górny <[email protected]>
- Loading branch information
Showing
4 changed files
with
14 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1588,8 +1588,8 @@ def test_sanity_expand_plist_cc_arches(self, bugz): | |
bugz_inst.update_status.assert_called_with( | ||
560322, True, None, | ||
cc_add=['[email protected]', '[email protected]', '[email protected]'], | ||
new_package_list=['test/mixed-keywords-3 \r\n' | ||
'test/amd64-testing-2 \r\n']) | ||
new_package_list=['test/mixed-keywords-3 amd64 hppa\r\n' | ||
'test/amd64-testing-2 amd64 hppa\r\n']) | ||
self.post_verify() | ||
|
||
@patch('nattka.__main__.NattkaBugzilla') | ||
|
@@ -1633,8 +1633,8 @@ def test_sanity_expand_plist_after_cc(self, bugz): | |
bugz_inst.find_bugs.assert_called_with(bugs=[560322]) | ||
bugz_inst.update_status.assert_called_with( | ||
560322, True, None, | ||
new_package_list=['test/mixed-keywords-3 \r\n' | ||
'test/amd64-testing-2 \r\n']) | ||
new_package_list=['test/mixed-keywords-3 amd64 hppa\r\n' | ||
'test/amd64-testing-2 amd64 hppa\r\n']) | ||
self.post_verify() | ||
|
||
@patch('nattka.__main__.NattkaBugzilla') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -819,8 +819,7 @@ def test_unmodified(self): | |
''' | ||
self.assertEqual( | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]', '[email protected]']), | ||
BugInfo(BugCategory.STABLEREQ, data)), | ||
data) | ||
|
||
def test_asterisk_streq(self): | ||
|
@@ -836,8 +835,7 @@ def test_asterisk_streq(self): | |
''' | ||
self.assertEqual( | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]']), | ||
BugInfo(BugCategory.STABLEREQ, data)), | ||
expect) | ||
|
||
def test_asterisk_kwreq(self): | ||
|
@@ -853,25 +851,7 @@ def test_asterisk_kwreq(self): | |
''' | ||
self.assertEqual( | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.KEYWORDREQ, data), | ||
['[email protected]']), | ||
expect) | ||
|
||
def test_asterisk_to_empty(self): | ||
data = ''' | ||
test/mixed-keywords-3 * | ||
test/mixed-keywords-4 ^ | ||
test/amd64-testing-1 ^ | ||
''' | ||
expect = f''' | ||
test/mixed-keywords-3 {""} | ||
test/mixed-keywords-4 {""} | ||
test/amd64-testing-1 {""} | ||
''' | ||
self.assertEqual( | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]', '[email protected]']), | ||
BugInfo(BugCategory.KEYWORDREQ, data)), | ||
expect) | ||
|
||
def test_above(self): | ||
|
@@ -891,8 +871,7 @@ def test_above(self): | |
''' | ||
self.assertEqual( | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]']), | ||
BugInfo(BugCategory.STABLEREQ, data)), | ||
expect) | ||
|
||
def test_above_empty(self): | ||
|
@@ -906,8 +885,7 @@ def test_above_empty(self): | |
''' | ||
self.assertEqual( | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]']), | ||
BugInfo(BugCategory.STABLEREQ, data)), | ||
expect) | ||
|
||
def test_above_empty_plus_keywords_left(self): | ||
|
@@ -917,8 +895,7 @@ def test_above_empty_plus_keywords_left(self): | |
''' | ||
with self.assertRaises(ExpandImpossible): | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]']) | ||
BugInfo(BugCategory.STABLEREQ, data)) | ||
|
||
def test_above_empty_plus_keywords_right(self): | ||
data = ''' | ||
|
@@ -927,8 +904,7 @@ def test_above_empty_plus_keywords_right(self): | |
''' | ||
with self.assertRaises(ExpandImpossible): | ||
expand_package_list(self.repo, | ||
BugInfo(BugCategory.STABLEREQ, data), | ||
['[email protected]']) | ||
BugInfo(BugCategory.STABLEREQ, data)) | ||
|
||
|
||
class FakeEbuild(object): | ||
|