Function alpm_utils::configure_alpm [−][src]
pub fn configure_alpm(alpm: &mut Alpm, conf: &Config) -> Result<()>
Expand description
Configures an exsting Alpm handle using a pacman config.
You probably just want to use alpm_with_conf unless you need to do something before the repos are registered such as setting the db ext.
use pacmanconf::Config;
use alpm_utils::configure_alpm;
use alpm::Alpm;
let conf = Config::new().unwrap();
let mut alpm = Alpm::new(&*conf.root_dir, &*conf.db_path).unwrap();
let alpm = configure_alpm(&mut alpm, &conf).unwrap();