]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix wrong type to link_output 282/head
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 6 Nov 2018 08:25:36 +0000 (00:25 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 6 Nov 2018 15:48:16 +0000 (07:48 -0800)
$ sudo mkosi --default /dev/null -d fedora -r 29 -t directory -p dnf
...
Traceback (most recent call last):
  File "/bin/mkosi", line 3959, in <module>
    main()
  File "/bin/mkosi", line 3949, in main
    build_stuff(args)
  File "/bin/mkosi", line 3809, in build_stuff
    link_output(args, workspace, raw or tar)
  File "/bin/mkosi", line 2478, in link_output
    os.rename(os.path.join(workspace, "root"), args.output)
  File "/usr/lib64/python3.7/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not TemporaryDirectory

mkosi

diff --git a/mkosi b/mkosi
index a78b71ff472dfa300c61f6a0ee6048ef7846e561..0800bd329676344aa60b57a0c564881f98a22aed 100755 (executable)
--- a/mkosi
+++ b/mkosi
@@ -3718,7 +3718,7 @@ def build_stuff(args: CommandLineArguments) -> None:
     signature = calculate_signature(args, checksum)
     bmap = calculate_bmap(args, raw)
 
-    link_output(args, workspace, raw or tar)
+    link_output(args, workspace.name, raw or tar)
 
     link_output_root_hash_file(args, root_hash_file.name if root_hash_file is not None else None)