diff options
author | Daniel Burrows <dburrows@debian.org> | 2010-04-30 07:22:21 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2010-04-30 07:22:21 -0700 |
commit | 2a2a3b13ae49c6d6304b015434f00a708bc1b411 (patch) | |
tree | de1a26cb802e9a2625edab77369395b4baf287e1 /src/pkg_ver_item.cc | |
parent | 368b700c0c0189f2e02982d806d3743374699173 (diff) | |
download | aptitude-2a2a3b13ae49c6d6304b015434f00a708bc1b411.tar.gz |
Reuse the archives_text code in pkg_columnizer and pkg_ver_columnizer.
This required adding a parameter to determine whether to drop the "now"
archive (which those pieces of code previously did). This does mean
that an extra " " gets added between archive names.
Diffstat (limited to 'src/pkg_ver_item.cc')
-rw-r--r-- | src/pkg_ver_item.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pkg_ver_item.cc b/src/pkg_ver_item.cc index a9ae7e17..420d288f 100644 --- a/src/pkg_ver_item.cc +++ b/src/pkg_ver_item.cc @@ -1,6 +1,6 @@ // pkg_ver_item.cc // -// Copyright 1999-2005, 2007-2008 Daniel Burrows +// Copyright 1999-2005, 2007-2008, 2010 Daniel Burrows // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ #include "pkg_subtree.h" #include "pkg_ver_item.h" #include "pkg_sortpolicy.h" +#include "solution_fragment.h" // For archives_text. #include "ui.h" #include "view_changelog.h" #include "progress.h" @@ -83,13 +84,7 @@ cw::column_disposition pkg_ver_columnizer::setup_column(const pkgCache::VerItera case archive: if(!ver.end()) { - string buf; - for(pkgCache::VerFileIterator verfile=ver.FileList(); !verfile.end(); ++verfile) - { - pkgCache::PkgFileIterator pkgfile=verfile.File(); - if(pkgfile.Archive() && strcmp(pkgfile.Archive(), "now")) - buf+=string(buf.empty()?"":",")+pkgfile.Archive(); - } + string buf = archives_text(ver, true); return cw::column_disposition(buf,0); } else |