~ubuntu-branches/ubuntu/precise/aptitude/precise

« back to all changes in this revision

Viewing changes to src/cmdline/cmdline_action.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-06-22 12:32:56 UTC
  • mfrom: (1.8.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110622123256-8aox9w9ch3x72dci
Tags: 0.6.4-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/05aptitude: never autoremove kernels
  - drop aptitude-doc to Suggests
  - 03_branding.dpatch: ubuntu branding
  - 04_changelog.dpatch: take changelogs from changelogs.ubuntu.com
  - 09_ubuntu_fortify_source.dpatch: Suppress a number of warnings (turned
    into errors by -Werror) triggered by Ubuntu's default of
    -D_FORTIFY_SOURCE=2.
  - 11_ubuntu_uses_sudo.dpatch: fix status line of 'Become root' menu entry
    to not refer to su.
  - 12_point_manpage_to_doc_package.dpatch: point Finnish manpage to the
    correct place for further info
  - 14_html2text_preferred.dpatch: switch back to html2text in favor of
    elinks, since html2text is in main and elinks isn't.
* dropped 01_intltool_update.dpatch
* updated 15_ftbfs_new_apt

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
namespace cw = cwidget;
30
30
 
31
 
using aptitude::cmdline::terminal;
 
31
using aptitude::cmdline::terminal_metrics;
32
32
using boost::shared_ptr;
33
33
 
34
34
namespace
43
43
                                pkgset &to_remove, pkgset &to_purge,
44
44
                                int verbose,
45
45
                                bool allow_auto,
46
 
                                const shared_ptr<terminal> &term)
 
46
                                const shared_ptr<terminal_metrics> &term_metrics)
47
47
  {
48
48
    aptitude::cmdline::source_package sourcepkg =
49
49
      aptitude::cmdline::find_source_package(pkg,
147
147
                                                policy,
148
148
                                                arch_only,
149
149
                                                allow_auto,
150
 
                                                term);
 
150
                                                term_metrics);
151
151
                            satisfied = true;
152
152
                          }
153
153
                      }
182
182
                                            policy,
183
183
                                            arch_only,
184
184
                                            allow_auto,
185
 
                                            term);
 
185
                                            term_metrics);
186
186
                      }
187
187
                  }
188
188
              }
229
229
                         pkgPolicy &policy,
230
230
                         bool arch_only,
231
231
                         bool allow_auto,
232
 
                         const shared_ptr<terminal> &term)
 
232
                         const shared_ptr<terminal_metrics> &term_metrics)
233
233
{
234
234
  // Handle virtual packages.
235
235
  if(!pkg.ProvidesList().end())
285
285
                {
286
286
                  printf(_("\"%s\" is a virtual package provided by:\n"),
287
287
                         pkg.Name());
288
 
                  cmdline_show_pkglist(cands, term);
 
288
                  cmdline_show_pkglist(cands, term_metrics);
289
289
                  printf(_("You must choose one to install.\n"));
290
290
                }
291
291
              return false;
328
328
            printf(_("%s is not currently installed, so it will not be upgraded.\n"), pkg.Name());
329
329
        }
330
330
      else if(verbose > 0)
331
 
        printf(_("%s is already installed at the latest version, so it will not be upgraded."), pkg.Name());
 
331
        printf(_("%s is already installed at the latest version, so it will not be upgraded.\n"), pkg.Name());
332
332
      break;
333
333
 
334
334
    case cmdline_reinstall:
435
435
                                      to_remove, to_purge,
436
436
                                      verbose,
437
437
                                      allow_auto,
438
 
                                      term);
 
438
                                      term_metrics);
439
439
    default:
440
440
      fprintf(stderr, "Internal error: impossible pkgaction type\n");
441
441
      abort();
452
452
                         int verbose,
453
453
                         pkgPolicy &policy, bool arch_only,
454
454
                         bool allow_auto,
455
 
                         const shared_ptr<terminal> &term)
 
455
                         const shared_ptr<terminal_metrics> &term_metrics)
456
456
{
457
457
  using namespace aptitude::matching;
458
458
 
485
485
                                       sourcestr,
486
486
                                       policy, arch_only,
487
487
                                       allow_auto,
488
 
                                       term) && rval;
 
488
                                       term_metrics) && rval;
489
489
        }
490
490
 
491
491
      // break out.
532
532
                                            to_remove, to_purge,
533
533
                                            verbose,
534
534
                                            allow_auto,
535
 
                                            term);
 
535
                                            term_metrics);
536
536
 
537
537
          // Maybe they misspelled the package name?
538
538
          pkgvector possible;
553
553
              else
554
554
                {
555
555
                  printf(_("Couldn't find package \"%s\".  However, the following\npackages contain \"%s\" in their name:\n"), package.c_str(), package.c_str());
556
 
                  cmdline_show_pkglist(possible, term);
 
556
                  cmdline_show_pkglist(possible, term_metrics);
557
557
                }
558
558
            }
559
559
          else
580
580
              else
581
581
                {
582
582
                  printf(_("Couldn't find any package matching \"%s\".  However, the following\npackages contain \"%s\" in their description:\n"), package.c_str(), package.c_str());
583
 
                  cmdline_show_pkglist(possible, term);
 
583
                  cmdline_show_pkglist(possible, term_metrics);
584
584
                }
585
585
            }
586
586
 
592
592
                                 to_install, to_hold, to_remove, to_purge,
593
593
                                 verbose, source,
594
594
                                 sourcestr, policy, arch_only, allow_auto,
595
 
                                 term);
 
595
                                 term_metrics);
596
596
    }
597
597
  else
598
598
    {
618
618
                                  sourcestr,
619
619
                                  policy, arch_only,
620
620
                                  allow_auto,
621
 
                                  term))
 
621
                                  term_metrics))
622
622
            rval = false;
623
623
        }
624
624
    }
707
707
                          int verbose,
708
708
                          pkgPolicy &policy, bool arch_only,
709
709
                          bool allow_auto,
710
 
                          const boost::shared_ptr<aptitude::cmdline::terminal> &term)
 
710
                          const boost::shared_ptr<aptitude::cmdline::terminal_metrics> &term_metrics)
711
711
{
712
712
  string::size_type loc=0;
713
713
 
745
745
                                      to_remove, to_purge,
746
746
                                      verbose, policy,
747
747
                                      arch_only, allow_auto,
748
 
                                      term))
 
748
                                      term_metrics))
749
749
                return;
750
750
            }
751
751
        }