Skip to content

Commit ee835d5

Browse files
committed
Let pkg create its own dbdir
This fixes an issue when running pkgbasify with a non-default umask of, e.g. 007. Closes: #12 Sponsored by: The FreeBSD Foundation
1 parent 2fef066 commit ee835d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkgbasify.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ function setup_conversion(workdir)
7979

8080
-- Use a temporary pkg db until we are sure we will carry through with the
8181
-- conversion to avoid polluting the standard one.
82+
-- Let pkg handle actually creating the pkgdb directory so that it sets the
83+
-- permissions it expects and does not error out due to a "too lax" umask.
8284
local tmp_db = workdir .. "/pkgdb/"
83-
assert(os.execute("mkdir -p " .. tmp_db))
8485

8586
-- Use a temporary repo configuration file for the setup phase so that there
8687
-- is nothing to clean up on failure.

0 commit comments

Comments
 (0)