index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2007-06-30 00:49:17 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-07-01 22:31:40 -0400 |
commit | 7a42e24400499873c3b9e1e2315edc808d753734 (patch) | |
tree | 153542ffdf613858f238798ae483200b5da76982 /lib | |
parent | f55f7f100f650ff040f8721cf761a060af1c05fe (diff) |
-rw-r--r-- | lib/libalpm/add.c | 10 |
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index c9bcea5e..a8da745c 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -704,7 +704,15 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) archive_entry_set_pathname(entry, filename); - int ret = archive_read_extract(archive, entry, archive_flags); + /* FS #7484 + * By default, libarchive 2.2.3 overwrites existing symlinks by directories from the archive, + * which isn't the behavior we want. + * This can be avoided by using the ARCHIVE_EXTRACT_NO_OVERWRITE flag, and this works + * fine because all files where an overwrite could be needed are deleted first : + * 1) if it's an upgrade, existing files are removed when the old pkg is removed + * 2) if there is a file conflict, but --force is used, then files are also removed : see above + */ + int ret = archive_read_extract(archive, entry, archive_flags | ARCHIVE_EXTRACT_NO_OVERWRITE); if(ret == ARCHIVE_WARN) { /* operation succeeded but a non-critical error was encountered */ _alpm_log(PM_LOG_DEBUG, _("warning extracting %s (%s)"), |