name solver mmdebstrap-dump-solution in official apt path

This commit is contained in:
Johannes 'josch' Schauer 2020-11-29 02:30:03 +01:00
parent 904b79be06
commit beb0b8c177
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1
2 changed files with 17 additions and 10 deletions

View file

@ -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

View file

@ -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,