freedom-maker: update patches for newer release
This commit is contained in:
parent
fe099af6d1
commit
19cdc0e545
8 changed files with 284 additions and 270 deletions
|
|
@ -1,76 +1,75 @@
|
|||
diff --git a/freedommaker/tests/test_library.py b/freedommaker/tests/test_library.py
|
||||
index 2cc840a..6e63917 100644
|
||||
index 4b52b278..b4688a11 100644
|
||||
--- a/freedommaker/tests/test_library.py
|
||||
+++ b/freedommaker/tests/test_library.py
|
||||
@@ -422,13 +422,13 @@ modify x x
|
||||
@patch('freedommaker.library.run')
|
||||
def test_debootstrap(self, run):
|
||||
"""Test debootstrapping."""
|
||||
- library.debootstrap(self.state, 'i386', 'stretch', 'minbase',
|
||||
- ['main', 'contrib'], ['p1', 'p2'],
|
||||
- 'http://deb.debian.org/debian')
|
||||
+ library.debootstrap(self.state, 'amd64', 'nabia', 'minbase',
|
||||
+ ['main'], ['p1', 'p2'],
|
||||
+ 'http://archive.trisquel.org/trisquel')
|
||||
run.assert_called_with([
|
||||
- 'debootstrap', '--arch=i386', '--variant=minbase',
|
||||
- '--components=main,contrib', '--include=p1,p2', 'stretch',
|
||||
- self.state['mount_point'], 'http://deb.debian.org/debian'
|
||||
+ 'debootstrap', '--arch=amd64', '--variant=minbase',
|
||||
+ '--components=main', '--include=p1,p2', 'nabia',
|
||||
+ self.state['mount_point'], 'http://archive.trisquel.org/trisquel'
|
||||
])
|
||||
@@ -446,13 +446,13 @@ def test_cleanup_extra_storage(run, image, state, random_string):
|
||||
@patch('freedommaker.library.run')
|
||||
def test_debootstrap(run, state):
|
||||
"""Test debootstrapping."""
|
||||
- library.debootstrap(state, 'i386', 'stretch', 'minbase',
|
||||
- ['main', 'contrib'], ['p1', 'p2'],
|
||||
- 'http://deb.debian.org/debian')
|
||||
+ library.debootstrap(state, 'amd64', 'aramo', 'minbase',
|
||||
+ ['main'], ['p1', 'p2'],
|
||||
+ 'http://archive.trisquel.org/trisquel')
|
||||
run.assert_called_with([
|
||||
- 'debootstrap', '--arch=i386', '--variant=minbase',
|
||||
- '--components=main,contrib', '--include=p1,p2', 'stretch',
|
||||
- state['mount_point'], 'http://deb.debian.org/debian'
|
||||
+ 'debootstrap', '--arch=amd64', '--variant=minbase',
|
||||
+ '--components=main', '--include=p1,p2', 'aramo',
|
||||
+ state['mount_point'], 'http://archive.trisquel.org/trisquel'
|
||||
])
|
||||
|
||||
self.assertEqual(self.state['cleanup'], [[
|
||||
@@ -574,31 +574,37 @@ ff02::2 ip6-allrouters
|
||||
sources_path = self.state['mount_point'] + '/etc/apt/sources.list'
|
||||
assert state['cleanup'] == [[
|
||||
@@ -602,17 +602,17 @@ def test_setup_apt(run, state):
|
||||
sources_path = state['mount_point'] + '/etc/apt/sources.list'
|
||||
|
||||
stable_content = '''
|
||||
stable_content = '''
|
||||
-deb http://deb.debian.org/debian stable main
|
||||
-deb-src http://deb.debian.org/debian stable main
|
||||
+deb http://archive.trisquel.org/trisquel nabia main
|
||||
+deb-src http://archive.trisquel.org/trisquel nabia main
|
||||
+deb http://archive.trisquel.org/trisquel aramo main
|
||||
+deb-src http://archive.trisquel.org/trisquel aramo main
|
||||
|
||||
-deb http://deb.debian.org/debian stable-updates main
|
||||
-deb-src http://deb.debian.org/debian stable-updates main
|
||||
+deb http://archive.trisquel.org/trisquel nabia-updates main
|
||||
+deb-src http://archive.trisquel.org/trisquel nabia-updates main
|
||||
+deb http://archive.trisquel.org/trisquel aramo-updates main
|
||||
+deb-src http://archive.trisquel.org/trisquel aramo-updates main
|
||||
|
||||
-deb http://security.debian.org/debian-security/ stable-security main
|
||||
-deb-src http://security.debian.org/debian-security/ stable-security main
|
||||
+deb http://archive.trisquel.org/trisquel nabia-security main
|
||||
+deb-src http://archive.trisquel.org/trisquel nabia-security main
|
||||
+deb https://archive.trisquel.org/trisquel/ aramo-security main
|
||||
+deb-src https://archive.trisquel.org/trisquel/ aramo-security main
|
||||
'''
|
||||
with self.assert_file_change(sources_path, None, stable_content):
|
||||
- library.setup_apt(self.state, 'http://deb.debian.org/debian',
|
||||
- 'stable', ['main'])
|
||||
+ library.setup_apt(self.state, 'http://archive.trisquel.org/trisquel',
|
||||
+ 'nabia', ['main'])
|
||||
with assert_file_change(sources_path, None, stable_content):
|
||||
- library.setup_apt(state, 'http://deb.debian.org/debian', 'stable',
|
||||
+ library.setup_apt(state, 'http://archive.trisquel.org/trisquel', 'aramo',
|
||||
['main'])
|
||||
|
||||
self.assertEqual(run.call_args_list, [
|
||||
call(self.state, ['apt-get', 'update']),
|
||||
call(self.state, ['apt-get', 'clean'])
|
||||
])
|
||||
assert run.call_args_list == [
|
||||
@@ -620,13 +620,19 @@ deb-src https://archive.trisquel.org/trisquel/ aramo-security main
|
||||
call(state, ['apt-get', 'clean'])
|
||||
]
|
||||
|
||||
- unstable_content = '''
|
||||
-deb http://ftp.us.debian.org/debian unstable main contrib non-free
|
||||
-deb-src http://ftp.us.debian.org/debian unstable main contrib non-free
|
||||
+ aramo_content = '''
|
||||
+deb http://archive.trisquel.org/trisquel aramo main
|
||||
+deb-src http://archive.trisquel.org/trisquel aramo main
|
||||
- unstable_content = '''
|
||||
-deb http://ftp.us.debian.org/debian unstable main contrib non-free-firmware
|
||||
-deb-src http://ftp.us.debian.org/debian unstable main contrib non-free-firmware
|
||||
+ ecne_content = '''
|
||||
+deb http://archive.trisquel.org/trisquel ecne main
|
||||
+deb-src http://archive.trisquel.org/trisquel ecne main
|
||||
+
|
||||
+deb http://archive.trisquel.org/trisquel aramo-updates main
|
||||
+deb-src http://archive.trisquel.org/trisquel aramo-updates main
|
||||
+deb http://archive.trisquel.org/trisquel ecne-updates main
|
||||
+deb-src http://archive.trisquel.org/trisquel ecne-updates main
|
||||
+
|
||||
+deb http://archive.trisquel.org/trisquel aramo-security main
|
||||
+deb-src http://archive.trisquel.org/trisquel aramo-security main
|
||||
+deb https://archive.trisquel.org/trisquel/ ecne-security main
|
||||
+deb-src https://archive.trisquel.org/trisquel/ ecne-security main
|
||||
'''
|
||||
- with self.assert_file_change(sources_path, None, unstable_content):
|
||||
- library.setup_apt(self.state, 'http://ftp.us.debian.org/debian',
|
||||
- 'unstable', ['main', 'contrib', 'non-free'])
|
||||
+ with self.assert_file_change(sources_path, None, aramo_content):
|
||||
+ library.setup_apt(self.state, 'http://archive.trisquel.org/trisquel',
|
||||
+ 'aramo', ['main'])
|
||||
- with assert_file_change(sources_path, None, unstable_content):
|
||||
- library.setup_apt(state, 'http://ftp.us.debian.org/debian', 'unstable',
|
||||
- ['main', 'contrib', 'non-free-firmware'])
|
||||
+ with assert_file_change(sources_path, None, ecne_content):
|
||||
+ library.setup_apt(state, 'http://archive.trisquel.org/trisquel', 'ecne',
|
||||
+ ['main'])
|
||||
|
||||
@patch('freedommaker.library.run_in_chroot')
|
||||
def test_setup_flash_kernel(self, run):
|
||||
|
||||
@patch('freedommaker.library.run_in_chroot')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue