Index: src/cf.defs.h
===================================================================
--- src/cf.defs.h	(revision 549)
+++ src/cf.defs.h	(working copy)
@@ -1295,6 +1295,7 @@
     pkgaction_install,
     pkgaction_remove,
     pkgaction_upgrade,
+    pkgaction_fix,
     pkgaction_none
     };
 
Index: src/do.c
===================================================================
--- src/do.c	(revision 549)
+++ src/do.c	(working copy)
@@ -2901,8 +2901,13 @@
       {
       AddMultipleClasses(ptr->elsedef);
 
-      if (ptr->action == pkgaction_install)
+      if (ptr->action == pkgaction_fix)
          {
+         UpgradePackage(ptr,name,ptr->pkgmgr,"0",cmpsense_gt); /* remove all existing versions */
+         }
+
+      else if (ptr->action == pkgaction_install)
+         {
          AppendItem(&pending_pkgs,name, NULL);
          
          /* Some package managers operate best doing things one at a time. */
Index: src/globals.c
===================================================================
--- src/globals.c	(revision 549)
+++ src/globals.c	(working copy)
@@ -728,6 +728,7 @@
       "install",
       "remove",
       "upgrade",
+      "fix",
       NULL
       };
 
Index: doc/cfengine-Reference.texinfo
===================================================================
--- doc/cfengine-Reference.texinfo	(revision 549)
+++ doc/cfengine-Reference.texinfo	(working copy)
@@ -10207,7 +10207,7 @@
                         version=@var{version-string}
                         define=@var{class-list}(,:.)
                         elsedefine=@var{class-list}(,:.)
-                        action=@b{none}/@var{install/remove/upgrade}
+                        action=@b{none}/@var{install/remove/upgrade/fix}
 
                         ifelapsed=@var{mins} 
                         expireafter=@var{mins}
@@ -10227,6 +10227,11 @@
                 version=1.2
                 cmp=le
 
+  # Make sure that version 1.2 is installed
+  patched-1.2 action=fix
+                version=1.2
+                cmp=eq
+
   # remove any version of useless
   useless action=remove
                 version=0.1
@@ -10236,6 +10241,28 @@
 @end cartouche
 @table @code
 
+@item action
+@vindex action=
+Determines the action taken if the comparison matches.
+
+@itemize @bullet
+@item
+@code{install}
+Install this package if the version comparison does not match.
+
+@item
+@code{upgrade}
+Upgrade this package if the version comparison does match.
+
+@item
+@code{fix}
+Install or Upgrade this package if the version comparison does not match.
+
+@item
+@code{remove}
+Uninstall this package if the version comparison does match.
+@enditemize
+
 @item cmp
 @vindex cmp=
 Determines how the version of the installed package will be compared to
@@ -10264,8 +10291,8 @@
 
 The default value for this attribute is @code{eq}.
 
-Note that @code{cmp} is used differently for install versus upgrade and remove. 
-The action is performed when false for install, but when true for upgrade or remove.
+Note that @code{cmp} is used differently for install and fix versus upgrade and remove. 
+The action is performed when false for install and fix, but when true for upgrade or remove.
 
 @item version
 @vindex version=
@@ -10390,7 +10417,7 @@
 @end smallexample
 
 Note that specifying the version of the package that is part of the freebsd package filename is required if not using "-r" mode.
-However, it does not use this for comparison, just for the package filename to install.
+It does not use this version for comparison, just for the package filename to install.
 
 You can also backgrade if you know that 1.2 is bad for instance.
 
