]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
CMake: Add coverage build type
[apt.git] / apt-pkg / deb / dpkgpm.cc
index a2c7770b3ab6e53b984114254b757e5b294a3947..9d1739d68032988ab67247d43e8b9607ab02d0e8 100644 (file)
@@ -61,6 +61,8 @@
 #include <apti18n.h>
                                                                        /*}}}*/
 
+extern char **environ;
+
 using namespace std;
 
 APT_PURE static string AptHistoryRequestingUser()                      /*{{{*/
@@ -1681,7 +1683,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
            {
               if (I->File[0] != '/')
                  return _error->Error("Internal Error, Pathname to install is not absolute '%s'",I->File.c_str());
-              auto const file = flNotDir(I->File);
+              auto file = flNotDir(I->File);
+              if (flExtension(file) != "deb")
+                 file.append(".deb");
               std::string linkpath;
               if (dpkg_recursive_install_numbered)
                  strprintf(linkpath, "%s/%.*lu-%s", tmpdir_to_free, p, n, file.c_str());