packages never removed on FreeBSD
Jo Rhett <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.bugs |
|---|---|
| Message-ID | <[email protected]> |
One of the fixes applied last fall actually broke FreeBSD and packages were never getting removed. Attached is the patch. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness _______________________________________________ Bug-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/bug-cfengine
cfengine-packages-fix.patch
(application/octet-stream, 1008 B)
Index: do.c
===================================================================
--- do.c (revision 548)
+++ do.c (working copy)
@@ -2883,6 +2883,14 @@
if (ptr->action == pkgaction_remove)
{
PackageList(ptr,name,ptr->pkgmgr,ptr->ver,ptr->cmp,&pending_pkgs);
+
+ /* Some package managers operate best doing things one at a time. */
+ if ((ptr->pkgmgr == pkgmgr_freebsd) || (ptr->pkgmgr == pkgmgr_sun))
+ {
+ RemovePackage(ptr,ptr->pkgmgr,&pending_pkgs);
+ DeleteItemList(pending_pkgs);
+ pending_pkgs = NULL;
+ }
}
else if (ptr->action == pkgaction_upgrade)
{
@@ -2898,7 +2906,6 @@
AppendItem(&pending_pkgs,name, NULL);
/* Some package managers operate best doing things one at a time. */
-
if ((ptr->pkgmgr == pkgmgr_freebsd) || (ptr->pkgmgr == pkgmgr_sun))
{
InstallPackage(ptr,ptr->pkgmgr,&pending_pkgs);