The code in the related branch has "source" as an immutable configuration option. Meaning that if a user sets the "source" to something different after the install hook has run the new source value will not be picked up and acted on.
I see that the previous hive charm also handles source in the same way. It looks to me like the code is modular enough to call configure_sources() in the config-changed and upgrade-charm hook followed by installing potentially a new version of hive. Then call the install_base_packages() and any other methods that are needed to fully change the hive code.
The code in the related branch has "source" as an immutable configuration option. Meaning that if a user sets the "source" to something different after the install hook has run the new source value will not be picked up and acted on.
I see that the previous hive charm also handles source in the same way. It looks to me like the code is modular enough to call configure_sources() in the config-changed and upgrade-charm hook followed by installing potentially a new version of hive. Then call the install_ base_packages( ) and any other methods that are needed to fully change the hive code.