summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-08-25 15:52:30 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-25 16:12:24 +0200
commit4f242a2289cc5db7a53afdb875291c94de64fd90 (patch)
tree97b53cbf9a9a94a8b0ee0de77d8d7ce73f974784 /apt-pkg/sourcelist.cc
parent29c590951f812d9e9c4f17706e34f2c3315fb1f6 (diff)
treat .ddeb files like .deb, especially for dpkg
Ubuntu uses *.ddeb files for their debug packages, but the interface we are using since f495992428a396e0f98886c9a761a804aa161c68 to talk to dpkg isn't supporting *.ddeb files. This used to work previously as apt itself isn't caring about the filenames at all and if they are explicitly mentioned dpkg will accept all, too. It might or might not be a good idea to patch dpkg, too, but regardless of it happening, we don't want to couple us to closely to dpkg for this minor feature but testing for this at runtime as it would delay shipping the fix for the too long commandlines further. It is also questionable if it is really a good idea to allow any file extension to be used here (like .foobar in the testcase), but we used to and we tend to avoid breaking existing usecases if we can help it. As a bonus, this also allows the installation of ddeb files directly from the commandline as you can with deb files already. We continue to ignore udeb through as the user-mistake to useful ratio is too high. LP: #1616909
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index cfd824978..0da687895 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -568,7 +568,8 @@ bool pkgSourceList::AddVolatileFile(std::string const &File, std::vector<std::st
return false;
std::string const ext = flExtension(File);
- if (ext == "deb")
+ // udeb is not included as installing it is usually a mistake rather than intended
+ if (ext == "deb" || ext == "ddeb")
AddVolatileFile(new debDebPkgFileIndex(File));
else if (ext == "dsc")
AddVolatileFile(new debDscFileIndex(File));