/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include <stdio.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <dirent.h>
#include <pkgstrct.h>
#include <pkginfo.h>
#include <locale.h>
#include <libintl.h>
#include <pkglib.h>
#include "libinst.h"
#include "libadm.h"
#include "messages.h"
/*
* internal global variables
*/
static char type;
static char *rmpkginst;
static int errflg = 0;
static int nlist;
static int pkgexist;
static int pkgokay;
static int is_update;
/*
* IMPORTANT NOTE: THE SIZE OF 'abbrev' IS HARD CODED INTO THE CHARACTER
* ARRAY SSCANF_FORMAT -- YOU MUST UPDATE BOTH VALUES AT THE SAME TIME!!
*/
/*
* forward declarations
*/
/*
* *****************************************************************************
* global external (public) functions
* *****************************************************************************
*/
int
{
int i;
char *inst;
if (a_removeFlag) {
/* check removal dependencies */
goto done;
} else {
quit(99);
}
}
switch (type) {
case 'I':
case 'P':
if (a_removeFlag) {
continue;
}
break;
case 'R':
if (!a_removeFlag) {
continue;
}
break;
default:
errflg++;
break;
}
/* check to see if any versions listed are installed */
i = 0;
}
do {
pkgexist++;
pkgokay++;
}
} while (++i < nlist);
}
switch (type) {
case 'I':
break;
case 'P':
break;
case 'R':
}
}
done:
if (a_removeFlag) {
}
return (errflg);
}
void
setUpdate(void)
{
is_update = 1;
}
int
isUpdate(void)
{
return ((is_update) ? 1 : 0);
}
/*
* *****************************************************************************
* static internal (private) functions
* *****************************************************************************
*/
static void
{
if (!pkgexist)
return;
errflg++;
if (a_preinstallCheck == B_TRUE) {
return;
}
}
static void
{
register int i;
if (pkgokay) {
return;
}
errflg++;
if (a_preinstallCheck == B_TRUE) {
if (pkgexist) {
"prerequisite-incomplete=%s\n", pkginst);
} else {
"prerequisite-installed=%s\n", pkginst);
}
return;
}
if (pkgexist) {
pkgname);
} else {
pkgname);
if (nlist) {
}
for (i = 0; i < nlist; i++) {
(void) printf(" ");
if (alist[i])
if (vlist[i])
(void) printf("\n");
}
}
}
static void
{
if (!pkgexist)
return;
errflg++;
if (a_preinstallCheck == B_TRUE) {
"dependonme=%s", pkginst);
} else {
}
return;
}
} else {
pkgname);
}
}
static int
{
register int i, c, found;
for (i = 0; i < nlist; i++) {
if (alist[i]) {
}
if (vlist[i]) {
}
}
found = (-1);
nlist = 0;
return (1);
break;
pt++;
continue;
/* begin new definition */
/* LINTED variable format specifier to sscanf(): */
found++;
continue;
}
if (found < 0)
return (0);
if (*pt == '(') {
/* architecture is specified */
*new++ = '\0';
else
return (-1); /* bad specification */
}
pt++;
if (*pt) {
*pt = '\0';
}
found++;
nlist++;
}
return ((found >= 0) ? 1 : 0);
}
static void
{
return;
continue;
continue; /* others don't include me */
continue;
}
}
static void
{
register int i;
char *inst;
if (type != 'P')
continue;
continue;
/* see if package is installed */
i = 0;
}
pkgexist = 1;
do {
return;
}
}
} while (++i < nlist);
}
}