Menu

#2 pkg_upgrade fails to retrieve INDEX for FreeBSD-9.0-RELEASE

open
nobody
None
5
2012-02-07
2012-02-07
Alvin Poon
No

# pkg_upgrade -aC
fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-release/INDEX:
File unavailable (e.g., file not found, no access)
#

It appears to be a problem with the name "packages-9-release", as the
folder available on FTP is actually "packages-9.0-release". (note the
.0 in the version) Once the system switches to stable releases such
as "packages-9-stable" it should work fine. (as packages-9-stable is
available on FTP)

The problem is found in /usr/local/sbin/uma, line 76 onwards:

71 # Logic from src/usr.sbin/pkg_install/add/main.c, plus the
possibility to
72 # override the architecture with ARCH.
73 : ${PACKAGEROOT="ftp://ftp.freebsd.org"}
74 : ${ARCH="$(uname -m)"}
75 branch="$(uname -r | tr '[:upper:]' '[:lower:]')"
76 number="${branch%%.*}"
77 branch="${branch##*-}"
78 case "$branch" in
79 release)
80 branch=$number-$branch
81 ;;
82 stable|current)
83 branch=${number%%.*}-$branch
84 ;;
85 *)
86 # Fallback to stable for prerelease and the like.
87 branch=${number%%.*}-stable
88 ;;
89 esac

It arbitrarily removed the .x minor version from the number. It
should have been "number=${branch%%-*}", since the minor version is
further stripped off in the following case statements depending on the
branch.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.