1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-27 10:03:20 +00:00

If no CVS root was specified, but a (possibly out-of-date) ports tree

already exists, use the CVS root specified by $portsdir/CVS/Root.
This commit is contained in:
Dag-Erling Smørgrav 2003-10-01 15:15:37 +00:00
parent fbe4682972
commit 4888ea6fbb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=89985
6 changed files with 24 additions and 6 deletions

View File

@ -8,7 +8,7 @@
#
PORTNAME= porteasy
PORTVERSION= 2.7.9
PORTVERSION= 2.7.10
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none

View File

@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd July 21, 2003
.Dd October 1, 2003
.Dt PORTEASY 8
.Os
.Sh NAME

View File

@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
my $VERSION = "2.7.9";
my $VERSION = "2.7.10";
my $COPYRIGHT = "Copyright (c) 2000-2003 Dag-Erling Smørgrav. " .
"All rights reserved.";
@ -1119,6 +1119,15 @@ MAIN:{
if (!$cvsroot) {
$cvsroot = $ENV{'CVSROOT'};
}
if (!$cvsroot && -f "$portsdir/CVS/Root") {
local *FILE;
if (sysopen(FILE, "$portsdir/CVS/Root", O_RDONLY)) {
$cvsroot = <FILE>;
chomp($cvsroot);
close(FILE);
}
}
if ($update && !$cvsroot) {
bsd::errx(1, "No CVS root, please use the -r option or set \$CVSROOT");
}

View File

@ -8,7 +8,7 @@
#
PORTNAME= porteasy
PORTVERSION= 2.7.9
PORTVERSION= 2.7.10
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none

View File

@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd July 21, 2003
.Dd October 1, 2003
.Dt PORTEASY 8
.Os
.Sh NAME

View File

@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
my $VERSION = "2.7.9";
my $VERSION = "2.7.10";
my $COPYRIGHT = "Copyright (c) 2000-2003 Dag-Erling Smørgrav. " .
"All rights reserved.";
@ -1119,6 +1119,15 @@ MAIN:{
if (!$cvsroot) {
$cvsroot = $ENV{'CVSROOT'};
}
if (!$cvsroot && -f "$portsdir/CVS/Root") {
local *FILE;
if (sysopen(FILE, "$portsdir/CVS/Root", O_RDONLY)) {
$cvsroot = <FILE>;
chomp($cvsroot);
close(FILE);
}
}
if ($update && !$cvsroot) {
bsd::errx(1, "No CVS root, please use the -r option or set \$CVSROOT");
}