summaryrefslogtreecommitdiff
path: root/lib/libalpm/remove.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-03-07 18:17:03 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-03-07 18:17:03 +0000
commit27be34c09bfe14ab0b4b2c96092ae0b60ca16555 (patch)
treee7c84a0ae0a030b5664d07af3cbfb29c0e94f17b /lib/libalpm/remove.c
parent1bd8f57a183db0b9be503eeff3027c4b8d65627d (diff)
downloadpacman-27be34c09bfe14ab0b4b2c96092ae0b60ca16555.tar.xz
added a NOSCRIPLET flag to transactions (patch from VMiklos <vmiklos@frugalware.org>)
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r--lib/libalpm/remove.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index fd040e38..f8afa3a1 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -153,7 +153,7 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
_alpm_log(PM_LOG_FLOW1, "removing package %s-%s", info->name, info->version);
/* run the pre-remove scriptlet if it exists */
- if(info->scriptlet) {
+ if(info->scriptlet && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
snprintf(pm_install, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version);
_alpm_runscriptlet(handle->root, pm_install, "pre_remove", info->version, NULL);
}
@@ -235,7 +235,7 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
if(trans->type != PM_TRANS_TYPE_UPGRADE) {
/* run the post-remove script if it exists */
- if(info->scriptlet) {
+ if(info->scriptlet && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
char pm_install[PATH_MAX];
snprintf(pm_install, PATH_MAX, "%s/%s-%s/install", db->path, info->name, info->version);
_alpm_runscriptlet(handle->root, pm_install, "post_remove", info->version, NULL);