From beb0b8c1774f44b3f11f86a4132eba21364ff5f3 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sun, 29 Nov 2020 02:30:03 +0100 Subject: [PATCH] name solver mmdebstrap-dump-solution in official apt path --- coverage.sh | 7 +++++++ mmdebstrap | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/coverage.sh b/coverage.sh index d102fb5..e99a2d4 100755 --- a/coverage.sh +++ b/coverage.sh @@ -88,6 +88,13 @@ if [ ! -e shared/tarfilter ] || [ tarfilter -nt shared/tarfilter ]; then cp -a /usr/bin/mmtarfilter shared/tarfilter fi fi +if [ ! -e shared/proxysolver ] || [ proxysolver -nt shared/proxysolver ]; then + if [ -e ./proxysolver ]; then + cp -a proxysolver shared + else + cp -a /usr/lib/apt/solvers/mmdebstrap-dump-solution shared/proxysolver + fi +fi mkdir -p shared/hooks if [ ! -e shared/hooks/setup00-merged-usr.sh ] || [ hooks/setup00-merged-usr.sh -nt shared/hooks/setup00-merged-usr.sh ]; then if [ -e hooks/setup00-merged-usr.sh ]; then diff --git a/mmdebstrap b/mmdebstrap index 02377f3..129b04a 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -792,18 +792,18 @@ sub run_apt_progress { ); } my $get_exec = sub { - my @prefix = (); - my @opts = (); - my $solverpath = "/usr/lib/mmdebstrap/solvers"; - if (-e "./proxysolver") { - # for development purposes, use the current directory if it - # contains a file called proxysolver - $solverpath = getcwd(); - } + my @prefix = (); + my @opts = (); if (exists $options->{EDSP_RES}) { push @prefix, 'env', "APT_EDSP_DUMP_FILENAME=$tmpedsp"; - push @opts, "-oDir::Bin::solvers=$solverpath", - '--solver=proxysolver'; + if (-e "./proxysolver") { + # for development purposes, use the current directory if it + # contains a file called proxysolver + push @opts, ("-oDir::Bin::solvers=" . getcwd()), + '--solver=proxysolver'; + } else { + push @opts, '--solver=mmdebstrap-dump-solution'; + } } return ( @prefix,