summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorRaphael Hertzog <hertzog@debian.org>2009-02-05 21:56:07 +0100
committerRaphael Hertzog <hertzog@debian.org>2009-02-05 22:07:52 +0100
commit0f861ca7c193a3c28083a8d21d7ec07b4d3c5bd1 (patch)
tree55075db1af780737fee18cc8599715fd78c105c8 /ChangeLog
parent7b1f88470b8c3894cfcf879e523ddf987187cfa8 (diff)
downloaddpkg-0f861ca7c193a3c28083a8d21d7ec07b4d3c5bd1.tar.gz
update-alternatives: better handle missing files
* scripts/update-alternatives.pl (rename_mv): Integrate logic to not fail if ENOENT is the reason why the rename failed. The underlying problem in the previous implementation is not immediately obvious but rename() can fail for multiple reasons at the same time. In #99870 we have a case where rename() fails with EXDEV and the system("mv",…) call fails due to ENOENT. In that case, rename_mv() fails but the check $! == ENOENT also fails when in fact it should not because ENOENT is really the reason why rename_mv() failed. Verifying the existence of the source file first is a sanity check that avoids running mv when we know that it's going to fail and clutter the screen with an undesired error message.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dda5d601a..e71664610 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-02-05 Raphael Hertzog <hertzog@debian.org>
+ * scripts/update-alternatives.pl (rename_mv): Integrate logic to
+ not fail if ENOENT is the reason why the rename failed.
+
+2009-02-05 Raphael Hertzog <hertzog@debian.org>
+
* scripts/update-alternatives.pl: Ensure that a broken link
in automatic mode doesn't lead to the alternative being set
on manual mode. Also displays by default (and not only