This is nice (from Mode.ycp) :-).
```
global boolean update () {
     return mode () == "update" || mode () == "autoupgrade";
 }
```