summaryrefslogtreecommitdiff
path: root/usr/src/cmd
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@nexenta.com>2010-11-15 20:03:27 -0800
committerGarrett D'Amore <garrett@nexenta.com>2010-11-15 20:03:27 -0800
commit4656d4747c8743290bfbe910c64cd75eb4e4af8d (patch)
tree241d8b3f0b8796e33937c6a27c670eba002f8f04 /usr/src/cmd
parent60bec29ea42d65ac648c69b0fb189273e286ca57 (diff)
downloadillumos-joyent-4656d4747c8743290bfbe910c64cd75eb4e4af8d.tar.gz
420 remove patch (sparse package) support from svr4 pkg
421 libpkg and libadm need to be lint clean Reviewed by: gwr@nexenta.com Reviewed by: peter.tribble@gmail.com Approved by: gwr@nexenta.com
Diffstat (limited to 'usr/src/cmd')
-rw-r--r--usr/src/cmd/svr4pkg/hdrs/libinst.h2
-rw-r--r--usr/src/cmd/svr4pkg/hdrs/messages.h3
-rw-r--r--usr/src/cmd/svr4pkg/libinst/dockdeps.c13
-rw-r--r--usr/src/cmd/svr4pkg/pkgadd/main.c59
-rw-r--r--usr/src/cmd/svr4pkg/pkgadm/pkgadm.h5
-rw-r--r--usr/src/cmd/svr4pkg/pkgadm/pkgadm_msgs.h3
-rw-r--r--usr/src/cmd/svr4pkg/pkgcond/main.c20
-rw-r--r--usr/src/cmd/svr4pkg/pkgcond/pkgcond.h2
-rw-r--r--usr/src/cmd/svr4pkg/pkginstall/main.c136
-rw-r--r--usr/src/cmd/svr4pkg/pkginstall/merginfo.c51
-rw-r--r--usr/src/cmd/svr4pkg/pkginstall/quit.c32
-rw-r--r--usr/src/cmd/svr4pkg/pkgremove/check.c21
12 files changed, 68 insertions, 279 deletions
diff --git a/usr/src/cmd/svr4pkg/hdrs/libinst.h b/usr/src/cmd/svr4pkg/hdrs/libinst.h
index 2e68af845b..38d16018ad 100644
--- a/usr/src/cmd/svr4pkg/hdrs/libinst.h
+++ b/usr/src/cmd/svr4pkg/hdrs/libinst.h
@@ -239,8 +239,6 @@ extern int finalck __P((struct cfent *ept, int attrchg, int contchg,
/* dockdeps.c */
extern void setUpdate __P((void));
extern int isUpdate __P((void));
-extern void setPatchUpdate __P((void));
-extern int isPatchUpdate __P((void));
/* mntinfo.c */
extern int get_mntinfo __P((int map_client, char *vfstab_file));
diff --git a/usr/src/cmd/svr4pkg/hdrs/messages.h b/usr/src/cmd/svr4pkg/hdrs/messages.h
index b7cacff640..67b2f9bf34 100644
--- a/usr/src/cmd/svr4pkg/hdrs/messages.h
+++ b/usr/src/cmd/svr4pkg/hdrs/messages.h
@@ -537,7 +537,6 @@ extern "C" {
#define ERR_OPRESVR4 gettext("unable to unlink options file <%s>")
#define ERR_OUTPUT_WRITING gettext("error while writing file <%s>: (%d) %s")
#define ERR_PACKAGEBINREN gettext("unable to rename <%s>\n\tto <%s>")
-#define ERR_PATCHPKG gettext("unable to update patch_table with patches that have been pre installed")
#define ERR_PATH gettext("the path <%s> is invalid!")
#define ERR_PKGABRV gettext("illegal package abbreviation <%s> in dependency file")
#define ERR_PKGADDCHK_CNFFAILED gettext("Conflicting file dependency checking failed.")
@@ -670,7 +669,6 @@ extern "C" {
#define ERR_WTMPFILE gettext("unable to write temporary file <%s>")
#define ERR_ZONETEMPDIR gettext("unable to make temporary directory for non-global zone operations in directory <%s>: %s")
#define ERR_Z_USED_IN_NONGLOBAL_ZONE gettext("the zonelist option may not be used in a non-global zone")
-#define ERR_PKGINFO_COPY gettext("unable to copy %s to %s")
#define ERR_CANNOT_ENABLE_LOCAL_FS gettext("Failed to enable the filesystem/local service.\n")
#define ERR_CANNOT_RESTORE_LOCAL_FS gettext("Failed to bring the filesystem/local service back to its original state.\n")
@@ -838,7 +836,6 @@ extern "C" {
#define WRN_INSTVOL_NOTDIR gettext("WARNING: %s may not overwrite a populated directory.")
#define WRN_INSTVOL_NOVERIFY gettext("WARNING: %s <cannot install to or verify on %s>")
#define WRN_NOMAIL gettext("WARNING: unable to send e-mail notification")
-#define WRN_PKGREMOVE_PATCHES gettext("\\nWARNING: The following patch(es) are installed to <%s>. If <%s> is removed, the patches applied to it will be removed as well leaving the patch partially installed. It is recommended that the patch(es) be removed before removing <%s>.\\n\\t%s")
#define WRN_RELATIVE gettext("attempting to rename a relative file <%s>")
#define WRN_RSCRIPTALT_BAD gettext("WARNING: the admin parameter <%s> is set to <%s> which is not recognized; the parameter may only be set to <%s> or <%s>")
#define WRN_RSCRIPTALT_USING gettext("WARNING: the admin parameter <%s> is assumed to be set to <%s>")
diff --git a/usr/src/cmd/svr4pkg/libinst/dockdeps.c b/usr/src/cmd/svr4pkg/libinst/dockdeps.c
index e3fd981ffd..7f469f7d72 100644
--- a/usr/src/cmd/svr4pkg/libinst/dockdeps.c
+++ b/usr/src/cmd/svr4pkg/libinst/dockdeps.c
@@ -67,7 +67,6 @@ static int nlist;
static int pkgexist;
static int pkgokay;
static int is_update;
-static int is_patch_update;
/*
* IMPORTANT NOTE: THE SIZE OF 'abbrev' IS HARD CODED INTO THE CHARACTER
@@ -188,18 +187,6 @@ done:
}
void
-setPatchUpdate(void)
-{
- is_patch_update = 1;
-}
-
-int
-isPatchUpdate(void)
-{
- return ((is_patch_update) ? 1 : 0);
-}
-
-void
setUpdate(void)
{
is_update = 1;
diff --git a/usr/src/cmd/svr4pkg/pkgadd/main.c b/usr/src/cmd/svr4pkg/pkgadd/main.c
index a589dd389e..9917fb5253 100644
--- a/usr/src/cmd/svr4pkg/pkgadd/main.c
+++ b/usr/src/cmd/svr4pkg/pkgadd/main.c
@@ -165,10 +165,6 @@ static boolean_t debugFlag = B_FALSE;
static boolean_t globalZoneOnly = B_FALSE;
-/* Set by -O patchPkgRemoval */
-
-static boolean_t patchPkgRemoval = B_FALSE;
-
/*
* Assume the package is ABI and POSIX compliant as regards user
* interactiion during procedure scripts.
@@ -624,27 +620,6 @@ main(int argc, char **argv)
continue;
}
- /*
- * Private interface: package is being
- * installed as a patch package.
- */
-
- if (strcmp(p, "patchPkgInstall") == 0) {
- setPatchUpdate();
- continue;
- }
-
- /*
- * If this is a patch removal
- * then call setPatchUpdate() and set
- * patchPkgRemoval flag.
- */
- if (strcmp(p, "patchPkgRemoval") == 0) {
- setPatchUpdate();
- patchPkgRemoval = B_TRUE;
- continue;
- }
-
if (strncmp(p, "zonelist=", 9) == 0) {
/*
* If colons used as separators,
@@ -1661,16 +1636,6 @@ pkgZoneCheckInstall(char *a_zoneName, zone_state_t a_zoneState,
arg[nargs++] = "-O";
arg[nargs++] = "addzonename";
- if (isPatchUpdate()) {
- if (patchPkgRemoval == B_TRUE) {
- arg[nargs++] = "-O";
- arg[nargs++] = "patchPkgRemoval";
- } else {
- arg[nargs++] = "-O";
- arg[nargs++] = "patchPkgInstall";
- }
- }
-
/*
* add parent zone info/type
*/
@@ -2009,16 +1974,6 @@ pkgZoneInstall(char *a_zoneName, zone_state_t a_zoneState, char *a_idsName,
arg[nargs++] = "-O";
arg[nargs++] = "addzonename";
- if (isPatchUpdate()) {
- if (patchPkgRemoval == B_TRUE) {
- arg[nargs++] = "-O";
- arg[nargs++] = "patchPkgRemoval";
- } else {
- arg[nargs++] = "-O";
- arg[nargs++] = "patchPkgInstall";
- }
- }
-
/*
* add parent zone info/type
*/
@@ -2187,18 +2142,6 @@ pkgInstall(char *a_altRoot, char *a_idsName, char *a_pkgDir, char *a_altBinDir)
arg[nargs++] = "debug";
}
- /* Installation is from a patch package. */
-
- if (isPatchUpdate()) {
- if (patchPkgRemoval == B_TRUE) {
- arg[nargs++] = "-O";
- arg[nargs++] = "patchPkgRemoval";
- } else {
- arg[nargs++] = "-O";
- arg[nargs++] = "patchPkgInstall";
- }
- }
-
arg[nargs++] = "-O";
arg[nargs++] = pkgmodeargument(pkgservergetmode());
@@ -2386,7 +2329,7 @@ pkgInstall(char *a_altRoot, char *a_idsName, char *a_pkgDir, char *a_altBinDir)
arg[nargs++] = a_idsName;
arg[nargs++] = "-p";
ds_close(1);
- ds_putinfo(buffer);
+ ds_putinfo(buffer, sizeof (buffer));
arg[nargs++] = buffer;
} else if (pkgdev.mount != NULL) {
arg[nargs++] = "-d";
diff --git a/usr/src/cmd/svr4pkg/pkgadm/pkgadm.h b/usr/src/cmd/svr4pkg/pkgadm/pkgadm.h
index 5e5c0616b0..8911389517 100644
--- a/usr/src/cmd/svr4pkg/pkgadm/pkgadm.h
+++ b/usr/src/cmd/svr4pkg/pkgadm/pkgadm.h
@@ -28,11 +28,6 @@
#define _PKGADM_H
-/*
- * Module: patchutil.h
- * Description: This module contains the interfaces for patchadd
- */
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/usr/src/cmd/svr4pkg/pkgadm/pkgadm_msgs.h b/usr/src/cmd/svr4pkg/pkgadm/pkgadm_msgs.h
index 4175a5a038..44357630bd 100644
--- a/usr/src/cmd/svr4pkg/pkgadm/pkgadm_msgs.h
+++ b/usr/src/cmd/svr4pkg/pkgadm/pkgadm_msgs.h
@@ -247,9 +247,6 @@ extern "C" {
#define MSG_NOT_READABLE gettext(\
"Operation failed: unable to read file %s")
-#define MSG_PATCH_UPGD gettext(\
- "Operation failed: unable to process patch information\n")
-
#define MSG_BUILD_INDEXES gettext(\
"Operation failed: unable to build indexes\n")
diff --git a/usr/src/cmd/svr4pkg/pkgcond/main.c b/usr/src/cmd/svr4pkg/pkgcond/main.c
index 1b2716c593..2cf036a790 100644
--- a/usr/src/cmd/svr4pkg/pkgcond/main.c
+++ b/usr/src/cmd/svr4pkg/pkgcond/main.c
@@ -148,8 +148,6 @@ struct globalData_t {
long gd_fileSystemConfigLen;
/* current zone name */
char *gd_zoneName;
- /* version of target: PATCH_CLIENT_VERSION */
- char *gd_patchClientVersion;
/* SUNW_PKGCOND_GLOBAL_DATA:parentZone:zoneName */
char *gd_parentZoneName;
/* SUNW_PKGCOND_GLOBAL_DATA:parentZone:zoneType */
@@ -3874,30 +3872,16 @@ parseGlobalData(char *a_envVar, GLOBALDATA_T **r_gdt)
}
/*
- * get package install root. If it doesn't exist check for
- * patch install root (ROOTDIR)
+ * get package install root.
*/
a = getenv(ENV_VAR_PKGROOT);
if ((a != NULL) && (*a != '\0')) {
(*r_gdt)->gd_installRoot = a;
} else {
- a = getenv(ENV_VAR_PATCHROOT);
- if ((a != NULL) && (*a != '\0')) {
- (*r_gdt)->gd_installRoot = a;
- } else {
- (*r_gdt)->gd_installRoot = "/";
- }
+ (*r_gdt)->gd_installRoot = "/";
}
- /*
- * get patch client version: always set if $ROOTDIR != / and
- * the $ROOTDIR/var/sadm/softinfo/INST_RELEASE file exists.
- */
-
- a = getenv(ENV_VAR_PATCH_CLIENTVER);
- (*r_gdt)->gd_patchClientVersion = (a ? a : "");
-
/* get the global data environment variable */
a = getenv(a_envVar);
diff --git a/usr/src/cmd/svr4pkg/pkgcond/pkgcond.h b/usr/src/cmd/svr4pkg/pkgcond/pkgcond.h
index f152be2146..72b27e5ee6 100644
--- a/usr/src/cmd/svr4pkg/pkgcond/pkgcond.h
+++ b/usr/src/cmd/svr4pkg/pkgcond/pkgcond.h
@@ -38,12 +38,10 @@ extern "C" {
/* environment variable */
#define ENV_VAR_DEBUG "PKGCOND_DEBUG"
#define ENV_VAR_PKGROOT "PKG_INSTALL_ROOT"
-#define ENV_VAR_PATCHROOT "ROOTDIR"
#define ENV_VAR_SET "SET_FROM_ENVIRONMENT"
#define ENV_VAR_VERBOSE "PKGCOND_VERBOSE"
#define ENV_VAR_PKGZONENAME "SUNW_PKG_INSTALL_ZONENAME"
#define ENV_VAR_INITIAL_INSTALL "PKG_INIT_INSTALL"
-#define ENV_VAR_PATCH_CLIENTVER "PATCH_CLIENT_VERSION"
/* return codes used with pkgcond itself */
#define R_SUCCESS 0x0 /* condition match / success */
diff --git a/usr/src/cmd/svr4pkg/pkginstall/main.c b/usr/src/cmd/svr4pkg/pkginstall/main.c
index 9a29c051c8..1e6c46cb56 100644
--- a/usr/src/cmd/svr4pkg/pkginstall/main.c
+++ b/usr/src/cmd/svr4pkg/pkginstall/main.c
@@ -181,14 +181,6 @@ static boolean_t debugFlag = B_FALSE;
static boolean_t globalZoneOnly = B_FALSE;
-/* Set by -O patchPkgInstall */
-
-static boolean_t patchPkgInstall = B_FALSE;
-
-/* Set by -O patchPkgRemoval */
-
-static boolean_t patchPkgRemoval = B_FALSE;
-
/* Set by -O preinstallcheck */
static boolean_t preinstallCheck = B_FALSE;
@@ -632,29 +624,6 @@ main(int argc, char *argv[])
continue;
}
- /*
- * If this is a patch installation
- * then call setPatchUpdate().
- */
-
- if (strcmp(p, "patchPkgInstall") == 0) {
- setPatchUpdate();
- patchPkgInstall = B_TRUE;
- continue;
- }
-
- /*
- * If this is a patch removal
- * then call setPatchUpdate() and set
- * patchPkgRemoval flag.
- */
-
- if (strcmp(p, "patchPkgRemoval") == 0) {
- setPatchUpdate();
- patchPkgRemoval = B_TRUE;
- continue;
- }
-
/* process parent-zone-name option */
if (strncmp(p, PARENTZONENAME,
@@ -1438,14 +1407,13 @@ main(int argc, char *argv[])
}
/*
- * Need to force UPDATE to be NULL in case a patch has been applied
- * before creating a zone. Some pkgs (SUNWcsr) already spooled
- * to the zone, check the value of UPDATE in their postinstall script.
- * After a pkg has been patched UPDATE exists statically in the
- * pkginfo file and this value must be reset when installing a zone.
+ * Some pkgs (SUNWcsr) already spooled to the zone, check the
+ * value of UPDATE in their postinstall script. After a pkg
+ * has been patched UPDATE exists statically in the pkginfo
+ * file and this value must be reset when installing a zone.
*/
- if (saveSpoolInstall != 0 && !isPatchUpdate() && !isUpdate()) {
+ if (saveSpoolInstall != 0 && !isUpdate()) {
putparam("UPDATE", "");
}
@@ -2147,7 +2115,7 @@ main(int argc, char *argv[])
*/
rm_icas(pkgbin);
- if ((globalZoneOnly) && (!patchPkgInstall) && (!patchPkgRemoval)) {
+ if (globalZoneOnly) {
boolean_t b;
b = pkgAddPackageToGzonlyList(pkginst, get_inst_root());
if (b == B_FALSE) {
@@ -2535,13 +2503,12 @@ merg_pkginfos(struct cl_attr **pclass, struct cl_attr ***mpclass)
newValue = getenv(param);
/*
- * If zone attributes of patch packages haven't been verified
- * by pdo, if there is no new value, and a zone attribute
+ * If there is no new value, and a zone attribute
* is being changed, it is the same as setting the zone package
* attribute to 'false' - make sure current setting is 'false'.
*/
- if ((patchPkgInstall == B_FALSE) && (newValue == NULL) &&
+ if ((newValue == NULL) &&
(setZoneAttribute == B_TRUE) &&
(strcasecmp(oldValue, "false") != 0)) {
@@ -2570,13 +2537,11 @@ merg_pkginfos(struct cl_attr **pclass, struct cl_attr ***mpclass)
}
/*
- * If zone attributes of patch packages haven't been verified
- * by pdo, check if old and new values differ.
+ * Check if old and new values differ.
* Error if zone parameter
*/
- if ((patchPkgInstall == B_FALSE) &&
- (setZoneAttribute == B_TRUE)) {
+ if (setZoneAttribute == B_TRUE) {
/* illegal change to zone attribute */
progerr(ERR_MERGINFOS_CHANGE_ZONEATTR, pkgName,
@@ -2606,68 +2571,57 @@ merg_pkginfos(struct cl_attr **pclass, struct cl_attr ***mpclass)
}
/*
- * Skip this if() section, if zone attributes of patch packages
- * have been verified by pdo.
+ * verify that no zone attribute has been
+ * set to an invalid value
*/
- if (patchPkgInstall == B_FALSE) {
-
- /*
- * verify that no zone attribute has been
- * set to an invalid value
- */
-
- /* SUNW_PKG_ALLZONES */
+ /* SUNW_PKG_ALLZONES */
- newValue = getenv(PKG_ALLZONES_VARIABLE);
+ newValue = getenv(PKG_ALLZONES_VARIABLE);
- /*
- * complain if setting SUNW_PKG_ALLZONES to other than "false"
- */
+ /*
+ * complain if setting SUNW_PKG_ALLZONES to other than "false"
+ */
- if ((newValue != NULL) && (*SUNW_PKG_ALLZONES == '\0') &&
- (strcasecmp(newValue, "false") != 0)) {
- /* change ALLZONES from "true" to "false" (unset) */
- progerr(ERR_MERGINFOS_SET_ZONEATTR, pkgName,
- pkgVersion, PKG_ALLZONES_VARIABLE, newValue);
- return (1);
- }
+ if ((newValue != NULL) && (*SUNW_PKG_ALLZONES == '\0') &&
+ (strcasecmp(newValue, "false") != 0)) {
+ /* change ALLZONES from "true" to "false" (unset) */
+ progerr(ERR_MERGINFOS_SET_ZONEATTR, pkgName,
+ pkgVersion, PKG_ALLZONES_VARIABLE, newValue);
+ return (1);
+ }
- /* SUNW_PKG_THISZONE */
+ /* SUNW_PKG_THISZONE */
- newValue = getenv(PKG_THISZONE_VARIABLE);
+ newValue = getenv(PKG_THISZONE_VARIABLE);
- /*
- * complain if setting SUNW_PKG_THISZONE to other than "false"
- */
-
- if ((newValue != NULL) && (*SUNW_PKG_THISZONE == '\0') &&
- (strcasecmp(newValue, "false") != 0)) {
- /* change THISZONE from "true" to "false" (unset) */
- progerr(ERR_MERGINFOS_SET_ZONEATTR, pkgName,
- pkgVersion, PKG_THISZONE_VARIABLE, newValue);
- return (1);
- }
+ /*
+ * complain if setting SUNW_PKG_THISZONE to other than "false"
+ */
- /* SUNW_PKG_HOLLOW */
+ if ((newValue != NULL) && (*SUNW_PKG_THISZONE == '\0') &&
+ (strcasecmp(newValue, "false") != 0)) {
+ /* change THISZONE from "true" to "false" (unset) */
+ progerr(ERR_MERGINFOS_SET_ZONEATTR, pkgName,
+ pkgVersion, PKG_THISZONE_VARIABLE, newValue);
+ return (1);
+ }
- newValue = getenv(PKG_HOLLOW_VARIABLE);
+ /* SUNW_PKG_HOLLOW */
- /* complain if setting SUNW_PKG_HOLLOW to other than "false" */
+ newValue = getenv(PKG_HOLLOW_VARIABLE);
- if ((newValue != NULL) && (*SUNW_PKG_HOLLOW == '\0') &&
- (strcasecmp(newValue, "false") != 0)) {
- /* change HOLLOW from "true" to 'false" (unset) */
- progerr(ERR_MERGINFOS_SET_ZONEATTR, pkgName,
- pkgVersion, PKG_HOLLOW_VARIABLE, newValue);
- return (1);
- }
+ /* complain if setting SUNW_PKG_HOLLOW to other than "false" */
+ if ((newValue != NULL) && (*SUNW_PKG_HOLLOW == '\0') &&
+ (strcasecmp(newValue, "false") != 0)) {
+ /* change HOLLOW from "true" to 'false" (unset) */
+ progerr(ERR_MERGINFOS_SET_ZONEATTR, pkgName,
+ pkgVersion, PKG_HOLLOW_VARIABLE, newValue);
+ return (1);
}
- /* return */
-
echoDebug(DBG_MERGINFOS_EXIT, pkginfo_path, 0);
return (0);
diff --git a/usr/src/cmd/svr4pkg/pkginstall/merginfo.c b/usr/src/cmd/svr4pkg/pkginstall/merginfo.c
index 2455f29baa..b0ca2aedcc 100644
--- a/usr/src/cmd/svr4pkg/pkginstall/merginfo.c
+++ b/usr/src/cmd/svr4pkg/pkginstall/merginfo.c
@@ -421,9 +421,8 @@ merginfo(struct cl_attr **pclass, int install_from_pspool)
}
if ((strncmp(ep, "UPDATE=", 7) == 0) &&
- install_from_pspool != 0 &&
- !isPatchUpdate() &&
- !isUpdate()) {
+ install_from_pspool != 0 &&
+ !isUpdate()) {
continue;
}
@@ -488,8 +487,7 @@ merginfo(struct cl_attr **pclass, int install_from_pspool)
quit(1);
}
- if (((pdirfp = opendir(path)) != NULL) &&
- !isPatchUpdate()) {
+ if ((pdirfp = opendir(path)) != NULL) {
struct dirent *dp;
@@ -559,30 +557,23 @@ merginfo(struct cl_attr **pclass, int install_from_pspool)
quit(99);
}
- /*
- * Only want to copy the FCS pkgmap if this is not a
- * patch installation.
- */
-
- if (!isPatchUpdate()) {
- i = snprintf(path, sizeof (path), "%s/pkgmap", instdir);
- if (i > sizeof (path)) {
- progerr(ERR_CREATE_PATH_2, instdir, "pkgmap");
- quit(1);
- }
+ i = snprintf(path, sizeof (path), "%s/pkgmap", instdir);
+ if (i > sizeof (path)) {
+ progerr(ERR_CREATE_PATH_2, instdir, "pkgmap");
+ quit(1);
+ }
- i = snprintf(temp, sizeof (temp), "%s/pkgmap",
- saveSpoolInstallDir);
- if (i > sizeof (path)) {
- progerr(ERR_CREATE_PATH_2, saveSpoolInstallDir,
- "pkgmap");
- quit(1);
- }
+ i = snprintf(temp, sizeof (temp), "%s/pkgmap",
+ saveSpoolInstallDir);
+ if (i > sizeof (path)) {
+ progerr(ERR_CREATE_PATH_2, saveSpoolInstallDir,
+ "pkgmap");
+ quit(1);
+ }
- if (cppath(MODE_SRC, path, temp, 0644)) {
- progerr(ERR_CANNOT_COPY, path, temp);
- quit(99);
- }
+ if (cppath(MODE_SRC, path, temp, 0644)) {
+ progerr(ERR_CANNOT_COPY, path, temp);
+ quit(99);
}
}
@@ -602,11 +593,9 @@ merginfo(struct cl_attr **pclass, int install_from_pspool)
quit(1);
}
- if ((stat(path, &status) == 0) &&
- (status.st_mode & S_IFDIR) &&
- !isPatchUpdate()) {
+ if ((stat(path, &status) == 0) && (status.st_mode & S_IFDIR)) {
i = snprintf(cmd, sizeof (cmd), "cp -pr %s/* %s",
- path, pkgsav);
+ path, pkgsav);
if (i > sizeof (cmd)) {
progerr(ERR_SNPRINTF, "cp -pr %s/* %s");
quit(1);
diff --git a/usr/src/cmd/svr4pkg/pkginstall/quit.c b/usr/src/cmd/svr4pkg/pkginstall/quit.c
index af62f4fcfa..664de95126 100644
--- a/usr/src/cmd/svr4pkg/pkginstall/quit.c
+++ b/usr/src/cmd/svr4pkg/pkginstall/quit.c
@@ -67,7 +67,6 @@ extern char pkgloc_sav[];
extern char *msgtext;
extern char *pkginst;
extern char *pkgname;
-extern char saveSpoolInstallDir[]; /* pkginstall/main.c */
/*
* exported functions
@@ -238,9 +237,6 @@ quitSetSilentExit(boolean_t a_silentExit)
void
quit(int retcode)
{
- char orig_pkginfo_path[PATH_MAX];
- char pkginfo_path[PATH_MAX];
-
/* disable interrupts */
(void) signal(SIGINT, SIG_IGN);
@@ -359,34 +355,6 @@ quit(int retcode)
(void) rrmdir(pkgloc_sav);
}
}
-
- if (isPatchUpdate()) {
- if (pkgloc[0] && !access(pkgloc, F_OK) &&
- !access(saveSpoolInstallDir, F_OK)) {
- /*
- * Copy the pkginfo file to the pspool
- * directory. This propagates patch
- * info to the patched pkg in the local
- * zone.
- */
- (void) snprintf(orig_pkginfo_path,
- sizeof (orig_pkginfo_path),
- "%s/%s/%s", get_PKGLOC(),
- pkginst, PKGINFO);
-
- (void) snprintf(pkginfo_path,
- sizeof (pkginfo_path), "%s/%s",
- saveSpoolInstallDir, PKGINFO);
-
- if (cppath(MODE_SET|DIR_DISPLAY,
- orig_pkginfo_path, pkginfo_path,
- 0644)) {
- progerr(ERR_PKGINFO_COPY,
- orig_pkginfo_path,
- pkginfo_path);
- }
- }
- }
}
/*
diff --git a/usr/src/cmd/svr4pkg/pkgremove/check.c b/usr/src/cmd/svr4pkg/pkgremove/check.c
index 75fbc21fdd..a013c4cf02 100644
--- a/usr/src/cmd/svr4pkg/pkgremove/check.c
+++ b/usr/src/cmd/svr4pkg/pkgremove/check.c
@@ -149,27 +149,6 @@ rckrunlevel(void)
}
int
-rckpatchpkg(char *p, char *pt)
-{
- int n;
- char ans[MAX_INPUT];
-
- ptext(stderr, WRN_PKGREMOVE_PATCHES, p, p, p, pt);
-
- n = ckyorn(ans, NULL, NULL, NULL, ASK_PKGREMOVE_CONTINUE);
-
- if (n != 0) {
- return (n);
- }
-
- if (strchr("yY", *ans) == NULL) {
- return (3);
- }
-
- return (0);
-}
-
-int
rckdepend(void)
{
int n;