Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: './.virtme_mods/lib/modules/0.0.0/modules.dep' #87

Open
cng3s opened this issue May 21, 2023 · 1 comment

Comments

@cng3s
Copy link

cng3s commented May 21, 2023

# virtme-configkernel --arch=x86_64 --defconfig
# make ARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- -j12
# virtme-run --kdir .
Traceback (most recent call last):
  File "/usr/local/bin/virtme-run", line 33, in <module>
    sys.exit(load_entry_point('virtme==0.1.1', 'console_scripts', 'virtme-run')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/virtme-0.1.1-py3.11.egg/virtme/commands/run.py", line 587, in main
    return do_it()
           ^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/virtme-0.1.1-py3.11.egg/virtme/commands/run.py", line 273, in do_it
    kernel = find_kernel_and_mods(arch, args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/virtme-0.1.1-py3.11.egg/virtme/commands/run.py", line 201, in find_kernel_and_mods
    is_file_more_recent(mod_file, virtme_mod_file):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/virtme-0.1.1-py3.11.egg/virtme/commands/run.py", line 135, 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'

@marcosps
Copy link
Contributor

@cng3s unfortunately the maintainer of virtme is not looking at issues anymore. Would you please check if the same bug exists on https://github.com/arighi/virtme-ng ? virtme-ng is an effort of maintain virtme and also create another tool on top of it.

winnscode added a commit to winnscode/virtme-ng that referenced this issue Feb 2, 2024
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]>
winnscode added a commit to winnscode/virtme-ng that referenced this issue Feb 2, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants