Merge ~xnox/curtin:btrfs-progs into curtin:master

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Dan Watkins
Approved revision: 64f64bef0ad081cb86159b7fbbd683cfc425b76f
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~xnox/curtin:btrfs-progs
Merge into: curtin:master
Diff against target: 70 lines (+6/-6)
4 files modified
curtin/block/deps.py (+1/-1)
curtin/deps/__init__.py (+1/-1)
debian/control (+1/-1)
tests/unittests/test_curthooks.py (+3/-3)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper (community) Approve
Steve Langasek (community) Needs Fixing
Julian Andres Klode Pending
Review via email: mp+371105@code.launchpad.net

Commit message

Switch to the new btrfs-progs package name, with btrfs-tools fallback.

Description of the change

Switch to the new btrfs-progs package name, with btrfs-tools fallback.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Currently the new btrfs-progs has dropped Provides btrfs-tools and is stuck in eoan-proposed, because curtin still relies on btrfs-tools package.

Revision history for this message
Steve Langasek (vorlon) wrote :

Feedback inline. Otherwise I have no objections, although Julian seemed to suggest people should not rely on apt's support for regex matching.

review: Needs Fixing
Revision history for this message
Ryan Harper (raharper) wrote :

Neat; I didn't know you could do matching.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I am introducing `+Provides: btrfs-progs` in xenial, meaning that one can use future-proof name in xenial.

I do wonder if this is enough, or if we still allow to deploy trusty with xenail's curtin. If we do, we still need matching there.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Updated with more strict regexp, retested that it works on stock xenial. This is now ready to merge / ship.

Revision history for this message
Ryan Harper (raharper) wrote :

Thanks!

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/block/deps.py b/curtin/block/deps.py
2index 930f764..38581a8 100644
3--- a/curtin/block/deps.py
4+++ b/curtin/block/deps.py
5@@ -58,7 +58,7 @@ def detect_required_packages_mapping(osfamily=DISTROS.debian):
6 distro_mapping = {
7 DISTROS.debian: {
8 'bcache': ['bcache-tools'],
9- 'btrfs': ['btrfs-tools'],
10+ 'btrfs': ['^btrfs-(progs|tools)$'],
11 'ext2': ['e2fsprogs'],
12 'ext3': ['e2fsprogs'],
13 'ext4': ['e2fsprogs'],
14diff --git a/curtin/deps/__init__.py b/curtin/deps/__init__.py
15index 37c4469..714ef18 100644
16--- a/curtin/deps/__init__.py
17+++ b/curtin/deps/__init__.py
18@@ -25,7 +25,7 @@ REQUIRED_EXECUTABLES = [
19 ('lvcreate', 'lvm2'),
20 ('mdadm', 'mdadm'),
21 ('mkfs.vfat', 'dosfstools'),
22- ('mkfs.btrfs', 'btrfs-tools'),
23+ ('mkfs.btrfs', '^btrfs-(progs|tools)$'),
24 ('mkfs.ext4', 'e2fsprogs'),
25 ('mkfs.xfs', 'xfsprogs'),
26 ('partprobe', 'parted'),
27diff --git a/debian/control b/debian/control
28index c2de623..1b4aee5 100644
29--- a/debian/control
30+++ b/debian/control
31@@ -29,7 +29,7 @@ Package: curtin
32 Architecture: all
33 Priority: extra
34 Depends: bcache-tools,
35- btrfs-tools,
36+ btrfs-progs | btrfs-tools,
37 dosfstools,
38 file,
39 gdisk,
40diff --git a/tests/unittests/test_curthooks.py b/tests/unittests/test_curthooks.py
41index e7d506e..d5bebe7 100644
42--- a/tests/unittests/test_curthooks.py
43+++ b/tests/unittests/test_curthooks.py
44@@ -738,7 +738,7 @@ class TestDetectRequiredPackages(CiTestCase):
45 ({'storage': {
46 'version': 1,
47 'items': ('lvm_partition', 'lvm_volgroup', 'btrfs', 'xfs')}},
48- ('lvm2', 'xfsprogs', 'btrfs-tools')),
49+ ('lvm2', 'xfsprogs', '^btrfs-(progs|tools)$')),
50 ({'storage': {
51 'version': 1,
52 'items': ('raid', 'bcache', 'ext3', 'xfs')}},
53@@ -747,7 +747,7 @@ class TestDetectRequiredPackages(CiTestCase):
54 'version': 1,
55 'items': ('raid', 'lvm_volgroup', 'lvm_partition', 'ext3',
56 'ext4', 'btrfs')}},
57- ('lvm2', 'mdadm', 'e2fsprogs', 'btrfs-tools')),
58+ ('lvm2', 'mdadm', 'e2fsprogs', '^btrfs-(progs|tools)$')),
59 ({'storage': {
60 'version': 1,
61 'items': ('bcache', 'lvm_volgroup', 'lvm_partition', 'ext2')}},
62@@ -796,7 +796,7 @@ class TestDetectRequiredPackages(CiTestCase):
63 'network': {
64 'version': 1,
65 'items': ('bond', 'vlan')}},
66- ('e2fsprogs', 'btrfs-tools', 'vlan', 'ifenslave')),
67+ ('e2fsprogs', '^btrfs-(progs|tools)$', 'vlan', 'ifenslave')),
68 ))
69
70 def test_network_v2_detect(self):

Subscribers

People subscribed via source and target branches