Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtme: use $MODDIR/modules.dep to check the module folder
If vng is interrupted during the virtme-prep-kdir-mods command, the next time we run vng we'll get the following error report: Traceback (most recent call last): File "/usr/bin/virtme-run", line 33, in <module> sys.exit(load_entry_point('virtme-ng==1.19', 'console_scripts', 'virtme-run')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/virtme/commands/run.py", line 1314, in main return do_it() ^^^^^^^ File "/usr/lib/python3/dist-packages/virtme/commands/run.py", line 783, in do_it kernel = find_kernel_and_mods(arch, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/virtme/commands/run.py", line 486, in find_kernel_and_mods if not os.path.exists(virtme_mods) or is_file_more_recent( ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/virtme/commands/run.py", line 307, in is_file_more_recent return os.stat(a).st_mtime > os.stat(b).st_mtime ^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: './.virtme_mods/lib/modules/0.0.0/modules.dep' This is because the .virtme_mods folder has been created while the .virtme_mods/lib/modules/0.0.0/modules.dep file is still missing. So use the $MODDIR/modules.dep file to check if virtme's kernel modules directory needs to be updated. This fixes issue arighi#87: amluto/virtme#87 Signed-off-by: Winston Wen <[email protected]>
- Loading branch information