summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e5323042..e9a4d7b7 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -738,7 +738,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
/* pre_upgrade scriptlet */
if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
- _alpm_runscriptlet(handle->root, newpkg->data, "pre_upgrade", newpkg->version, oldpkg->version, trans);
+ _alpm_runscriptlet(handle->root, newpkg->origin_data.file,
+ "pre_upgrade", newpkg->version, oldpkg->version, trans);
}
} else {
is_upgrade = 0;
@@ -749,7 +750,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
/* pre_install scriptlet */
if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
- _alpm_runscriptlet(handle->root, newpkg->data, "pre_install", newpkg->version, NULL, trans);
+ _alpm_runscriptlet(handle->root, newpkg->origin_data.file,
+ "pre_install", newpkg->version, NULL, trans);
}
}
@@ -771,7 +773,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
archive_read_support_compression_all(archive);
archive_read_support_format_all(archive);
- if(archive_read_open_file(archive, newpkg->data, ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
+ if(archive_read_open_filename(archive, newpkg->origin_data.file,
+ ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK) {
RET_ERR(PM_ERR_PKG_OPEN, -1);
}