The following commit has been merged in the master branch:
commit 8615497da91662acf2f453f142a6111c103d48f8
Author: Guillem Jover <[email protected]>
Date: Sat Jun 30 22:55:09 2012 +0200
u-a: Switch back to a fatal error on out of range priority on --install
This reverts 18d9373b27effd533d386fdf7bfde6e6b3782101.
diff --git a/debian/changelog b/debian/changelog
index 203068f..079641f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
dpkg (1.17.0) UNRELEASED; urgency=low
- *
+ * Switch update-alternatives back to a fatal error on out of range priority
+ on --install.
-- Guillem Jover <[email protected]> Fri, 03 Aug 2012 13:21:00 +0200
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 5f4364b..0f38095 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -2483,13 +2483,8 @@ main(int argc, char **argv)
prio = strtol(prio_str, &prio_end, 10);
if (prio_str == prio_end || *prio_end != '\0')
badusage(_("priority must be an integer"));
- if (prio < INT_MIN || prio > INT_MAX || errno ==
ERANGE) {
- /* XXX: Switch back to error on 1.17.x. */
- prio = clamp(prio, INT_MIN, INT_MAX);
- warning(_("priority is out of range: "
- "%s clamped to %ld"),
- prio_str, prio);
- }
+ if (prio < INT_MIN || prio > INT_MAX || errno == ERANGE)
+ badusage(_("priority is out of range"));
a = alternative_new(argv[i + 2]);
inst_alt = alternative_new(argv[i + 2]);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]