summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-12-05 08:17:26 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-12-05 08:17:26 +0000
commitccf4f2eabd09db9eabcffc99ebdea31e435fecfd (patch)
treeb2ce44e57f397f5d64dd8072bce73ccc8a32339a /net-misc/cfengine/files
parentMaking repoman happy (diff)
downloadhistorical-ccf4f2eabd09db9eabcffc99ebdea31e435fecfd.tar.gz
historical-ccf4f2eabd09db9eabcffc99ebdea31e435fecfd.tar.bz2
historical-ccf4f2eabd09db9eabcffc99ebdea31e435fecfd.zip
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.
Package-Manager: portage-2.2_rc16/cvs/Linux 2.6.28-rc5-00117-g7f0f598 x86_64
Diffstat (limited to 'net-misc/cfengine/files')
-rw-r--r--net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch19
-rw-r--r--net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch19
2 files changed, 38 insertions, 0 deletions
diff --git a/net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch b/net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch
new file mode 100644
index 000000000000..6d321c13c65d
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-2.1-package-locking-fixup.patch
@@ -0,0 +1,19 @@
+commit d0dd5a50066ecb9e4857a7795ceed67832a37dc5
+Author: Robin H. Johnson <robbat2@gentoo.org>
+Date: Thu Dec 4 23:21:51 2008 -0800
+
+ Fix up locking for packages to avoid collision when the package name, cmp, action are the same, but defines and version are different.
+
+diff --git a/src/do.c b/src/do.c
+index 55fc552..58454f2 100644
+--- a/src/do.c
++++ b/src/do.c
+@@ -2710,7 +2710,7 @@ for (ptr = VPKG; ptr != NULL; ptr=ptr->next)
+ ptr->done = 'y';
+ }
+
+- snprintf(lock,CF_BUFSIZE-1,"%s_%d_%d",ptr->name,ptr->cmp,ptr->action);
++ snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", ptr->name, ptr->cmp, ptr->ver ?: "" ,ptr->action, ptr->defines ?: "", ptr->elsedef ?: "");
+
+ if (!GetLock(ASUniqueName("packages"),CanonifyName(lock),ptr->ifelapsed,ptr->expireafter,VUQNAME,CFSTARTTIME))
+ {
diff --git a/net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch b/net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch
new file mode 100644
index 000000000000..14b4c70cccf3
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-2.2-package-locking-fixup.patch
@@ -0,0 +1,19 @@
+commit bdd26de22a3e4e18d63709d61a788785d212aa45
+Author: Robin H. Johnson <robbat2@gentoo.org>
+Date: Thu Dec 4 23:20:32 2008 -0800
+
+ Fix up locking for packages to avoid collision when the package name, cmp, action are the same, but defines and version are different.
+
+diff --git a/src/do.c b/src/do.c
+index a01b177..9800cd6 100644
+--- a/src/do.c
++++ b/src/do.c
+@@ -2844,7 +2844,7 @@ for (ptr = VPKG; ptr != NULL; ptr=ptr->next)
+
+ ExpandVarstring(ptr->name,name,"");
+
+- snprintf(lock,CF_BUFSIZE-1,"%s_%d_%d",name,ptr->cmp,ptr->action);
++ snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", name, ptr->cmp, ptr->ver ?: "" ,ptr->action, ptr->defines ?: "", ptr->elsedef ?: "");
+
+ if (!GetLock(ASUniqueName("packages"),CanonifyName(lock),ptr->ifelapsed,ptr->expireafter,VUQNAME,CFSTARTTIME))
+ {