Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177590862
D46990.1794808040.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D46990.1794808040.diff
View Options
Index: usr.sbin/pkg/pkg.c
===================================================================
--- usr.sbin/pkg/pkg.c
+++ usr.sbin/pkg/pkg.c
@@ -81,11 +81,7 @@
STAILQ_ENTRY(fingerprint) next;
};
-static const char *bootstrap_names [] = {
- "pkg.pkg",
- "pkg.txz",
- NULL
-};
+static const char *bootstrap_name = "pkg.txz";
STAILQ_HEAD(fingerprint_list, fingerprint);
@@ -770,7 +766,6 @@
const char *packagesite;
const char *signature_type;
char pkgstatic[MAXPATHLEN];
- const char *bootstrap_name;
fd_sig = -1;
ret = -1;
@@ -793,18 +788,12 @@
if (strncmp(URL_SCHEME_PREFIX, packagesite,
strlen(URL_SCHEME_PREFIX)) == 0)
packagesite += strlen(URL_SCHEME_PREFIX);
- for (int j = 0; bootstrap_names[j] != NULL; j++) {
- bootstrap_name = bootstrap_names[j];
-
- snprintf(url, MAXPATHLEN, "%s/Latest/%s", packagesite, bootstrap_name);
- snprintf(tmppkg, MAXPATHLEN, "%s/%s.XXXXXX",
- getenv("TMPDIR") ? getenv("TMPDIR") : _PATH_TMP,
- bootstrap_name);
- if ((fd_pkg = fetch_to_fd(url, tmppkg, fetchOpts)) != -1)
- break;
- bootstrap_name = NULL;
- }
- if (bootstrap_name == NULL)
+
+ snprintf(url, MAXPATHLEN, "%s/Latest/%s", packagesite, bootstrap_name);
+ snprintf(tmppkg, MAXPATHLEN, "%s/%s.XXXXXX",
+ getenv("TMPDIR") ? getenv("TMPDIR") : _PATH_TMP,
+ bootstrap_name);
+ if ((fd_pkg = fetch_to_fd(url, tmppkg, fetchOpts)) == -1)
goto fetchfail;
if (signature_type != NULL &&
@@ -855,11 +844,7 @@
goto cleanup;
fetchfail:
- for (int j = 0; bootstrap_names[j] != NULL; j++) {
- warnx("Attempted to fetch %s/Latest/%s", packagesite,
- bootstrap_names[j]);
- }
- warnx("Error: %s", fetchLastErrString);
+ warnx("Error fetching %s: %s", url, fetchLastErrString);
if (fetchLastErrCode == FETCH_RESOLV) {
fprintf(stderr, "Address resolution failed for %s.\n", packagesite);
fprintf(stderr, "Consider changing PACKAGESITE.\n");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 5:47 AM (15 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41763036
Default Alt Text
D46990.1794808040.diff (1 KB)
Attached To
Mode
D46990: pkg: retire backwards compatibility bootstrap support
Attached
Detach File
Event Timeline