#include <apt-pkg/sptr.h>
#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/tagfile.h>
+
#include <apti18n.h>
#include <vector>
pkgCache::PkgIterator Pkg;
if (NewPackage(Pkg,PackageName) == false)
- return _error->Error(_("Error occured while processing %s (NewPackage)"),PackageName.c_str());
+ return _error->Error(_("Error occurred while processing %s (NewPackage)"),PackageName.c_str());
Counter++;
if (Counter % 100 == 0 && Progress != 0)
Progress->Progress(List.Offset());
if (Version.empty() == true)
{
if (List.UsePackage(Pkg,pkgCache::VerIterator(Cache)) == false)
- return _error->Error(_("Error occured while processing %s (UsePackage1)"),
+ return _error->Error(_("Error occurred while processing %s (UsePackage1)"),
PackageName.c_str());
continue;
}
if (Res == 0 && Ver->Hash == Hash)
{
if (List.UsePackage(Pkg,Ver) == false)
- return _error->Error(_("Error occured while processing %s (UsePackage2)"),
+ return _error->Error(_("Error occurred while processing %s (UsePackage2)"),
PackageName.c_str());
if (NewFileVer(Ver,List) == false)
- return _error->Error(_("Error occured while processing %s (NewFileVer1)"),
+ return _error->Error(_("Error occurred while processing %s (NewFileVer1)"),
PackageName.c_str());
// Read only a single record and return
Ver->ParentPkg = Pkg.Index();
Ver->Hash = Hash;
if (List.NewVersion(Ver) == false)
- return _error->Error(_("Error occured while processing %s (NewVersion1)"),
+ return _error->Error(_("Error occurred while processing %s (NewVersion1)"),
PackageName.c_str());
if (List.UsePackage(Pkg,Ver) == false)
- return _error->Error(_("Error occured while processing %s (UsePackage3)"),
+ return _error->Error(_("Error occurred while processing %s (UsePackage3)"),
PackageName.c_str());
if (NewFileVer(Ver,List) == false)
- return _error->Error(_("Error occured while processing %s (NewVersion2)"),
+ return _error->Error(_("Error occurred while processing %s (NewVersion2)"),
PackageName.c_str());
// Read only a single record and return
pkgCache::PkgIterator Pkg = Cache.FindPkg(PackageName);
if (Pkg.end() == true)
- return _error->Error(_("Error occured while processing %s (FindPkg)"),
+ return _error->Error(_("Error occurred while processing %s (FindPkg)"),
PackageName.c_str());
Counter++;
if (Counter % 100 == 0 && Progress != 0)
if (Ver->Hash == Hash && Version.c_str() == Ver.VerStr())
{
if (List.CollectFileProvides(Cache,Ver) == false)
- return _error->Error(_("Error occured while processing %s (CollectFileProvides)"),PackageName.c_str());
+ return _error->Error(_("Error occurred while processing %s (CollectFileProvides)"),PackageName.c_str());
break;
}
}
#include <errno.h>
#include <regex.h>
#include <sys/wait.h>
+#include <sstream>
/*}}}*/
using namespace std;
}
delete [] Added;
- return ShowList(out,_("WARNING: The following essential packages will be removed\n"
+ return ShowList(out,_("WARNING: The following essential packages will be removed.\n"
"This should NOT be done unless you know exactly what you are doing!"),List,VersionsList);
}
const char *Prompt = _("Yes, do as I say!");
ioprintf(c2out,
- _("You are about to do something potentially harmful\n"
+ _("You are about to do something potentially harmful.\n"
"To continue type in the phrase '%s'\n"
" ?] "),Prompt);
c2out << flush;
cerr << _("Unable to correct missing packages.") << endl;
return _error->Error(_("Aborting install."));
}
-
+
_system->UnLock();
pkgPackageManager::OrderResult Res = PM->DoInstall();
if (Res == pkgPackageManager::Failed || _error->PendingError() == true)
return true;
}
/*}}}*/
+// DoAutomaticRemove - Remove all automatic unused packages /*{{{*/
+// ---------------------------------------------------------------------
+/* Remove unused automatic packages */
+bool DoAutomaticRemove(CacheFile &Cache)
+{
+ std::cout << "DoAutomaticRemove()" << std::endl;
+
+ if (_config->FindB("APT::Get::Remove",true) == false)
+ return _error->Error(_("We are not supposed to delete stuff, can't "
+ "start AutoRemover"));
+
+ // do the actual work
+ pkgMarkUsed(Cache);
+
+ // look over the cache to see what can be removed
+ for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
+ {
+ if (! Cache[Pkg].Dirty() &&
+ (Pkg->CurrentVer != 0 && Cache[Pkg].Install() == false &&
+ Cache[Pkg].Delete() == false))
+ {
+ fprintf(stdout,"We could delete %s %d\n",
+ Pkg.Name(), Cache[Pkg].AutomaticRemove);
+ Cache->MarkDelete(Pkg,_config->FindB("APT::Get::Purge",false));
+ }
+ }
+
+ // Now see if we destroyed anything
+ if (Cache->BrokenCount() != 0)
+ {
+ c1out << _("Hmm, seems like the AutoRemover destroyed something which really\n"
+ "shouldn't happen. Please file a bug report against apt.") << endl;
+ c1out << endl;
+ c1out << _("The following information may help to resolve the situation:") << endl;
+ c1out << endl;
+ ShowBroken(c1out,Cache,false);
+
+ return _error->Error(_("Internal Error, AutoRemover broke stuff"));
+ }
+ return true;
+}
// DoUpgrade - Upgrade all packages /*{{{*/
// ---------------------------------------------------------------------
/* Upgrade all packages without installing new packages or erasing old
/* Install named packages */
bool DoInstall(CommandLine &CmdL)
{
+ // Lock the list directory
+ FileFd Lock;
+ if (_config->FindB("Debug::NoLocking",false) == false)
+ {
+ Lock.Fd(GetLock(_config->FindDir("Dir::State::Lists") + "lock"));
+ if (_error->PendingError() == true)
+ return _error->Error(_("Unable to lock the list directory"));
+ }
+
CacheFile Cache;
if (Cache.OpenForInstall() == false ||
Cache.CheckDeps(CmdL.FileSize() != 1) == false)
return _error->Error(_("Broken packages"));
}
+ //if (_config->FindB("APT::Get::AutomaticRemove")) {
+ if (!DoAutomaticRemove(Cache))
+ return false;
+ //}
+
/* Print out a list of packages that are going to be installed extra
to what the user asked */
if (Cache->InstCount() != ExpectedInst)
if (*J == 0) {
List += string(I.Name()) + " ";
- VersionsList += string(Cache[I].CandVersion) + "\n";
- }
+ VersionsList += string(Cache[I].CandVersion) + "\n";
+ }
}
ShowList(c1out,_("The following extra packages will be installed:"),List,VersionsList);
_config->Set("APT::Get::Fix-Broken",false);
_config->Set("APT::Get::Force-Yes",false);
_config->Set("APT::Get::List-Cleanup",true);
+ _config->Set("APT::Get::AutomaticRemove",false);
}
/*}}}*/
// SigWinch - Window size change signal handler /*{{{*/
{0,"remove","APT::Get::Remove",0},
{0,"only-source","APT::Get::Only-Source",0},
{0,"arch-only","APT::Get::Arch-Only",0},
+ {0,"experimental-automatic-remove","APT::Get::AutomaticRemove",0},
{0,"allow-unauthenticated","APT::Get::AllowUnauthenticated",0},
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
- AC_DEFINE_UNQUOTED(VERSION,"0.6.36")
+ AC_DEFINE_UNQUOTED(VERSION,"0.6.37")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
dnl Check for the XML tools needed to build man pages
AC_PATH_PROG(XMLTO,xmlto)
--dnl Check for the XML tools needed to build man pages
--AC_PATH_PROG(XMLTO,xmlto)
--
dnl Check for YODL
dnl AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","")
+ apt (0.6.37) breezy; urgency=low
+
+ * Merge bubulle@debian.org--2005/apt--main--0 up to patch-81
+ - patch-66: Italian update
+ - patch-71: French update
+ - patch-73: Basque update
+ - patch-74: Hebrew update
+ - patch-76: Correct Hebrew translation (Closes: #306658)
+ - patch-77: French man page update
+ - patch-79: Correct syntax errors in Hebrew translation
+ - patch-81: Portuguese update
+ * Fix build of French man pages (now using XML, not SGML)
+ * Add Welsh translation from Dafydd Harries
+ (daf@muse.19inch.net--2005/apt--main--0--patch-1)
+ * Change debian/bugscript to use #!/bin/bash (Closes: #313402)
++ * Fix a incorrect example in the man-page (closes: #282918)
+
+ -- Matt Zimmerman <mdz@ubuntu.com> Tue, 24 May 2005 14:38:25 -0700
+
+ apt (0.6.36ubuntu1) breezy; urgency=low
+
+ * make it possible to write a cache-control: no-cache header even if
+ no proxy is set to support transparent proxies (closes ubuntu: #10773)
+
+ * Merge otavio@debian.org--2005/apt--fixes--0.6:
+ - Fix comment about the need of xmlto while building from Arch;
+ - Fix StatStore struct on cachedb.h to use time_t and then fix a compile
+ warning;
+ - Lock database at start of DoInstall routine to avoid concurrent
+ runs of install/remove and update commands (Closes: #194467)
+ - Fix warnings while compiling with GCC 4.0 compiler
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 23 May 2005 11:57:53 +0200
+
apt (0.6.36) experimental; urgency=low
* Merge apt--mvo--0:
- apt-pkg/cdrom.cc:
honor "Acquire::gpgv::Options" when verifying the signature (Ubuntu #8496)
- -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 31 Mar 2005 20:37:11 +0200
+ -- Michael Vogt <mvo@debian.org> Thu, 31 Mar 2005 20:37:11 +0200
apt (0.6.35) hoary; urgency=low
<programlisting>
Package: *
Pin: release a=unstable
--Pin-Priority: 50
++Pin-Priority: 500
</programlisting>
<simpara>The following record assigns a high priority to all package versions
# Man pages
SOURCE = apt-cache.fr.8 apt-get.fr.8 apt-cdrom.fr.8 apt.conf.fr.5 \
sources.list.fr.5 apt-config.fr.8 apt-sortpkgs.fr.1 \
-- apt-ftparchive.fr.1 apt_preferences.fr.5 apt-extracttemplates.fr.1
++ apt-ftparchive.fr.1 apt_preferences.fr.5 apt-extracttemplates.fr.1 \
++ apt-key.fr.8
++
INCLUDES = apt.ent.fr
- include $(SGML_MANPAGE_H)
-include $(XML_MANPAGE_H)
++
++doc: $(SOURCE)
++
++$(SOURCE) :: % : %.xml $(INCLUDES)
++ echo Creating man page $@
++ $(XMLTO) man $<
++
++apt-cache.fr.8:: apt-cache.8
++ cp $< $@
++
++apt-get.fr.8:: apt-get.8
++ cp $< $@
++
++apt-cdrom.fr.8:: apt-cdrom.8
++ cp $< $@
++
++apt.conf.fr.5:: apt.conf.5
++ cp $< $@
++
++apt-config.fr.8:: apt-config.8
++ cp $< $@
++
++sources.list.fr.5:: sources.list.5
++ cp $< $@
++
++apt-sortpkgs.fr.1:: apt-sortpkgs.1
++ cp $< $@
++
++apt-ftparchive.fr.1:: apt-ftparchive.1
++ cp $< $@
++
++apt_preferences.fr.5:: apt_preferences.5
++ cp $< $@
++
++apt-extracttemplates.fr.1:: apt-extracttemplates.1
++ cp $< $@
++
++apt-key.fr.8:: apt-key.8
++ cp $< $@
++
++
msgstr ""
"Project-Id-Version: apt 0.5.25\n"
"Report-Msgid-Bugs-To: \n"
- "POT-Creation-Date: 2005-03-05 12:06+0100\n"
+ "POT-Creation-Date: 2005-03-29 07:17+0200\n"
"PO-Revision-Date: 2004-06-10 19:58+0300\n"
"Last-Translator: Lior Kaplan <webmaster@guides.co.il>\n"
"Language-Team: Hebrew\n"
" --no-delink Enable delinking debug mode\n"
" --contents Control contents file generation\n"
" -c=? Read this configuration file\n"
- " -o=? Set an arbitary configuration option"
+ " -o=? Set an arbitrary configuration option"
msgstr ""
#: ftparchive/apt-ftparchive.cc:757
#: cmdline/apt-get.cc:325
#, c-format
msgid "but %s is installed"
- msgstr "×\90×\91×\9c %s ×\9e×\95תק×\9f"
+ msgstr "×\90×\91×\9c %s ×\9e×\95×ª×§× ×ª"
#: cmdline/apt-get.cc:327
#, c-format
msgid "but %s is to be installed"
- msgstr ""
+ msgstr "אבל %s הולכת להיות מותקנת"
#: cmdline/apt-get.cc:334
msgid "but it is not installable"
- msgstr ""
+ msgstr "אבל היא אינה ניתנת להתקנה"
#: cmdline/apt-get.cc:336
msgid "but it is a virtual package"
#: cmdline/apt-get.cc:421
msgid "The following packages have been kept back:"
- msgstr "×\94×\97×\91×\99×\9c×\95ת ×\94×\91×\90×\95ת ×\9e×¢×\95×§×\91×\95ת:"
+ msgstr "החבילות הבאות מעובות:"
#: cmdline/apt-get.cc:442
msgid "The following packages will be upgraded:"
"WARNING: The following essential packages will be removed\n"
"This should NOT be done unless you know exactly what you are doing!"
msgstr ""
+ "א ז ה ר ה: החבילות החיוניות הבאות יוסרו\n"
+ "על הפעולה להעשות *רק* אם אתה יודע מה אתה עושה!"
#: cmdline/apt-get.cc:575
#, c-format
#: cmdline/apt-get.cc:656
msgid "Unable to minimize the upgrade set"
msgstr ""
-+"א ז ה ר ה: החבילות החיוניות הבאות יוסרו\n"
-+"על הפעולה להעשות *רק* אם אתה יודע מה אתה עושה!"
++"א ז ה ר ה: החבילות החיוניות הבאות יוסרו\n"
++"על הפעולה להעשות *רק* אם אתה יודע מה אתה עושה!"
#: cmdline/apt-get.cc:658
msgid " Done"
msgstr "החבילות הבאות ישודרגו:"
#: cmdline/apt-get.cc:698
- msgid "Install these packages without verification? [y/N] "
+ msgid "Install these packages without verification [y/N]? "
msgstr ""
#: cmdline/apt-get.cc:700
msgstr "בטל."
#: cmdline/apt-get.cc:886
- msgid "Do you want to continue? [Y/n] "
+ #, fuzzy
+ msgid "Do you want to continue [Y/n]? "
msgstr "האם אתה רוצה להמשיך? [Y/n]"
#: cmdline/apt-get.cc:958 cmdline/apt-get.cc:1334 cmdline/apt-get.cc:1959
msgstr ""
#: apt-inst/deb/dpkgdb.cc:383
- msgid "The pkg cache must be initialize first"
+ msgid "The pkg cache must be initialized first"
msgstr ""
#: apt-inst/deb/dpkgdb.cc:386
msgstr ""
#: methods/cdrom.cc:130 methods/cdrom.cc:168
- msgid "Wrong CD"
+ msgid "Wrong CD-ROM"
msgstr ""
#: methods/cdrom.cc:163
#: apt-pkg/pkgcachegen.cc:117
#, c-format
- msgid "Error occured while processing %s (NewPackage)"
+ msgid "Error occurred while processing %s (NewPackage)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:129
#, c-format
- msgid "Error occured while processing %s (UsePackage1)"
+ msgid "Error occurred while processing %s (UsePackage1)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:150
#, c-format
- msgid "Error occured while processing %s (UsePackage2)"
+ msgid "Error occurred while processing %s (UsePackage2)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:154
#, c-format
- msgid "Error occured while processing %s (NewFileVer1)"
+ msgid "Error occurred while processing %s (NewFileVer1)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:184
#, c-format
- msgid "Error occured while processing %s (NewVersion1)"
+ msgid "Error occurred while processing %s (NewVersion1)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:188
#, c-format
- msgid "Error occured while processing %s (UsePackage3)"
+ msgid "Error occurred while processing %s (UsePackage3)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:192
#, c-format
- msgid "Error occured while processing %s (NewVersion2)"
+ msgid "Error occurred while processing %s (NewVersion2)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:207
#: apt-pkg/pkgcachegen.cc:241
#, c-format
- msgid "Error occured while processing %s (FindPkg)"
+ msgid "Error occurred while processing %s (FindPkg)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:254
#, c-format
- msgid "Error occured while processing %s (CollectFileProvides)"
+ msgid "Error occurred while processing %s (CollectFileProvides)"
msgstr ""
#: apt-pkg/pkgcachegen.cc:260