X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/dffc17ba835b6bf782fe553d338b6a921c6de7bf..1a65cfc73dc67c114c6d7235bd21c1f879804f04:/apt-private/private-download.cc diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc index 5cdcf6038..d0cbbcf50 100644 --- a/apt-private/private-download.cc +++ b/apt-private/private-download.cc @@ -25,7 +25,14 @@ #include #include #include +#ifdef HAVE_VFS_H #include +#else +#ifdef HAVE_PARAMS_H +#include +#endif +#include +#endif #include #include #include @@ -66,8 +73,7 @@ bool AuthPrompt(std::vector const &UntrustedList, bool const Prompt if (_config->FindI("quiet",0) < 2 && _config->FindB("APT::Get::Assume-Yes",false) == false) { - c2out << _("Install these packages without verification?") << std::flush; - if (!YnPrompt(false)) + if (!YnPrompt(_("Install these packages without verification?"), false)) return _error->Error(_("Some packages could not be authenticated")); return true; @@ -109,7 +115,7 @@ bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failu uri.User.clear(); uri.Password.clear(); std::string descUri = std::string(uri); - _error->Error(_("Failed to fetch %s %s\n"), descUri.c_str(), + _error->Error(_("Failed to fetch %s %s"), descUri.c_str(), (*I)->ErrorText.c_str()); if (Failure != NULL) @@ -144,7 +150,7 @@ bool CheckFreeSpaceBeforeDownload(std::string const &Dir, unsigned long long Fet { struct statfs Stat; if (statfs(Dir.c_str(),&Stat) != 0 -#if HAVE_STRUCT_STATFS_F_TYPE +#ifdef HAVE_STRUCT_STATFS_F_TYPE || Stat.f_type != RAMFS_MAGIC #endif ) @@ -246,6 +252,8 @@ bool DoChangelog(CommandLine &CmdL) bool const downOnly = _config->FindB("APT::Get::Download-Only", false); bool const printOnly = _config->FindB("APT::Get::Print-URIs", false); + if (printOnly) + _config->CndSet("Acquire::Changelogs::AlwaysOnline", true); aptAcquireWithTextStatus Fetcher; for (APT::VersionList::const_iterator Ver = verset.begin(); @@ -309,16 +317,16 @@ bool DoClean(CommandLine &) } pkgAcquire Fetcher; - if (archivedir.empty() == false && FileExists(archivedir) == true) + if (archivedir.empty() == false && FileExists(archivedir) == true && + Fetcher.GetLock(archivedir) == true) { - Fetcher.GetLock(archivedir); Fetcher.Clean(archivedir); Fetcher.Clean(archivedir + "partial/"); } - if (listsdir.empty() == false && FileExists(listsdir) == true) + if (listsdir.empty() == false && FileExists(listsdir) == true && + Fetcher.GetLock(listsdir) == true) { - Fetcher.GetLock(listsdir); Fetcher.Clean(listsdir + "partial/"); }