---
src/febootstrap.ml | 4 ++--
src/febootstrap.pod | 4 ++++
src/febootstrap_cmdline.ml | 2 +-
src/febootstrap_pacman.ml | 8 ++++++--
src/febootstrap_yum_rpm.ml | 7 ++++++-
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/febootstrap.ml b/src/febootstrap.ml
index 9b7dc88..82b80e2 100644
--- a/src/febootstrap.ml
+++ b/src/febootstrap.ml
@@ -67,7 +67,7 @@ let () =
List.flatten (
List.map (
fun pkg ->
- let files = (ph.ph_list_files ~use_installed:use_installed pkg) in
+ let files = (ph.ph_list_files ~use_installed pkg) in
List.map (fun (filename, ft) -> filename, ft, pkg) files
) packages
) in
@@ -320,7 +320,7 @@ let () =
* original file from the package.
*)
else if config then (
- let outfile = ph.ph_get_file_from_package ~use_installed:use_installed pkg path
in
+ let outfile = ph.ph_get_file_from_package ~use_installed pkg path in
(* Note that the output config file might not be a regular file. *)
let statbuf = lstat outfile in
diff --git a/src/febootstrap.pod b/src/febootstrap.pod
index ac97f48..ae6c56c 100644
--- a/src/febootstrap.pod
+++ b/src/febootstrap.pod
@@ -96,6 +96,10 @@ output directory then they will be overwritten.
Don't remove temporary files and directories on exit. This is useful
for debugging.
+=item B<--use-installed>
+
+Inspect already installed packages for determining contents.
+
=item B<-v>
=item B<--verbose>
diff --git a/src/febootstrap_cmdline.ml b/src/febootstrap_cmdline.ml
index 939afb7..fc18bbd 100644
--- a/src/febootstrap_cmdline.ml
+++ b/src/febootstrap_cmdline.ml
@@ -52,7 +52,7 @@ let argspec = Arg.align [
"--save-temps", Arg.Set save_temps,
" Don't delete temporary files and directories on exit.";
"--use-installed", Arg.Set use_installed,
- " Inspect installed packages for determining contents.";
+ " Inspect already installed packages for determining contents.";
"-v", Arg.Set verbose,
" Enable verbose output";
"--verbose", Arg.Set verbose,
diff --git a/src/febootstrap_pacman.ml b/src/febootstrap_pacman.ml
index 002ea6d..657f4d7 100644
--- a/src/febootstrap_pacman.ml
+++ b/src/febootstrap_pacman.ml
@@ -71,8 +71,10 @@ let pacman_resolve_dependencies_and_download names =
List.sort compare pkgs
-(* fixme: use_installed *)
let pacman_list_files ?(use_installed=false) pkg =
+ if use_installed then
+ failwith "pacman driver doesn't support --use-installed";
+
debug "unpacking %s ..." pkg;
(* We actually need to extract the file in order to get the
@@ -118,8 +120,10 @@ let pacman_list_files ?(use_installed=false) pkg =
files
(* Easy because we already unpacked the archive above. *)
-(* fixme: use_installed *)
let pacman_get_file_from_package ?(use_installed=false) pkg file =
+ if use_installed then
+ failwith "pacman driver doesn't support --use-installed";
+
tmpdir // pkg ^ ".d" // file
let () =
diff --git a/src/febootstrap_yum_rpm.ml b/src/febootstrap_yum_rpm.ml
index d208e8e..815c5ba 100644
--- a/src/febootstrap_yum_rpm.ml
+++ b/src/febootstrap_yum_rpm.ml
@@ -173,6 +173,9 @@ if verbose:
) pkgs
let rec yum_rpm_list_files ?(use_installed=false) pkg =
+ if use_installed then
+ failwith "yum_rpm driver doesn't support --use-installed";
+
(* Run rpm -qlp with some extra magic. *)
let cmd =
sprintf "rpm -q --qf '[%%{FILENAMES} %%{FILEFLAGS:fflags} %%{FILEMODES}
%%{FILESIZES}\\n]' -p %s"
@@ -228,8 +231,10 @@ let rec yum_rpm_list_files ?(use_installed=false) pkg =
files
-(* fixme use_installed *)
let yum_rpm_get_file_from_package ?(use_installed=false) pkg file =
+ if use_installed then
+ failwith "yum_rpm driver doesn't support --use-installed";
+
debug "extracting %s from %s ..." file (Filename.basename pkg);
let outfile = tmpdir // file in
--
1.7.6.3