From 769404729697a8fcc6e9a5accb793fe7f27d5088 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 24 Jul 2017 13:14:44 +0100 Subject: [PATCH 1/3] travis: try to use the pinned version of depext --- .travis.yml | 10 ++++++---- CHANGES | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1aa643d..ca74061 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,8 @@ install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.t script: bash ./.travis-docker.sh env: global: - - PACKAGE="depextx" + - PACKAGE="depext" + - PRE_INSTALL_HOOK - POST_INSTALL_HOOK="opam depext --version && opam depext -ui ssl && opam depext -ui -j 2 -y -v pcre" matrix: - DISTRO=debian-stable OCAML_VERSION=4.00.1 @@ -14,8 +15,9 @@ env: - DISTRO=debian-unstable OCAML_VERSION=4.02.3 - DISTRO=ubuntu-12.04 OCAML_VERSION=4.02.3 - DISTRO=ubuntu-16.04 OCAML_VERSION=4.03.0 + - DISTRO=ubuntu-17.04 OCAML_VERSION=4.03.0 - DISTRO=centos-6 OCAML_VERSION=4.01.0 - - DISTRO=centos-7 OCAML_VERSION=4.04.0 - - DISTRO=fedora-24 OCAML_VERSION=4.04.0 + - DISTRO=centos-7 OCAML_VERSION=4.04.2 + - DISTRO=fedora-25 OCAML_VERSION=4.04.2 - DISTRO=alpine OCAML_VERSION=4.05.0 - - DISTRO=opensuse-42.2 OCAML_VERSION=4.04.0 + - DISTRO=opensuse-42.2 OCAML_VERSION=4.04.2 diff --git a/CHANGES b/CHANGES index 081ee6e..d66e97e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1.0.6 (2017-07-24): +* Really fix Zypper non-interactive installation by passing + parameters in the right order (#68 by @jpdeplaix). + 1.0.5 (2017-07-20): * Pass `--non-interactive` to zypper on OpenSUSE (#67 #62 by @yallop and @jpdeplaix) From 2eda0d3682cfccd567bfa898459d26ce8763bf3e Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 24 Jul 2017 13:15:07 +0100 Subject: [PATCH 2/3] depext: bump version to 1.0.6 --- depext.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depext.ml b/depext.ml index 4045ae9..e2ad891 100644 --- a/depext.ml +++ b/depext.ml @@ -581,7 +581,7 @@ let command = no_sources_arg $ debug_arg $ install_arg $ update_arg $ dryrun_arg $ su_arg $ interactive_arg $ opam_args $ packages_arg), - Term.info "opam-depext" ~version:"1.0.5" ~doc ~man + Term.info "opam-depext" ~version:"1.0.6" ~doc ~man let () = Sys.catch_break true; From 77333848f31154dedbb387d9aaec57404b6b49fb Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Thu, 17 Aug 2017 20:22:41 +0200 Subject: [PATCH 3/3] Output comments to stderr, information to stdout Closes #73 --- depext.ml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/depext.ml b/depext.ml index 4045ae9..83a6315 100644 --- a/depext.ml +++ b/depext.ml @@ -363,7 +363,7 @@ let update ~su ~interactive os distribution = let cmd = update_command distribution in match sudo_run_command ~su ~interactive os distribution cmd with | Unix.WEXITED 0 -> - Printf.printf "# OS package update successful\n%!" + Printf.eprintf "# OS package update successful\n%!" | _ -> fatal_error "OS package update failed" let install ~su ~interactive os distribution = function @@ -379,7 +379,7 @@ let install ~su ~interactive os distribution = function is_success (sudo_run_command ~su ~interactive os distribution cmd)) true cmds in - if ok then Printf.printf "# OS packages installation successful\n%!" + if ok then Printf.eprintf "# OS packages installation successful\n%!" else fatal_error "OS package installation failed" let run_source_scripts = function @@ -399,7 +399,7 @@ let run_source_scripts = function | Unix.WEXITED 0 -> () | _ -> fatal_error "Command %S failed" cmd) commands; - Printf.printf "Source installation scripts run successfully\n%!" + Printf.eprintf "Source installation scripts run successfully\n%!" (* Command-line handling *) @@ -414,18 +414,20 @@ let main print_flags list short no_sources let flags = archflags arch @ osflags os @ distrflags distribution in if print_flags then (if short then List.iter print_endline flags else - Printf.printf "# Depexts flags detected on this system: %s\n" + Printf.eprintf "# Depexts flags detected on this system: %s\n" (String.concat " " flags); exit 0); if not short then - Printf.printf "# Detecting depexts using flags: %s\n%!" + Printf.eprintf "# Detecting depexts using flags: %s\n%!" (String.concat " " flags); let os_packages = depexts flags opam_packages in if os_packages <> [] && not short then - Printf.printf "# The following system packages are needed:\n# - %s\n%!" - (String.concat "\n# - " os_packages) + begin + prerr_endline "# The following system packages are needed:"; + Printf.printf "%s\n%!" (String.concat "\n" os_packages) + end else if list && not short then - print_endline "# No required system packages found"; + prerr_endline "# No required system packages found"; if list then exit 0; let source_urls = if no_sources then [] else @@ -433,10 +435,10 @@ let main print_flags list short no_sources (depexts (sourceflags @ flags) opam_packages) in if source_urls <> [] && not short then - Printf.printf "# The following scripts need to be run:\n# - %s\n%!" + Printf.eprintf "# The following scripts need to be run:\n# - %s\n%!" (String.concat "\n# - " source_urls); if os_packages = [] && source_urls = [] && not short then - Printf.printf "# No extra OS packages requirements found.\n%!"; + Printf.eprintf "# No extra OS packages requirements found.\n%!"; let installed = get_installed_packages distribution os_packages in let os_packages = List.filter (fun p -> not (List.mem p installed)) os_packages @@ -446,11 +448,11 @@ let main print_flags list short no_sources List.iter print_endline source_urls) else if installed <> [] then if os_packages <> [] then - Printf.printf + Printf.eprintf "# The following new OS packages need to be installed: %s\n%!" (String.concat " " os_packages) else - Printf.printf + Printf.eprintf "# All required OS packages found.\n%!"; if dryrun_arg then exit (if os_packages = [] then 0 else 1); let su = su_arg || not (has_command "sudo") in @@ -464,7 +466,7 @@ let main print_flags list short no_sources run_source_scripts source_urls; let opam_cmdline = "opam"::"install":: opam_args @ opam_packages in if install_arg && opam_packages <> [] then begin - (if not short then Printf.printf "# Now letting OPAM install the packages\n%!"); + (if not short then Printf.eprintf "# Now letting OPAM install the packages\n%!"); (if !debug then Printf.eprintf "+ %s\n%!" (String.concat " " opam_cmdline)); Unix.execvp "opam" (Array.of_list opam_cmdline) end