// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/edsp.h>
#include <apt-pkg/error.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/progress.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/edsp.h>
+#include <apt-pkg/tagfile.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/pkgrecords.h>
#include <ctype.h>
#include <stddef.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include <stdio.h>
-#include <algorithm>
#include <iostream>
-#include <vector>
#include <limits>
#include <string>
-#include <list>
#include <apti18n.h>
/*}}}*/
pkgCache::VerIterator const &Ver)
{
fprintf(output, "Package: %s\n", Pkg.Name());
-#if APT_PKG_ABI >= 413
fprintf(output, "Source: %s\n", Ver.SourcePkgName());
-#else
- pkgRecords Recs(Cache);
- pkgRecords::Parser &rec = Recs.Lookup(Ver.FileList());
- string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
- fprintf(output, "Source: %s\n", srcpkg.c_str());
-#endif
fprintf(output, "Architecture: %s\n", Ver.Arch());
fprintf(output, "Version: %s\n", Ver.VerStr());
+ fprintf(output, "Source-Version: %s\n", Ver.SourceVerStr());
if (Pkg.CurrentVer() == Ver)
fprintf(output, "Installed: yes\n");
if (Pkg->SelectedState == pkgCache::State::Hold ||
bool orGroup = false;
for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
{
- if (Dep.IsMultiArchImplicit() == true)
+ if (Dep.IsImplicit() == true)
continue;
if (orGroup == false)
dependencies[Dep->Type].append(", ");
bool orGroup = false;
for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
{
- if (Dep.IsMultiArchImplicit() == true)
+ if (Dep.IsImplicit() == true)
continue;
if (orGroup == false)
{
pkgCache::VerIterator Ver(Cache.GetCache(), Cache.GetCache().VerP + VerIdx[id]);
Cache.SetCandidateVersion(Ver);
if (type == "Install")
- Cache.MarkInstall(Ver.ParentPkg(), false, 0, false);
+ {
+ pkgCache::PkgIterator const P = Ver.ParentPkg();
+ if (Cache[P].Mode != pkgDepCache::ModeInstall)
+ Cache.MarkInstall(P, false, 0, false);
+ }
else if (type == "Remove")
Cache.MarkDelete(Ver.ParentPkg(), false);
else if (type == "Autoremove") {