1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] [soft-commits] [5589] (installPackages) prevent going further if some transactions failed (mga#7016)
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5Bsoft-commits%5D%20%5B5589%5D%20%28installPackages%29%20prevent%0A%09going%20further%09if%20some%20transactions%20failed%20%28mga%237016%29&In-Reply-To=%3C20130305002254.GF21938%40mars-attacks.org%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="023323.html">
<LINK REL="Next" HREF="023282.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] [soft-commits] [5589] (installPackages) prevent going further if some transactions failed (mga#7016)</H1>
<B>nicolas vigier</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5Bsoft-commits%5D%20%5B5589%5D%20%28installPackages%29%20prevent%0A%09going%20further%09if%20some%20transactions%20failed%20%28mga%237016%29&In-Reply-To=%3C20130305002254.GF21938%40mars-attacks.org%3E"
TITLE="[Mageia-dev] [soft-commits] [5589] (installPackages) prevent going further if some transactions failed (mga#7016)">boklm at mars-attacks.org
</A><BR>
<I>Tue Mar 5 01:22:55 CET 2013</I>
<P><UL>
<LI>Previous message: <A HREF="023323.html">[Mageia-dev] Regular users installing updates through packagekit or rpmdrake
</A></li>
<LI>Next message: <A HREF="023282.html">[Mageia-dev] freeze push: bootloader-utils
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#23281">[ date ]</a>
<a href="thread.html#23281">[ thread ]</a>
<a href="subject.html#23281">[ subject ]</a>
<a href="author.html#23281">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Mon, 03 Sep 2012, <A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">root at mageia.org</A> wrote:
><i> Revision: 5589
</I>><i> Author: tv
</I>><i> Date: 2012-09-03 19:29:30 +0200 (Mon, 03 Sep 2012)
</I>><i> Log Message:
</I>><i> -----------
</I>><i> (installPackages) prevent going further if some transactions failed (mga#7016)
</I>><i>
</I>><i> (_install_raw,install) propagate exit code
</I>><i>
</I>><i> Modified Paths:
</I>><i> --------------
</I>><i> drakx/trunk/perl-install/install/NEWS
</I>><i> drakx/trunk/perl-install/install/pkgs.pm
</I>><i> drakx/trunk/perl-install/install/steps.pm
</I>><i>
</I>
[..]
><i> Modified: drakx/trunk/perl-install/install/steps.pm
</I>><i> ===================================================================
</I>><i> --- drakx/trunk/perl-install/install/steps.pm 2012-09-03 17:29:27 UTC (rev 5588)
</I>><i> +++ drakx/trunk/perl-install/install/steps.pm 2012-09-03 17:29:30 UTC (rev 5589)
</I>><i> @@ -427,6 +427,7 @@
</I>><i> #- small transaction will be built based on this selection and depslist.
</I>><i> my @toInstall = install::pkgs::packagesToInstall($packages);
</I>><i>
</I>><i> + my $exit_code;
</I>><i> my $time = time();
</I>><i> {
</I>><i> local $ENV{DURING_INSTALL} = 1;
</I>><i> @@ -434,13 +435,14 @@
</I>><i> local $ENV{TMP} = '/tmp';
</I>><i> local $ENV{HOME};
</I>><i> local $packages->{options}{auto} = !$o_interactive;
</I>><i> - install::pkgs::install($o->{isUpgrade}, \@toInstall, $packages, \&installCallback);
</I>><i> + $exit_code = install::pkgs::install($o->{isUpgrade}, \@toInstall, $packages, \&installCallback);
</I>><i> }
</I>><i> any::writeandclean_ldsoconf($::prefix);
</I>><i>
</I>><i> log::l("Install took: ", formatTimeRaw(time() - $time));
</I>><i> run_program::rooted_or_die($::prefix, 'ldconfig') if !$o->{justdb};
</I>><i>
</I>><i> + $exit_code and die "Installation failed";
</I>><i> install::media::log_sizes();
</I>><i> scalar(@toInstall); #- return number of packages installed.
</I>><i> }
</I>
Shouldn't it be cdie instead of die ? So that the error can be catched
by steps_interactive::installPackages__handle_error.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="023323.html">[Mageia-dev] Regular users installing updates through packagekit or rpmdrake
</A></li>
<LI>Next message: <A HREF="023282.html">[Mageia-dev] freeze push: bootloader-utils
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#23281">[ date ]</a>
<a href="thread.html#23281">[ thread ]</a>
<a href="subject.html#23281">[ subject ]</a>
<a href="author.html#23281">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|