efibootdude 0.2__py3-none-any.whl → 0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of efibootdude might be problematic. Click here for more details.

efibootdude/main.py CHANGED
@@ -89,18 +89,6 @@ class EfiBootDude:
89
89
 
90
90
  def get_part_uuids(self):
91
91
  """ Get all the Partition UUIDS"""
92
- # uuids = {}
93
- # with open('/run/blkid/blkid.tab', encoding='utf8') as fh:
94
- # # sample: <device ... TYPE="vfat"
95
- # # PARTUUID="25d2dea1-9f68-1644-91dd-4836c0b3a30a">/dev/nvme0n1p1</device>
96
- # for xml_line in fh:
97
- # element = ET.fromstring(xml_line)
98
- # if 'PARTUUID' in element.attrib:
99
- # device=element.text.strip()
100
- # name = self.mounts.get(device, device)
101
- # uuids[element.attrib['PARTUUID'].lower()] = name
102
- # return uuids
103
-
104
92
  uuids = {}
105
93
  partuuid_path = '/dev/disk/by-partuuid/'
106
94
 
@@ -111,6 +99,8 @@ class EfiBootDude:
111
99
  if os.path.islink(full_path):
112
100
  device_path = os.path.realpath(full_path)
113
101
  uuids[entry] = device_path
102
+ if device_path in self.mounts:
103
+ uuids[entry] = self.mounts[device_path]
114
104
  return uuids
115
105
 
116
106
  @staticmethod
@@ -118,7 +108,6 @@ class EfiBootDude:
118
108
  """ Find uuid string in a line """
119
109
  # Define the regex pattern for UUID (e.g., 25d2dea1-9f68-1644-91dd-4836c0b3a30a)
120
110
  pattern = r'\b[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\b'
121
- # Search for the pattern in the line
122
111
  mats = re.findall(pattern, line, re.IGNORECASE)
123
112
  return mats
124
113
 
@@ -127,9 +116,11 @@ class EfiBootDude:
127
116
  # Define the command to run
128
117
  lines = []
129
118
  if self.testfile:
119
+ # if given a "testfile" (which should be just the
120
+ # raw output of 'efibootmgr'), then parse it
130
121
  with open(self.testfile, 'r', encoding='utf-8') as fh:
131
122
  lines = fh.readlines()
132
- else:
123
+ else: # run efibootmgr
133
124
  command = 'efibootmgr'.split()
134
125
  result = subprocess.run(command, stdout=subprocess.PIPE, text=True, check=True)
135
126
  lines = result.stdout.splitlines()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: efibootdude
3
- Version: 0.2
3
+ Version: 0.3
4
4
  Summary: A visual wrapper for efibootmgr
5
5
  Author-email: Joe Defen <joedef@google.com>
6
6
  License: MIT
@@ -52,6 +52,8 @@ At this point
52
52
  * Use `t` to relabel the boot entry.
53
53
  * Use `r` to remove it.
54
54
  * And so forth.
55
+ * The entries with `*` on the left are active boot entries; toggle whether
56
+ active by pressing `*`.
55
57
  * Use the `ESC` key to abandon any changes and reload the boot information.
56
58
  * When ready to write the changes to the BIOS, enter `w`.
57
59
  * When writing the changes, `efibootdude` drops out of menu mode so you can
@@ -0,0 +1,9 @@
1
+ efibootdude/PowerWindow.py,sha256=pQGXsAMeuiHn-vtEiVG0rgW1eCslh3ukC-VrPhH_j3k,28587
2
+ efibootdude/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ efibootdude/main.py,sha256=jerAMq_p4xSkQLXN-UQVTqNCKOGK_afRVLggkpwUQaE,18110
4
+ efibootdude-0.3.dist-info/LICENSE,sha256=qB9OdnyyF6WYHiEIXVm0rOSdcf8e2ctorrtWs6CC5lU,1062
5
+ efibootdude-0.3.dist-info/METADATA,sha256=x9bOSka84F_ErvyjoMX-vYEUD1zPaZffT2JS9NqNnUk,3481
6
+ efibootdude-0.3.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
7
+ efibootdude-0.3.dist-info/entry_points.txt,sha256=3KZ_86ZSy4f-weuSruTlMGaQ96jZUm7mjyITVnjE184,54
8
+ efibootdude-0.3.dist-info/top_level.txt,sha256=BrMsK3JmOrVJUNkHX1dicqWrdjbm4itRtmXJMxte-VU,12
9
+ efibootdude-0.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- efibootdude/PowerWindow.py,sha256=pQGXsAMeuiHn-vtEiVG0rgW1eCslh3ukC-VrPhH_j3k,28587
2
- efibootdude/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- efibootdude/main.py,sha256=opKAafTuw9BpwZl-Q99BmMGVarsf_fEgY-aLjbpeZtA,18460
4
- efibootdude-0.2.dist-info/LICENSE,sha256=qB9OdnyyF6WYHiEIXVm0rOSdcf8e2ctorrtWs6CC5lU,1062
5
- efibootdude-0.2.dist-info/METADATA,sha256=HuHORtrDzLH0ItVDm_UbRXsRVRSgBtyBcVEkzODKNCY,3380
6
- efibootdude-0.2.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
7
- efibootdude-0.2.dist-info/entry_points.txt,sha256=3KZ_86ZSy4f-weuSruTlMGaQ96jZUm7mjyITVnjE184,54
8
- efibootdude-0.2.dist-info/top_level.txt,sha256=BrMsK3JmOrVJUNkHX1dicqWrdjbm4itRtmXJMxte-VU,12
9
- efibootdude-0.2.dist-info/RECORD,,