Skip to content

Commit

Permalink
Merge branch 'fix-cleanup-deps' into mg/go-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Apr 20, 2021
2 parents e36eac6 + 2aae2c1 commit 8e1f7b3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
6 changes: 4 additions & 2 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinaryBuilderBase]]
deps = ["CodecZlib", "Downloads", "InteractiveUtils", "JSON", "LibGit2", "Libdl", "Logging", "OutputCollectors", "Pkg", "Random", "SHA", "Scratch", "SimpleBufferStream", "TOML", "Tar", "UUIDs", "p7zip_jll", "pigz_jll"]
git-tree-sha1 = "f229af963794c6464ac1e17788faea4729abdb06"
git-tree-sha1 = "19f284061d723e0f4e172f349cdcfca2de065222"
repo-rev = "mg/rootfs"
repo-url = "https://github.com/JuliaPackaging/BinaryBuilderBase.jl.git"
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
version = "0.5.2"
version = "0.6.0"

[[CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"

[compat]
ArgParse = "1.1"
BinaryBuilderBase = "0.5"
BinaryBuilderBase = "0.6"
GitHub = "5.1"
HTTP = "0.8, 0.9"
JLD2 = "0.1.6, 0.2, 0.3, 0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/AutoBuild.jl
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ function autobuild(dir::AbstractString,
end

# Unsymlink all the deps from the dest_prefix
cleanup_dependencies(prefix, host_artifact_paths)
cleanup_dependencies(prefix, target_artifact_paths)
cleanup_dependencies(prefix, host_artifact_paths, default_host_platform)
cleanup_dependencies(prefix, target_artifact_paths, concrete_platform)

# Search for dead links in dest_prefix; raise warnings about them.
Auditor.warn_deadlinks(dest_prefix.path)
Expand Down
16 changes: 8 additions & 8 deletions src/wizard/interactive_build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ function step3_interactive(state::WizardState, prefix::Prefix,
platform::AbstractPlatform,
ur::Runner, build_path::AbstractString, artifact_paths::Vector{String})

concrete_platform = get_concrete_platform(platform, state)
if interactive_build(state, prefix, ur, build_path, platform)
# Unsymlink all the deps from the dest_prefix before moving to the next step
cleanup_dependencies(prefix, artifact_paths)
cleanup_dependencies(prefix, artifact_paths, concrete_platform)
state.step = :step3_retry
else
concrete_platform = get_concrete_platform(platform, state)
step3_audit(state, platform, destdir(prefix, concrete_platform))
# Unsymlink all the deps from the dest_prefix before moving to the next step
cleanup_dependencies(prefix, artifact_paths)
cleanup_dependencies(prefix, artifact_paths, concrete_platform)
return step4(state, ur, platform, build_path, prefix)
end
end
Expand Down Expand Up @@ -451,7 +451,7 @@ function step3_retry(state::WizardState)
end
step3_audit(state, platform, destdir(prefix, concrete_platform))
# Unsymlink all the deps from the dest_prefix before moving to the next step
cleanup_dependencies(prefix, artifact_paths)
cleanup_dependencies(prefix, artifact_paths, concrete_platform)

return step4(state, ur, platform, build_path, prefix)
end
Expand Down Expand Up @@ -566,7 +566,7 @@ function step5_internal(state::WizardState, platform::AbstractPlatform)
concrete_platform = get_concrete_platform(platform, state)
prefix = setup_workspace(build_path, vcat(state.source_files, state.patches), concrete_platform; verbose=true)
# Clean up artifacts in case there are some
cleanup_dependencies(prefix, get(prefix_artifacts, prefix, String[]))
cleanup_dependencies(prefix, get(prefix_artifacts, prefix, String[]), concrete_platform)
artifact_paths = setup_dependencies(prefix, getpkg.(state.dependencies), concrete_platform; verbose=true)
# Record newly added artifacts for this prefix
prefix_artifacts[prefix] = artifact_paths
Expand Down Expand Up @@ -642,7 +642,7 @@ function step5_internal(state::WizardState, platform::AbstractPlatform)
verbose=true,
)
# Clean up artifacts in case there are some
cleanup_dependencies(prefix, get(prefix_artifacts, prefix, String[]))
cleanup_dependencies(prefix, get(prefix_artifacts, prefix, String[]), concrete_platform)
artifact_paths = setup_dependencies(prefix, getpkg.(state.dependencies), platform; verbose=true)
# Record newly added artifacts for this prefix
prefix_artifacts[prefix] = artifact_paths
Expand Down Expand Up @@ -698,7 +698,7 @@ function step5_internal(state::WizardState, platform::AbstractPlatform)
end
# Unsymlink all the deps from the prefixes before moving to the next step
for (prefix, paths) in prefix_artifacts
cleanup_dependencies(prefix, paths)
cleanup_dependencies(prefix, paths, get_concrete_platform(platform, state))
end
return ok
end
Expand Down Expand Up @@ -810,7 +810,7 @@ function step5c(state::WizardState)
end

# Unsymlink all the deps from the prefix before moving to the next platform
cleanup_dependencies(prefix, artifact_paths)
cleanup_dependencies(prefix, artifact_paths, concrete_platform)

print(state.outs, "[")
if ok
Expand Down

0 comments on commit 8e1f7b3

Please sign in to comment.