summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 1e6b831be..6773b069f 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -544,11 +544,17 @@ void pkgSourceList::AddVolatileFile(pkgIndexFile * const File) /*{{{*/
/*}}}*/
bool pkgSourceList::AddVolatileFile(std::string const &File) /*{{{*/
{
+ // Note: FileExists matches directories and links, too!
if (File.empty() || FileExists(File) == false)
return false;
- if (flExtension(File) == "deb")
+ std::string const ext = flExtension(File);
+ if (ext == "deb")
AddVolatileFile(new debDebPkgFileIndex(File));
+ else if (ext == "dsc")
+ AddVolatileFile(new debDscFileIndex(File));
+ else if (FileExists(flCombine(File, "debian/control")))
+ AddVolatileFile(new debDscFileIndex(flCombine(File, "debian/control")));
else
return false;