Remove a workaround for a long-fixed bug in fetch(1).
Update URL for on-line Ports Collection INDEX file.
This commit is contained in:
parent
b30e6e0b06
commit
f6a5d847fc
@ -123,7 +123,7 @@ index file:
|
||||
The command below generates a report against
|
||||
the version numbers in the on-line ports collection:
|
||||
.Pp
|
||||
.Dl % pkg_version ftp://ftp.FreeBSD.org/pub/FreeBSD/ports-current/INDEX
|
||||
.Dl % pkg_version ftp://ftp.FreeBSD.org/pub/FreeBSD/branches/-current/ports/INDEX
|
||||
.Pp
|
||||
The command below generates a file of commands to run to update the installed
|
||||
files.
|
||||
|
@ -41,7 +41,7 @@ $CurrentPackagesCommand = '/usr/sbin/pkg_info -aI';
|
||||
$CatProgram = "cat ";
|
||||
$FetchProgram = "fetch -o - ";
|
||||
|
||||
#$indexFile = "ftp://ftp.freebsd.org/pub/FreeBSD/ports-current/INDEX";
|
||||
#$indexFile = "ftp://ftp.freebsd.org/pub/FreeBSD/branches/-current/ports/INDEX";
|
||||
$IndexFile = 'file:/usr/ports/INDEX';
|
||||
$ShowCommandsFlag = 0;
|
||||
$DebugFlag = 0;
|
||||
@ -226,14 +226,8 @@ if ($#ARGV >= 0) {
|
||||
$IndexFile = $ARGV[0];
|
||||
}
|
||||
|
||||
# Gross hack to get around a bug in fetch(1). When PR bin/7203 gets fixed,
|
||||
# we can make a lot of this code go away...basically the problem is that
|
||||
# we can't depend on "fetch -o -" to do the right thing with files in the
|
||||
# filesystem.
|
||||
if ($IndexFile =~ s-^file:/-/-) {
|
||||
$IndexPackagesCommand = $CatProgram . $IndexFile;
|
||||
}
|
||||
elsif ($IndexFile =~ m-^(http|ftp)://-) {
|
||||
# Determine what command to use to retrieve the index file.
|
||||
if ($IndexFile =~ m-^((http|ftp)://|file:/)-) {
|
||||
$IndexPackagesCommand = $FetchProgram . $IndexFile;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user