Commit 9c0a2f0d authored by Mike Hibler's avatar Mike Hibler

Packages. Why'd it have to be packages...

I changed the initscripts to use -e instead of -E since it seemed to
be common between both pkg_info and "pkg info". But alas, that was not
the case.
parent 69cc75fd
......@@ -116,8 +116,10 @@ my %packlist = ("libxml2>=2.6.26" => "/usr/ports/textproc/libxml2",
my $needpkgs = 0;
# Check for new package tools
my $pkgarg = "-E";
if (-x "/usr/sbin/pkg") {
$PKG_INFO = "/usr/sbin/pkg info -g";
$PKG_INFO = "/usr/sbin/pkg info";
$pkgarg = "-g -e";
}
foreach my $pkgname (sort(keys(%packlist))) {
......@@ -126,7 +128,7 @@ foreach my $pkgname (sort(keys(%packlist))) {
print STDERR "Checking for package $pkgname\n";
next
if (system("$PKG_INFO -e '${pkgname}*' >/dev/null") == 0);
if (system("$PKG_INFO $pkgarg '${pkgname}*' >/dev/null") == 0);
print STDERR "Please install $pkgdir\n";
$needpkgs++;
......
......@@ -177,14 +177,16 @@ my $needpkgs = 0;
Phase "ports", "Installing ports", sub {
# Check for new package tools
my $pkgarg = "-E";
if (-x "/usr/sbin/pkg") {
$PKG_INFO = "/usr/sbin/pkg info -g";
$PKG_INFO = "/usr/sbin/pkg info";
$pkgarg = "-g -e";
}
foreach my $pkgname (sort(keys(%packlist))) {
my $pkgdir = $packlist{$pkgname};
Phase "$pkgname", "Checking for $pkgname", sub {
if (!ExecQuiet("$PKG_INFO -e '${pkgname}*'")) {
if (!ExecQuiet("$PKG_INFO $pkgarg '${pkgname}*'")) {
PhaseSkip("Already installed");
}
ExecQuietFatal("cd $pkgdir; make -DBATCH install");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment