summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/algorithms.cc4
-rw-r--r--apt-pkg/contrib/configuration.cc7
2 files changed, 8 insertions, 3 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 62727a852..158f9c258 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1261,8 +1261,8 @@ void pkgProblemResolver::InstallProtect()
Cache.MarkDelete(I);
else
{
- // preserver the information if the package was auto
- // or manual installed
+ // preserve the information whether the package was auto
+ // or manually installed
bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto);
Cache.MarkInstall(I, false, 0, !autoInst);
}
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 3109fd7a5..e8301d918 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -173,6 +173,11 @@ string Configuration::Find(const char *Name,const char *Default) const
*/
string Configuration::FindFile(const char *Name,const char *Default) const
{
+ const Item *RootItem = Lookup("RootDir");
+ std::string rootDir = (RootItem == 0) ? "" : RootItem->Value;
+ if(rootDir.size() > 0 && rootDir[rootDir.size() - 1] != '/')
+ rootDir.push_back('/');
+
const Item *Itm = Lookup(Name);
if (Itm == 0 || Itm->Value.empty() == true)
{
@@ -204,7 +209,7 @@ string Configuration::FindFile(const char *Name,const char *Default) const
Itm = Itm->Parent;
}
- return val;
+ return rootDir + val;
}
/*}}}*/
// Configuration::FindDir - Find a directory name /*{{{*/