File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -740,11 +740,9 @@ def update_command(to_update):
740740 continue
741741 elif local_ver > index_ver :
742742 log .warning (
743- "The requested version of module '%s' is older than current version (%s < %s)."
744- " Skipping its update."
745- % (old_module ["name" ], index_info ["version" ], old_module ["version" ])
743+ "Downgrading module '%s' from %s to %s."
744+ % (old_module ["name" ], old_module ["version" ], index_info ["version" ])
746745 )
747- continue
748746
749747 new_module = index_info
750748 update_objects .append (update )
Original file line number Diff line number Diff line change @@ -36,16 +36,16 @@ cfbs validate
3636cfbs --non-interactive update masterfiles@3.24.4
3737[ " $( mf version) " = " 3.24.4" ]
3838
39- # Asking for an older version than the current one must not downgrade .
39+ # Downgrading to an older version is allowed .
4040cfbs --non-interactive update masterfiles@3.24.1
41- [ " $( mf version) " = " 3.24.4" ]
41+ [ " $( mf version) " = " 3.24.1" ]
42+ [ " $( mf commit) " = " 1171e2e50a229d78e2fdd4357a5d07ecc19bdbf4" ]
43+ cfbs validate
4244
43- # A plain update (no @version) still moves to a strictly newer version than the
44- # pin. Checking "!= 3.24.4" alone would also pass on a downgrade, so verify that
45- # 3.24.4 sorts before the new version (i.e. the new version is the greater one).
45+ # A plain update (no @version) moves to the newest version available.
4646cfbs --non-interactive update masterfiles
4747new_ver=" $( mf version) "
48- [ " $new_ver " != " 3.24.4 " ]
49- [ " $( printf ' %s\n%s\n' " 3.24.4 " " $new_ver " | sort -V | tail -1) " = " $new_ver " ]
48+ [ " $new_ver " != " 3.24.1 " ]
49+ [ " $( printf ' %s\n%s\n' " 3.24.1 " " $new_ver " | sort -V | tail -1) " = " $new_ver " ]
5050
5151cfbs build
You can’t perform that action at this time.
0 commit comments