search for: dpkg_get_all_files

Displaying 5 results from an estimated 5 matches for "dpkg_get_all_files".

2014 Mar 08
9
supermin and dpkg-divert
While trying to run libguestfs tests after building with "--enable-appliance --with-supermin-extra-options=--use-installed", I ran into a peculiar error message in the c-api test: ,---- | libguestfs: error: strings: /abssymlink: strings: error while loading | shared libraries: libbfd-2.24-multiarch.so: cannot open shared object | file: No such file or directory `---- The problem here
2014 Mar 10
2
[supermin 2/3] Add file.source_path, no functional changes
...age_handler.ml | 1 + src/package_handler.mli | 4 ++++ src/pacman.ml | 2 +- src/rpm.ml | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dpkg.ml b/src/dpkg.ml index c28354a..5a650b8 100644 --- a/src/dpkg.ml +++ b/src/dpkg.ml @@ -166,7 +166,8 @@ let dpkg_get_all_files pkgs = let config = try string_prefix "/etc/" path && (lstat path).st_kind = S_REG with Unix_error _ -> false in - { ft_path = path; ft_config = config } + let cmd = sprintf "%s --truename %s" Config.dpkg_divert path in + { ft_path = path; ft...
2014 Mar 13
3
[supermin 1/3] Recognize dpkg-divert
--- configure.ac | 1 + src/config.ml.in | 1 + src/dpkg.ml | 1 + 3 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 2141540..99ea913 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,7 @@ AC_PATH_PROG(APT_GET,[apt-get],[no]) AC_PATH_PROG(DPKG,[dpkg],[no]) AC_PATH_PROG(DPKG_DEB,[dpkg-deb],[no]) AC_PATH_PROG(DPKG_QUERY,[dpkg-query],[no])
2014 Mar 15
5
A few easy dpkg optimizations for supermin
I have done some printf profiling and found that supermin's calls to dpkg for individual packages are quite expensive. Here are some patches that gather all information on demand where possible. On my Debian/unstable-based workstation at home, preparing a minimal appliance using $ ./supermin --use-installed --prepare bash -o supermin.d now takes ~3.5s (previously ~15s). Turning that
2014 Mar 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...if st.st_kind = S_DIR then Some (file.ft_path, st) else None ) files in List.iter ( fun (path, st) -> diff --git a/src/dpkg.ml b/src/dpkg.ml index 5a650b8..efc8123 100644 --- a/src/dpkg.ml +++ b/src/dpkg.ml @@ -155,6 +155,17 @@ let dpkg_get_all_requires pkgs = loop pkgs let dpkg_get_all_files pkgs = + let cmd = sprintf "%s --list" Config.dpkg_divert in + let lines = run_command_get_lines cmd in + let diversions = Hashtbl.create (List.length lines) in + List.iter ( + fun line -> + let items = string_split " " line in + match items with + | ["di...