Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a stale_age to mkpidlock #1021

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/packages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ function install(spec::String, version::String = "";
# point PackageManager to the given pkg dir
Globals.PKGMAN_CustomPackageDir = GapObj(pkgdir)
mkpath(pkgdir)
Pidfile.mkpidlock("$pkgdir.lock") do
# pidlock timeout: 300 seconds = 5 minutes should suffice; about the
# slowest packages to install are Semigroups and NormalizInterface.
Pidfile.mkpidlock("$pkgdir.lock"; stale_age=300) do
if quiet || debug
oldlevel = Wrappers.InfoLevel(Globals.InfoPackageManager)
Wrappers.SetInfoLevel(Globals.InfoPackageManager, quiet ? 0 : 3)
Expand Down
2 changes: 1 addition & 1 deletion src/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function regenerate_gaproot()

# create the mutable gaproot
mkpath(gaproot_mutable)
Pidfile.mkpidlock("$gaproot_mutable.lock") do
Pidfile.mkpidlock("$gaproot_mutable.lock"; stale_age=10) do
# create fake sysinfo.gap
unquoted = Set(["GAParch", "GAP_ABI", "GAP_HPCGAP", "GAP_KERNEL_MAJOR_VERSION", "GAP_KERNEL_MINOR_VERSION", "GAP_OBJEXT"])
open("$gaproot_mutable/sysinfo.gap", "w") do file
Expand Down
Loading