]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.cc
Swedish program translation update
[apt.git] / apt-pkg / edsp.cc
index 25d53747cf6b07cff3f34d1af17e646dd6c48606..aea6f3a5dee941c8b4e1c630526bda772d39c455 100644 (file)
@@ -7,31 +7,25 @@
 // 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>
                                                                        /*}}}*/
@@ -51,14 +45,7 @@ static void WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::Pkg
                                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());
    if (Pkg.CurrentVer() == Ver)
@@ -109,11 +96,11 @@ static void WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &
    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(", ");
-      dependencies[Dep->Type].append(Dep.TargetPkg().Name());
+      dependencies[Dep->Type].append(Dep.TargetPkg().FullName((Dep->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific));
       if (Dep->Version != 0)
         dependencies[Dep->Type].append(" (").append(pkgCache::CompTypeDeb(Dep->CompareOp)).append(" ").append(Dep.TargetVer()).append(")");
       if ((Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or)
@@ -147,7 +134,7 @@ static void WriteScenarioLimitedDependency(FILE* output,
    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)
       {
@@ -163,7 +150,7 @@ static void WriteScenarioLimitedDependency(FILE* output,
         orGroup = false;
         continue;
       }
-      dependencies[Dep->Type].append(Dep.TargetPkg().Name());
+      dependencies[Dep->Type].append(Dep.TargetPkg().FullName((Dep->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific));
       if (Dep->Version != 0)
         dependencies[Dep->Type].append(" (").append(pkgCache::CompTypeDeb(Dep->CompareOp)).append(" ").append(Dep.TargetVer()).append(")");
       if ((Dep->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or)