From 885d204bd354739187413005874797504f3b95f3 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 16 Dec 2007 18:22:24 -0200 Subject: * Applied patch from Amos Waterland to allow apt to work properly in initramfs, closes: #448316. --- cmdline/apt-get.cc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index efb618cb0..3bcacb293 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +64,8 @@ #include /*}}}*/ +#define RAMFS_MAGIC 0x858458f6 + using namespace std; ostream c0out(0); @@ -861,8 +864,13 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, return _error->Errno("statvfs",_("Couldn't determine free space in %s"), OutputDir.c_str()); if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) - return _error->Error(_("You don't have enough free space in %s."), - OutputDir.c_str()); + { + struct statfs Stat; + if (statfs(OutputDir.c_str(),&Stat) != 0 || + unsigned(Stat.f_type) != RAMFS_MAGIC) + return _error->Error(_("You don't have enough free space in %s."), + OutputDir.c_str()); + } } // Fail safe check @@ -2188,8 +2196,13 @@ bool DoSource(CommandLine &CmdL) return _error->Errno("statvfs",_("Couldn't determine free space in %s"), OutputDir.c_str()); if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) - return _error->Error(_("You don't have enough free space in %s"), - OutputDir.c_str()); + { + struct statfs Stat; + if (statfs(OutputDir.c_str(),&Stat) != 0 || + unsigned(Stat.f_type) != RAMFS_MAGIC) + return _error->Error(_("You don't have enough free space in %s"), + OutputDir.c_str()); + } // Number of bytes if (DebBytes != FetchBytes) -- cgit v1.2.3 From 9129f2af997bf10530432c6d7cd9711cd3dbbba1 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 16 Dec 2007 18:25:29 -0200 Subject: * Applied patch from Robert Millan to make apt-key and apt-get to ignore time conflicts, closes: #451328. --- cmdline/apt-key | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-key b/cmdline/apt-key index 3bd1a92d9..c7db9a25a 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -5,7 +5,7 @@ set -e # We don't use a secret keyring, of course, but gpg panics and # implodes if there isn't one available -GPG_CMD="gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg" +GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg" GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg" @@ -21,7 +21,7 @@ update() { fi # add new keys - $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --ignore-time-conflict --import + $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import # remove no-longer used keys keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` -- cgit v1.2.3 From da543ed87d3f8b8a0030a211452c9bddfc066f0b Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 16 Dec 2007 18:35:58 -0200 Subject: * Applied patch from Peter Eisentraut to fix a grammatical error ("manual installed" -> "manually installed"), closes: #438136. * --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 3bcacb293..486e995cc 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1719,7 +1719,7 @@ bool DoInstall(CommandLine &CmdL) (Cache[Pkg].Flags & pkgCache::Flag::Auto) && _config->FindB("APT::Get::ReInstall",false) == false) { - ioprintf(c1out,_("%s set to manual installed.\n"), + ioprintf(c1out,_("%s set to manually installed.\n"), Pkg.Name()); Cache->MarkAuto(Pkg,false); AutoMarkChanged++; -- cgit v1.2.3 From 813603a05f071c07ca34921823b246e0aaaec650 Mon Sep 17 00:00:00 2001 From: "bubulle@debian.org" <> Date: Mon, 17 Dec 2007 10:16:21 +0530 Subject: Fix wording of 'after unpacking' --- cmdline/apt-get.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 486e995cc..53c657e8a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -838,16 +838,16 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (DebBytes != FetchBytes) ioprintf(c1out,_("Need to get %sB/%sB of archives.\n"), SizeToStr(FetchBytes).c_str(),SizeToStr(DebBytes).c_str()); - else + else if (DebBytes != 0) ioprintf(c1out,_("Need to get %sB of archives.\n"), SizeToStr(DebBytes).c_str()); // Size delta if (Cache->UsrSize() >= 0) - ioprintf(c1out,_("After unpacking %sB of additional disk space will be used.\n"), + ioprintf(c1out,_("After this operation, %sB of additional disk space will be used.\n"), SizeToStr(Cache->UsrSize()).c_str()); else - ioprintf(c1out,_("After unpacking %sB disk space will be freed.\n"), + ioprintf(c1out,_("After this operation, %sB disk space will be freed.\n"), SizeToStr(-1*Cache->UsrSize()).c_str()); if (_error->PendingError() == true) -- cgit v1.2.3