Page MenuHomeFreeBSD

pkg: Retry the default name for better error if all fail
AbandonedPublic

Authored by emaste on Oct 7 2024, 3:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 12 2025, 11:49 PM
Unknown Object (File)
Feb 26 2025, 7:47 AM
Unknown Object (File)
Jan 26 2025, 12:24 PM
Unknown Object (File)
Jan 16 2025, 1:14 AM
Unknown Object (File)
Jan 15 2025, 11:05 PM
Unknown Object (File)
Jan 15 2025, 10:01 PM
Unknown Object (File)
Dec 3 2024, 7:47 PM
Unknown Object (File)
Nov 25 2024, 5:44 PM
Subscribers
None

Details

Reviewers
bapt
manu
bdrewery
Summary
pkg tries in order pkg.pkg and pkg.txz as bootstrap pkg names.  If both
fail to fetch the URL from the last attempt is printed, which can be
confusing if the error is unrelated to a missing file.  In the PR below
the failing URL was listed as
http://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/Latest/pkg.txz but the
error was EAI_ADDRFAMILY.  Presumably both pkg.pkg and pkg.txz failed
with the same error.

We could cache the URL and error information from the first bootstrap
attempt but it is a bit awkward; instead, just retry the default pkg.pkg
again as the final attempt.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped