summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorbmah <bmah@FreeBSD.org>2000-09-09 21:45:19 +0000
committerbmah <bmah@FreeBSD.org>2000-09-09 21:45:19 +0000
commitb9a0a919436adb24714fc6d749eb7d7da761e91f (patch)
tree60cc25b51dd00ced6958a235c226db9769959913 /usr.sbin/pkg_install
parentcda24837e2ce57cf108d082132500a6b9ab8c660 (diff)
downloadFreeBSD-src-b9a0a919436adb24714fc6d749eb7d7da761e91f.zip
FreeBSD-src-b9a0a919436adb24714fc6d749eb7d7da761e91f.tar.gz
Remove a workaround for a long-fixed bug in fetch(1).
Update URL for on-line Ports Collection INDEX file.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/version/pkg_version.12
-rwxr-xr-xusr.sbin/pkg_install/version/pkg_version.pl12
2 files changed, 4 insertions, 10 deletions
diff --git a/usr.sbin/pkg_install/version/pkg_version.1 b/usr.sbin/pkg_install/version/pkg_version.1
index 71c27ba..d104748 100644
--- a/usr.sbin/pkg_install/version/pkg_version.1
+++ b/usr.sbin/pkg_install/version/pkg_version.1
@@ -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.
diff --git a/usr.sbin/pkg_install/version/pkg_version.pl b/usr.sbin/pkg_install/version/pkg_version.pl
index ed05c3d..d94d108 100755
--- a/usr.sbin/pkg_install/version/pkg_version.pl
+++ b/usr.sbin/pkg_install/version/pkg_version.pl
@@ -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 {
OpenPOWER on IntegriCloud