summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debsystem.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-14 14:32:14 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-14 14:32:14 +0200
commit90f2a7a0f66cfc259883490a5fcf40f7d0696cfe (patch)
treebfdc2070c4551238de31b2e6e6dd10f37e150f81 /apt-pkg/deb/debsystem.cc
parentee385a36fe753272cadac0afd7f19b123a0c3d54 (diff)
don't use FindFile for external Dir::Bin commands
We usually use absolute paths to specific the location of dpkg, apt-key and the like, but there is nothing wrong with using just the command name and instead let exec(3) make the lookup in PATH. We had a wild mixture before, so opting for the more accepting option out of the two seems about right especially as it makes no difference in the default case as apt uses absolute paths.
Diffstat (limited to 'apt-pkg/deb/debsystem.cc')
-rw-r--r--apt-pkg/deb/debsystem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 56ca8f4c6..e2b1df950 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -221,7 +221,7 @@ signed debSystem::Score(Configuration const &Cnf)
signed Score = 0;
if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true)
Score += 10;
- if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","/usr/bin/dpkg")) == true)
+ if (FileExists(Cnf.Find("Dir::Bin::dpkg","/usr/bin/dpkg")) == true)
Score += 10;
if (FileExists("/etc/debian_version") == true)
Score += 10;