diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-04-26 00:00:51 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-04-28 09:59:33 +0200 |
commit | 0d29b9d4368284782862c7b507c47002b79ddb27 (patch) | |
tree | bcf0fa5d55cce7eba85f20235648d1728b104924 /apt-private/private-install.cc | |
parent | a298a1dc595c548e6c10b48b8e69d987e5be1c42 (diff) |
WIP local deb install
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r-- | apt-private/private-install.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 107ed398e..40165af31 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -19,6 +19,10 @@ #include <apt-pkg/macros.h> #include <apt-pkg/packagemanager.h> #include <apt-pkg/pkgcache.h> +#include <apt-pkg/sourcelist.h> + +// FIXME: include of deb specific header +#include <apt-pkg/debmetaindex.h> #include <errno.h> #include <stdlib.h> @@ -669,10 +673,23 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, bool DoInstall(CommandLine &CmdL) { CacheFile Cache; + // first check for local pkgs and add them to the cache + for (const char **I = CmdL.FileList; *I != 0; I++) + { + if(FileExists(*I)) + { + // FIMXE: direct usage of .deb specific stuff + metaIndex *mi = new debDebFileMetaIndex(*I); + pkgSourceList *sources = Cache.GetSourceList(); + sources->Add(mi); + } + } + + // then open the cache if (Cache.OpenForInstall() == false || Cache.CheckDeps(CmdL.FileSize() != 1) == false) return false; - + std::map<unsigned short, APT::VersionSet> verset; if(!DoCacheManipulationFromCommandLine(CmdL, Cache, verset)) |