| author | |
| committer | |
| log | 387d550b6c3e73989513ea720437fdc5aac195d3 |
| tree | 6a3a309158ae082f024f6a694fef72d11c63c525 |
| parent | 076f7e5bd5389e159865d99e0e86edc905cffc42 |
has been fixed in the kernel code for a while now3 files changed, 2 insertions(+), 22 deletions(-)
lib/std/zig.zig-1| ... | ... | @@ -737,7 +737,6 @@ pub const EnvVar = enum { |
| 737 | 737 | ZIG_BUILD_MULTILINE_ERRORS, |
| 738 | 738 | ZIG_VERBOSE_LINK, |
| 739 | 739 | ZIG_VERBOSE_CC, |
| 740 | ZIG_BTRFS_WORKAROUND, | |
| 741 | 740 | ZIG_DEBUG_CMD, |
| 742 | 741 | ZIG_IS_DETECTING_LIBC_PATHS, |
| 743 | 742 | ZIG_IS_TRYING_TO_NOT_CALL_ITSELF, |
src/Package/Fetch.zig+1-12| ... | ... | @@ -129,7 +129,6 @@ pub const JobQueue = struct { |
| 129 | 129 | /// two hashes of the same package do not match. |
| 130 | 130 | /// If this is true, `recursive` must be false. |
| 131 | 131 | debug_hash: bool, |
| 132 | work_around_btrfs_bug: bool, | |
| 133 | 132 | mode: Mode, |
| 134 | 133 | /// Set of hashes that will be additionally fetched even if they are marked |
| 135 | 134 | /// as lazy. |
| ... | ... | @@ -524,16 +523,7 @@ fn runResource( |
| 524 | 523 | // Fetch and unpack a resource into a temporary directory. |
| 525 | 524 | var unpack_result = try unpackResource(f, resource, uri_path, tmp_directory); |
| 526 | 525 | |
| 527 | var pkg_path: Cache.Path = .{ .root_dir = tmp_directory, .sub_path = unpack_result.root_dir }; | |
| 528 | ||
| 529 | // Apply btrfs workaround if needed. Reopen tmp_directory. | |
| 530 | if (native_os == .linux and f.job_queue.work_around_btrfs_bug) { | |
| 531 | // https://github.com/ziglang/zig/issues/17095 | |
| 532 | pkg_path.root_dir.handle.close(io); | |
| 533 | pkg_path.root_dir.handle = cache_root.handle.createDirPathOpen(io, tmp_dir_sub_path, .{ | |
| 534 | .open_options = .{ .iterate = true }, | |
| 535 | }) catch @panic("btrfs workaround failed"); | |
| 536 | } | |
| 526 | const pkg_path: Cache.Path = .{ .root_dir = tmp_directory, .sub_path = unpack_result.root_dir }; | |
| 537 | 527 | |
| 538 | 528 | // Load, parse, and validate the unpacked build.zig.zon file. It is allowed |
| 539 | 529 | // for the file to be missing, in which case this fetched package is |
| ... | ... | @@ -2276,7 +2266,6 @@ const TestFetchBuilder = struct { |
| 2276 | 2266 | .recursive = false, |
| 2277 | 2267 | .read_only = false, |
| 2278 | 2268 | .debug_hash = false, |
| 2279 | .work_around_btrfs_bug = false, | |
| 2280 | 2269 | .mode = .needed, |
| 2281 | 2270 | }; |
| 2282 | 2271 |
src/main.zig+1-9| ... | ... | @@ -5098,8 +5098,6 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, |
| 5098 | 5098 | } |
| 5099 | 5099 | } |
| 5100 | 5100 | |
| 5101 | const work_around_btrfs_bug = native_os == .linux and | |
| 5102 | EnvVar.ZIG_BTRFS_WORKAROUND.isSet(environ_map); | |
| 5103 | 5101 | const root_prog_node = std.Progress.start(io, .{ |
| 5104 | 5102 | .disable_printing = (color == .off), |
| 5105 | 5103 | .root_name = "Compile Build Script", |
| ... | ... | @@ -5244,7 +5242,6 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, |
| 5244 | 5242 | .read_only = false, |
| 5245 | 5243 | .recursive = true, |
| 5246 | 5244 | .debug_hash = false, |
| 5247 | .work_around_btrfs_bug = work_around_btrfs_bug, | |
| 5248 | 5245 | .unlazy_set = unlazy_set, |
| 5249 | 5246 | .mode = fetch_mode, |
| 5250 | 5247 | }; |
| ... | ... | @@ -5254,9 +5251,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, io: Io, args: []const []const u8, |
| 5254 | 5251 | job_queue.global_cache = .{ |
| 5255 | 5252 | .path = p, |
| 5256 | 5253 | .handle = Io.Dir.cwd().openDir(io, p, .{}) catch |err| { |
| 5257 | fatal("unable to open system package directory '{s}': {s}", .{ | |
| 5258 | p, @errorName(err), | |
| 5259 | }); | |
| 5254 | fatal("unable to open system package directory '{s}': {t}", .{ p, err }); | |
| 5260 | 5255 | }, |
| 5261 | 5256 | }; |
| 5262 | 5257 | job_queue.read_only = true; |
| ... | ... | @@ -6938,8 +6933,6 @@ fn cmdFetch( |
| 6938 | 6933 | dev.check(.fetch_command); |
| 6939 | 6934 | |
| 6940 | 6935 | const color: Color = .auto; |
| 6941 | const work_around_btrfs_bug = native_os == .linux and | |
| 6942 | EnvVar.ZIG_BTRFS_WORKAROUND.isSet(environ_map); | |
| 6943 | 6936 | var opt_path_or_url: ?[]const u8 = null; |
| 6944 | 6937 | var override_global_cache_dir: ?[]const u8 = EnvVar.ZIG_GLOBAL_CACHE_DIR.get(environ_map); |
| 6945 | 6938 | var debug_hash: bool = false; |
| ... | ... | @@ -7010,7 +7003,6 @@ fn cmdFetch( |
| 7010 | 7003 | .recursive = false, |
| 7011 | 7004 | .read_only = false, |
| 7012 | 7005 | .debug_hash = debug_hash, |
| 7013 | .work_around_btrfs_bug = work_around_btrfs_bug, | |
| 7014 | 7006 | .mode = .all, |
| 7015 | 7007 | }; |
| 7016 | 7008 | defer job_queue.deinit(); |