1 |
robbat2 08/12/05 08:17:26 |
2 |
|
3 |
Added: cfengine-2.2-package-locking-fixup.patch |
4 |
cfengine-2.1-package-locking-fixup.patch |
5 |
Log: |
6 |
Avoid a collision on the lock names inside the packages method when the package name, cmp and action are the same, but version and define/elsedefine are different. |
7 |
(Portage version: 2.2_rc16/cvs/Linux 2.6.28-rc5-00117-g7f0f598 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: cfengine-2.2-package-locking-fixup.patch |
16 |
=================================================================== |
17 |
commit bdd26de22a3e4e18d63709d61a788785d212aa45 |
18 |
Author: Robin H. Johnson <robbat2@g.o> |
19 |
Date: Thu Dec 4 23:20:32 2008 -0800 |
20 |
|
21 |
Fix up locking for packages to avoid collision when the package name, cmp, action are the same, but defines and version are different. |
22 |
|
23 |
diff --git a/src/do.c b/src/do.c |
24 |
index a01b177..9800cd6 100644 |
25 |
--- a/src/do.c |
26 |
+++ b/src/do.c |
27 |
@@ -2844,7 +2844,7 @@ for (ptr = VPKG; ptr != NULL; ptr=ptr->next) |
28 |
|
29 |
ExpandVarstring(ptr->name,name,""); |
30 |
|
31 |
- snprintf(lock,CF_BUFSIZE-1,"%s_%d_%d",name,ptr->cmp,ptr->action); |
32 |
+ snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", name, ptr->cmp, ptr->ver ?: "" ,ptr->action, ptr->defines ?: "", ptr->elsedef ?: ""); |
33 |
|
34 |
if (!GetLock(ASUniqueName("packages"),CanonifyName(lock),ptr->ifelapsed,ptr->expireafter,VUQNAME,CFSTARTTIME)) |
35 |
{ |
36 |
|
37 |
|
38 |
|
39 |
1.1 net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch |
40 |
|
41 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch?rev=1.1&view=markup |
42 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch?rev=1.1&content-type=text/plain |
43 |
|
44 |
Index: cfengine-2.1-package-locking-fixup.patch |
45 |
=================================================================== |
46 |
commit d0dd5a50066ecb9e4857a7795ceed67832a37dc5 |
47 |
Author: Robin H. Johnson <robbat2@g.o> |
48 |
Date: Thu Dec 4 23:21:51 2008 -0800 |
49 |
|
50 |
Fix up locking for packages to avoid collision when the package name, cmp, action are the same, but defines and version are different. |
51 |
|
52 |
diff --git a/src/do.c b/src/do.c |
53 |
index 55fc552..58454f2 100644 |
54 |
--- a/src/do.c |
55 |
+++ b/src/do.c |
56 |
@@ -2710,7 +2710,7 @@ for (ptr = VPKG; ptr != NULL; ptr=ptr->next) |
57 |
ptr->done = 'y'; |
58 |
} |
59 |
|
60 |
- snprintf(lock,CF_BUFSIZE-1,"%s_%d_%d",ptr->name,ptr->cmp,ptr->action); |
61 |
+ snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", ptr->name, ptr->cmp, ptr->ver ?: "" ,ptr->action, ptr->defines ?: "", ptr->elsedef ?: ""); |
62 |
|
63 |
if (!GetLock(ASUniqueName("packages"),CanonifyName(lock),ptr->ifelapsed,ptr->expireafter,VUQNAME,CFSTARTTIME)) |
64 |
{ |