summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 50405895..b0a7671b 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -697,6 +697,16 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
}
}
+ /* prepare directory for database entries so permission are correct after
+ changelog/install script installation (FS#12263) */
+ if(_alpm_db_prepare(db, newpkg)) {
+ alpm_logaction("error: could not create database entry %s-%s\n",
+ alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
+ pm_errno = PM_ERR_DB_WRITE;
+ ret = -1;
+ goto cleanup;
+ }
+
if(!(trans->flags & PM_TRANS_FLAG_DBONLY)) {
struct archive *archive;
struct archive_entry *entry;