mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
dpkg: run_package_script() returns 0 if all ok and non-zero if failure.
The result code was checked incorrectly in two places. (from "Kim B. Heino" <Kim.Heino@bluegiga.com>)
This commit is contained in:
parent
5e43d8591b
commit
53f83d68fb
@ -1306,14 +1306,12 @@ static void remove_package(const unsigned package_num, int noisy)
|
|||||||
char **exclude_files;
|
char **exclude_files;
|
||||||
char list_name[package_name_length + 25];
|
char list_name[package_name_length + 25];
|
||||||
char conffile_name[package_name_length + 30];
|
char conffile_name[package_name_length + 30];
|
||||||
int return_value;
|
|
||||||
|
|
||||||
if (noisy)
|
if (noisy)
|
||||||
printf("Removing %s (%s)...\n", package_name, package_version);
|
printf("Removing %s (%s)...\n", package_name, package_version);
|
||||||
|
|
||||||
/* run prerm script */
|
/* run prerm script */
|
||||||
return_value = run_package_script(package_name, "prerm");
|
if (run_package_script(package_name, "prerm") != 0) {
|
||||||
if (return_value == -1) {
|
|
||||||
bb_error_msg_and_die("script failed, prerm failure");
|
bb_error_msg_and_die("script failed, prerm failure");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1381,8 +1379,8 @@ static void purge_package(const unsigned package_num)
|
|||||||
free(exclude_files);
|
free(exclude_files);
|
||||||
|
|
||||||
/* run postrm script */
|
/* run postrm script */
|
||||||
if (run_package_script(package_name, "postrm") == -1) {
|
if (run_package_script(package_name, "postrm") != 0) {
|
||||||
bb_error_msg_and_die("postrm fialure.. set status to what?");
|
bb_error_msg_and_die("postrm failure.. set status to what?");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change package status */
|
/* Change package status */
|
||||||
|
Loading…
Reference in New Issue
Block a user