Don't pass use_installed to every package handler function.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 18 Oct 2011 13:07:33 +0000 (14:07 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 18 Oct 2011 13:07:33 +0000 (14:07 +0100)
commit2b1631439dc8dc4c6b8d7d78a5f3a5b2c08d83fd
treeb1c721756eca38c7d9cb7f7ab72b14172c6e1087
parent3b66c431e6b5477db8f5c186c14c16506a2df018
Don't pass use_installed to every package handler function.

use_installed is a global variable (defined in febootstrap_cmdline.mli)
so there's not much point in passing it around to every function that
needs it.  This commit removes the optional argument in favour of just
using the global variable in each package handler.

However we still need a place where we can bail if the --use-installed
flag is used for package handlers which don't support this yet.

Thus add a ph_init function is called after the right package handler
has been detected but before it is used.  This is a convenient place
to put the --use-installed checking and any other initialization that
is required.
src/febootstrap.ml
src/febootstrap_debian.ml
src/febootstrap_package_handlers.ml
src/febootstrap_package_handlers.mli
src/febootstrap_pacman.ml
src/febootstrap_yum_rpm.ml