refine the upgrade function in gentoo
typo fix