summaryrefslogtreecommitdiff
path: root/src/archives.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2010-12-01 04:28:45 +0100
committerGuillem Jover <guillem@debian.org>2010-12-10 13:02:39 +0100
commita766f501f6da46aca070c315e6429e163d188202 (patch)
treeb219239ca8d828858e4fd35508c6cc3877eafe0f /src/archives.c
parent2e764078cc3bc75dc7426678377bb1c12ea00ba1 (diff)
downloaddpkg-a766f501f6da46aca070c315e6429e163d188202.tar.gz
dpkg: Defer symlink renames to avoid ending up with broken symlinks
The broken symlinks are particularly pernicious as they imply a shared library SONAME path might point to nowhere and thus applications will fail to get dynamically linked. Deferring symlinks is safe as they are always at the end of the tar archive, and they are processed last on deferred renames as they are appended at the end of the new list files. Closes: #605536
Diffstat (limited to 'src/archives.c')
-rw-r--r--src/archives.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archives.c b/src/archives.c
index a2cba6ac1..cf544973a 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -827,7 +827,7 @@ tarobject(void *ctx, struct tar_entry *ti)
* in dpkg-new.
*/
- if (ti->type == tar_filetype_file) {
+ if (ti->type == tar_filetype_file || ti->type == tar_filetype_symlink) {
nifd->namenode->flags |= fnnf_deferred_rename;
debug(dbg_eachfiledetail, "tarobject done and installation deferred");