summaryrefslogtreecommitdiff
path: root/src/package.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-16 08:52:22 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-16 08:52:22 +0300
commit6715a0ba12af54767ba889de07afe3543b7c1543 (patch)
tree40374647df20dc2ca7a4721391598997b644767e /src/package.c
parent623bc9c5a820906e26c0cc52d0ab230c3c0bc1ab (diff)
downloadapk-tools-6715a0ba12af54767ba889de07afe3543b7c1543.tar.gz
apk-tools-6715a0ba12af54767ba889de07afe3543b7c1543.tar.bz2
apk-tools-6715a0ba12af54767ba889de07afe3543b7c1543.tar.xz
apk-tools-6715a0ba12af54767ba889de07afe3543b7c1543.zip
pkg: remove support for the deprecated .INSTALL script
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/package.c b/src/package.c
index d408f73..86595c9 100644
--- a/src/package.c
+++ b/src/package.c
@@ -242,15 +242,6 @@ const char *apk_script_types[] = {
[APK_SCRIPT_POST_UPGRADE] = "post-upgrade",
};
-static const char *script_types2[] = {
- [APK_SCRIPT_PRE_INSTALL] = "pre_install",
- [APK_SCRIPT_POST_INSTALL] = "post_install",
- [APK_SCRIPT_PRE_DEINSTALL] = "pre_deinstall",
- [APK_SCRIPT_POST_DEINSTALL] = "post_deinstall",
- [APK_SCRIPT_PRE_UPGRADE] = "pre_upgrade",
- [APK_SCRIPT_POST_UPGRADE] = "post_upgrade",
-};
-
int apk_script_type(const char *name)
{
int i;
@@ -569,8 +560,7 @@ int apk_pkg_run_script(struct apk_package *pkg, int root_fd,
fchdir(root_fd);
hlist_for_each_entry(script, c, &pkg->scripts, script_list) {
- if (script->type != type &&
- script->type != APK_SCRIPT_GENERIC)
+ if (script->type != type)
continue;
snprintf(fn, sizeof(fn),
@@ -591,9 +581,6 @@ int apk_pkg_run_script(struct apk_package *pkg, int root_fd,
if (pid == 0) {
if (chroot(".") < 0) {
apk_error("chroot: %s", strerror(errno));
- } else if (script->type == APK_SCRIPT_GENERIC) {
- execle(fn, "INSTALL", script_types2[type],
- pkg->version, "", NULL, environment);
} else {
execle(fn, apk_script_types[type],
pkg->version, "", NULL, environment);