Skip to content

clean up tmp/ more strictly on pre-bootstrap failures #262

@bittorf

Description

@bittorf

$ ./rootfs.py --qemu --external-sources

Bootstrapping x86 -- SysA
[sudo] Passwort für bastian: 
mke2fs 1.46.6 (1-Feb-2023)
Discarding device blocks: done                            
Creating filesystem with 2096896 4k blocks and 524288 inodes
Filesystem UUID: 63f8e09f-6955-4a2e-a2f1-3205de645291
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

Downloading: autoconf-2.71.tar.xz
Downloading: nss-3.86.tar.gz
Downloading: libffi-3.3.tar.gz
...
Downloading: gnulib-7daa86f.tar.gz
Traceback (most recent call last):
  File "/home/bastian/software/live-bootstrap/./rootfs.py", line 225, in <module>
    main()
  File "/home/bastian/software/live-bootstrap/./rootfs.py", line 145, in main
    bootstrap(args, system_a, system_c, tmpdir)
  File "/home/bastian/software/live-bootstrap/./rootfs.py", line 210, in bootstrap
    system_c.prepare(create_disk_image=True)
  File "/home/bastian/software/live-bootstrap/sysc.py", line 44, in prepare
    self.get_packages(source_manifest)
  File "/home/bastian/software/live-bootstrap/lib/sysgeneral.py", line 75, in get_packages
    path = self.download_file(line[2], line[1], line[3])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bastian/software/live-bootstrap/lib/sysgeneral.py", line 67, in download_file
    raise requests.HTTPError("Download failed.")
requests.exceptions.HTTPError: Download failed.
Unmounting sysc
umount: sysc: nicht eingehängt
Bootstrapping failed
Exception ignored in: <function Tmpdir.__del__ at 0x7ff1a821b920>
Traceback (most recent call last):
  File "/home/bastian/software/live-bootstrap/lib/tmpdir.py", line 43, in __del__
    umount(path)
  File "/home/bastian/software/live-bootstrap/lib/utils.py", line 48, in umount
    run('sudo', 'umount', '--recursive', target, **kwargs)
  File "/home/bastian/software/live-bootstrap/lib/utils.py", line 26, in run
    sys.exit(1)
SystemExit: 1

OK, download error? try again:
$ ./rootfs.py --qemu --external-sources

Bootstrapping x86 -- SysA
[sudo] Passwort für bastian: 
mke2fs 1.46.6 (1-Feb-2023)
/dev/loop3p1 contains a ext4 file system
	last mounted on Sat Mar 11 13:10:34 2023
Proceed anyway? (y,N) y
Discarding device blocks: done                            
Creating filesystem with 2096896 4k blocks and 524288 inodes
Filesystem UUID: 05c0ce8a-2689-4171-ad88-572ad471b4d4
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

Traceback (most recent call last):
  File "/home/bastian/software/live-bootstrap/./rootfs.py", line 225, in <module>
    main()
  File "/home/bastian/software/live-bootstrap/./rootfs.py", line 145, in main
    bootstrap(args, system_a, system_c, tmpdir)
  File "/home/bastian/software/live-bootstrap/./rootfs.py", line 210, in bootstrap
    system_c.prepare(create_disk_image=True)
  File "/home/bastian/software/live-bootstrap/sysc.py", line 40, in prepare
    rootfs_dir = self._tmpdir.mount_disk("sysc")
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bastian/software/live-bootstrap/lib/tmpdir.py", line 85, in mount_disk
    os.mkdir(mountpoint)
FileExistsError: [Errno 17] File exists: '/home/bastian/software/live-bootstrap/tmp/sysc_mnt'
Detaching /dev/loop3
Removing /home/bastian/software/live-bootstrap/tmp

What to do now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions