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 command below generates a report against
|
||||||
the version numbers in the on-line ports collection:
|
the version numbers in the on-line ports collection:
|
||||||
.Pp
|
.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
|
.Pp
|
||||||
The command below generates a file of commands to run to update the installed
|
The command below generates a file of commands to run to update the installed
|
||||||
files.
|
files.
|
||||||
|
@ -41,7 +41,7 @@ $CurrentPackagesCommand = '/usr/sbin/pkg_info -aI';
|
|||||||
$CatProgram = "cat ";
|
$CatProgram = "cat ";
|
||||||
$FetchProgram = "fetch -o - ";
|
$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';
|
$IndexFile = 'file:/usr/ports/INDEX';
|
||||||
$ShowCommandsFlag = 0;
|
$ShowCommandsFlag = 0;
|
||||||
$DebugFlag = 0;
|
$DebugFlag = 0;
|
||||||
@ -226,14 +226,8 @@ if ($#ARGV >= 0) {
|
|||||||
$IndexFile = $ARGV[0];
|
$IndexFile = $ARGV[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
# Gross hack to get around a bug in fetch(1). When PR bin/7203 gets fixed,
|
# Determine what command to use to retrieve the index file.
|
||||||
# we can make a lot of this code go away...basically the problem is that
|
if ($IndexFile =~ m-^((http|ftp)://|file:/)-) {
|
||||||
# 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)://-) {
|
|
||||||
$IndexPackagesCommand = $FetchProgram . $IndexFile;
|
$IndexPackagesCommand = $FetchProgram . $IndexFile;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user