1 |
commit: 85345d4e5f9ab61413299368e506edc247d78a6b |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 11 23:35:31 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 11 23:35:31 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=85345d4e |
7 |
|
8 |
grs/Netboot.py: control the entire alt-name for the initramfs/kernel/ISO |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
|
12 |
grs/Netboot.py | 16 +++++++++------- |
13 |
1 file changed, 9 insertions(+), 7 deletions(-) |
14 |
|
15 |
diff --git a/grs/Netboot.py b/grs/Netboot.py |
16 |
index 33c7b9d..59bd34b 100644 |
17 |
--- a/grs/Netboot.py |
18 |
+++ b/grs/Netboot.py |
19 |
@@ -41,20 +41,22 @@ class Netboot(HashIt): |
20 |
self.kernelroot = kernelroot |
21 |
self.logfile = logfile |
22 |
# Prepare a year, month and day for a name timestamp. |
23 |
- self.year = str(datetime.now().year).zfill(4) |
24 |
- self.month = str(datetime.now().month).zfill(2) |
25 |
- self.day = str(datetime.now().day).zfill(2) |
26 |
- self.medium_name = 'initramfs-%s-%s%s%s' % (name, self.year, self.month, self.day) |
27 |
+ year = str(datetime.now().year).zfill(4) |
28 |
+ month = str(datetime.now().month).zfill(2) |
29 |
+ day = str(datetime.now().day).zfill(2) |
30 |
+ self.medium_name = 'initramfs-%s-%s%s%s' % (name, year, month, day) |
31 |
self.digest_name = '%s.DIGESTS' % self.medium_name |
32 |
- self.kernelname = 'kernel-%s-%s%s%s' % (name, self.year, self.month, self.day) |
33 |
- self.cd_name = '%s-%s%s%s.iso' % (name, self.year, self.month, self.day) |
34 |
+ self.kernelname = 'kernel-%s-%s%s%s' % (name, year, month, day) |
35 |
+ self.cd_name = '%s-%s%s%s.iso' % (name, year, month, day) |
36 |
|
37 |
|
38 |
def netbootit(self, do_cd=None, alt_name=None): |
39 |
""" TODO """ |
40 |
if alt_name: |
41 |
- self.medium_name = 'initramfs-%s-%s%s%s' % (alt_name, self.year, self.month, self.day) |
42 |
+ self.medium_name = 'initramfs-%s' % alt_name |
43 |
self.digest_name = '%s.DIGESTS' % self.medium_name |
44 |
+ self.kernelname = 'kernel-%s' % alt_name |
45 |
+ self.cd_name = '%s.iso' % alt_name |
46 |
|
47 |
# 1. Copy the kernel to the tmpdir directory. |
48 |
kernel_src = os.path.join(self.portage_configroot, 'boot/kernel') |