Add repo-related arguments to pkg.upgrade

fixes #12632