@@ -268,8 +268,6 @@ def validate_config(self, conf, mod):
268
268
print (configs ["m" ])
269
269
raise RuntimeError (f"{ self .name ()} : Configuration mismatach between codestreams. Aborting." )
270
270
271
-
272
- # Return only the name of the module to be livepatched
273
271
def find_obj_path (self , arch , mod ):
274
272
# Return the path if the modules was previously found for ARCH, or refetch if
275
273
# the obejct is for a different architecture
@@ -291,15 +289,12 @@ def find_obj_path(self, arch, mod):
291
289
if not obj_match :
292
290
raise RuntimeError (f"{ self .name ()} -{ arch } ({ self .kernel } ): Module not found: { mod } " )
293
291
294
- # modules.order will show the module with suffix .o, so
295
- # make sure the extension. Also check for multiple extensions since we
296
- # can have modules being compressed using different algorithms.
297
- for ext in [".ko" , ".ko.zst" , ".ko.gz" ]:
298
- obj = str (PurePath (obj_match .group (1 )).with_suffix (ext ))
299
- if Path (mod_path , obj ).exists ():
300
- break
292
+ # modules.order will show the module with suffix .o, so make sure the extension.
293
+ obj_path = mod_path / (PurePath (obj_match .group (1 )).with_suffix (".ko" ))
294
+ # Make sure that the .ko file exists
295
+ assert obj_path .exists (), f"Module { str (obj_path )} doesn't exists. Aborting"
301
296
302
- return Path ( mod_path , obj ) .relative_to (get_datadir (arch ))
297
+ return obj_path .relative_to (get_datadir (arch ))
303
298
304
299
305
300
def lp_out_file (self , lp_name , fname ):
0 commit comments