summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 5418c351b..6d6ba5ff9 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1055,8 +1055,17 @@ static bool DoBuildDep(CommandLine &CmdL)
string Src;
pkgSrcRecords::Parser *Last = 0;
+ // a unpacked debian source tree
+ if (DirectoryExists(*I))
+ {
+ // FIXME: how can we make this more elegant?
+ std::string TypeName = "debian/control File Source Index";
+ pkgIndexFile::Type *Type = pkgIndexFile::Type::GetType(TypeName.c_str());
+ if(Type != NULL)
+ Last = Type->CreateSrcPkgParser(*I);
+ }
// if its a local file (e.g. .dsc) use this
- if (FileExists(*I))
+ else if (FileExists(*I))
{
// see if we can get a parser for this pkgIndexFile type
string TypeName = flExtension(*I) + " File Source Index";