summaryrefslogtreecommitdiff
path: root/cmdline/apt-sortpkgs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-sortpkgs.cc')
-rw-r--r--cmdline/apt-sortpkgs.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index da451708f..519825457 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -20,6 +20,7 @@
#include <apt-pkg/init.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/tagfile-keys.h>
#include <apt-pkg/tagfile.h>
#include <apt-private/private-cmndline.h>
@@ -85,9 +86,9 @@ static bool DoIt(string InFile)
/* Fetch the name, auto-detecting if this is a source file or a
package file */
- Tmp.Name = Section.FindS("Package");
- Tmp.Ver = Section.FindS("Version");
- Tmp.Arch = Section.FindS("Architecture");
+ Tmp.Name = Section.Find(pkgTagSection::Key::Package).to_string();
+ Tmp.Ver = Section.Find(pkgTagSection::Key::Version).to_string();
+ Tmp.Arch = Section.Find(pkgTagSection::Key::Architecture).to_string();
if (Tmp.Name.empty() == true)
return _error->Error(_("Unknown package record!"));