opi
opi copied to clipboard
Possible change to install_package function
One thing that could be interesting is to make the function install_package return a boolean value. When the installation is canceled by the user (by pressing 'n' instead of 'y' or enter), you can return without asking to keep the repo. If you guys think it is interesting enough, I can help the solution.
One one side that could be faster in some situations but on the other side a user could want to remove the repo when he aborted the installation. So I would rather keep it.
Thinking this way, it makes sense. I made the suggestion because I thought that the default behavior when a user canceled the installation was not to keep the repo. If that was the case, we would have to check if repo is already stored as a source before creating it again. I mean, if the user has the repo because of a package they installed in the past and he is presented with the option to keep it or not, he may not know that it would affect the updates of existing packages.
Note that in the meantime we do check if a repo already exists, before creating it, by comparing the url