[pacman-dev] [PATCH 1/5] Split install reason changing into its own function