X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e45c4617e496b49f8d7225546a751022f246a2f3..caeb19b796f7045f489dbce0bf681925d49136a9:/apt-pkg/install-progress.cc diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index 79660b29e..09b1bef9e 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -13,6 +13,10 @@ namespace APT { namespace Progress { + +/* Return a APT::Progress::PackageManager based on the global + * apt configuration (i.e. APT::Status-Fd and APT::Status-deb822-Fd) + */ PackageManager* PackageManagerProgressFactory() { // select the right progress @@ -149,7 +153,7 @@ void PackageManagerProgressDeb822Fd::WriteToStatusFd(std::string s) FileFd::Write(OutStatusFd, s.c_str(), s.size()); } -void PackageManagerProgressDeb822Fd::Start() +void PackageManagerProgressDeb822Fd::StartDpkg() { // FIXME: use SetCloseExec here once it taught about throwing // exceptions instead of doing _exit(100) on failure @@ -235,6 +239,11 @@ void PackageManagerFancy::SetupTerminalScrollArea(int nr_rows) static const char *move_cursor_up = "\033[1A"; std::cout << move_cursor_up; + // setup env for (hopefully!) ncurses + string s; + strprintf(s, "%i", nr_rows); + setenv("LINES", s.c_str(), 1); + std::flush(std::cout); }