Does the command "aptitude upgrade" perform a full-upgrade or a safe-upgrade on Debian?

时间:2016-04-04 17:23:50

标签: debian upgrade aptitude

Both the commands aptitude full-upgrade and aptitude safe-upgrade are documented, including the dist-upgrade alias for full-upgrade.

However, simply aptitude upgrade will also upgrade the system in some way...which does it default to? Also how would I find this for myself? man aptitude upgrade doesn't help.

1 个答案:

答案 0 :(得分:4)

source-code(但不是文档)中可以看出,upgrade确实是safe-upgrade的别名:

else if(!strcasecmp(argv[0], "full-upgrade") ||
  !strcasecmp(argv[0], "dist-upgrade"))
{
   default_action = cmdline_upgrade;
   // [...]
   upgrade_mode = full_upgrade;
   // [...]
   resolver_mode = resolver_mode_full;
}
else if(!strcasecmp(argv[0], "safe-upgrade") ||
  !strcasecmp(argv[0], "upgrade"))
{
   default_action = cmdline_upgrade;
   // [...]
   upgrade_mode = safe_upgrade;
   // [...]
   resolver_mode = resolver_mode_safe;
}