Index: bin/emerge =================================================================== --- bin/emerge (revision 9718) +++ bin/emerge (revision 9719) @@ -2219,6 +2219,7 @@ usepkgonly = "--usepkgonly" in self.myopts empty = "empty" in self.myparams selective = "selective" in self.myparams + reinstall = False noreplace = "--noreplace" in self.myopts # Behavior of the "selective" parameter depends on # whether or not a package matches an argument atom. @@ -2239,7 +2240,7 @@ if existing_node: break if installed and not find_existing_node: - want_reinstall = empty or \ + want_reinstall = reinstall or empty or \ (found_available_arg and not selective) if want_reinstall and matched_packages: continue @@ -2361,6 +2362,8 @@ self._reinstall_for_flags( forced_flags, old_use, old_iuse, cur_use, cur_iuse) + if reinstall_for_flags: + reinstall = True if not installed: must_reinstall = empty or \ (myarg and not selective)