summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/fileutl.cc3
-rw-r--r--apt-pkg/depcache.cc2
-rw-r--r--apt-pkg/edsp.cc69
-rw-r--r--apt-pkg/edsp.h6
-rw-r--r--apt-pkg/srcrecords.cc37
-rw-r--r--apt-pkg/srcrecords.h9
-rw-r--r--apt-private/private-install.cc144
-rw-r--r--apt-private/private-install.h156
-rw-r--r--cmdline/apt-cache.cc2
-rw-r--r--cmdline/apt-helper.cc3
-rw-r--r--cmdline/apt-internal-solver.cc36
-rw-r--r--debian/libapt-inst1.5.symbols2
-rw-r--r--debian/libapt-pkg4.12.symbols52
-rw-r--r--doc/external-dependency-solver-protocol.txt31
-rw-r--r--ftparchive/cachedb.cc69
-rw-r--r--ftparchive/cachedb.h20
-rw-r--r--po/it.po177
-rw-r--r--test/integration/cachedb-lp1274466-old-format.dbbin0 -> 8192 bytes
-rw-r--r--test/integration/deb-lp1274466-cachedb.debbin0 -> 1270 bytes
-rw-r--r--test/integration/framework6
-rwxr-xr-xtest/integration/run-tests2
-rwxr-xr-xtest/integration/test-apt-ftparchive-cachedb-lp127446651
-rwxr-xr-xtest/integration/test-bug-745046-candidate-propagation-fails39
-rwxr-xr-xtest/integration/test-compressed-indexes2
-rwxr-xr-xtest/integration/test-essential-force-loopbreak18
-rwxr-xr-xtest/integration/test-external-dependency-solver-protocol65
26 files changed, 674 insertions, 327 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index bfd958183..1ba4674e5 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -1798,7 +1798,8 @@ static bool StatFileFd(char const * const msg, int const iFd, std::string const
// higher-level code will generate more meaningful messages,
// even translated this would be meaningless for users
return _error->Errno("fstat", "Unable to determine %s for fd %i", msg, iFd);
- ispipe = S_ISFIFO(Buf.st_mode);
+ if (FileName.empty() == false)
+ ispipe = S_ISFIFO(Buf.st_mode);
}
// for compressor pipes st_size is undefined and at 'best' zero
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index aa96ac58f..c25672d1c 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1374,7 +1374,7 @@ bool pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(PkgIterator con
// the dependency is critical, but can't be installed, so discard the candidate
// as the problemresolver will trip over it otherwise trying to install it (#735967)
- if (Pkg->CurrentVer != 0)
+ if (Pkg->CurrentVer != 0 && (PkgState[Pkg->ID].iFlags & Protected) != Protected)
SetCandidateVersion(Pkg.CurrentVer());
return false;
}
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index ee42267bc..6d1b68c23 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -18,6 +18,7 @@
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/pkgrecords.h>
#include <ctype.h>
#include <stddef.h>
@@ -87,7 +88,12 @@ bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const &Ver)
{
+ pkgRecords Recs(Cache);
+ pkgRecords::Parser &rec = Recs.Lookup(Ver.FileList());
+ string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
+
fprintf(output, "Package: %s\n", Pkg.Name());
+ fprintf(output, "Source: %s\n", srcpkg.c_str());
fprintf(output, "Architecture: %s\n", Ver.Arch());
fprintf(output, "Version: %s\n", Ver.VerStr());
if (Pkg.CurrentVer() == Ver)
@@ -107,10 +113,22 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI
else if ((Ver->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same)
fprintf(output, "Multi-Arch: same\n");
signed short Pin = std::numeric_limits<signed short>::min();
- for (pkgCache::VerFileIterator File = Ver.FileList(); File.end() == false; ++File) {
- signed short const p = Cache.GetPolicy().GetPriority(File.File());
+ std::set<string> Releases;
+ for (pkgCache::VerFileIterator I = Ver.FileList(); I.end() == false; ++I) {
+ pkgCache::PkgFileIterator File = I.File();
+ signed short const p = Cache.GetPolicy().GetPriority(File);
if (Pin < p)
Pin = p;
+ if ((File->Flags & pkgCache::Flag::NotSource) != pkgCache::Flag::NotSource) {
+ string Release = File.RelStr();
+ if (!Release.empty())
+ Releases.insert(Release);
+ }
+ }
+ if (!Releases.empty()) {
+ fprintf(output, "APT-Release:\n");
+ for (std::set<string>::iterator R = Releases.begin(); R != Releases.end(); ++R)
+ fprintf(output, " %s\n", R->c_str());
}
fprintf(output, "APT-Pin: %d\n", Pin);
if (Cache.GetCandidateVer(Pkg) == Ver)
@@ -231,7 +249,16 @@ bool EDSP::WriteRequest(pkgDepCache &Cache, FILE* output, bool const Upgrade,
continue;
req->append(" ").append(Pkg.FullName());
}
- fprintf(output, "Request: EDSP 0.4\n");
+ fprintf(output, "Request: EDSP 0.5\n");
+
+ const char *arch = _config->Find("APT::Architecture").c_str();
+ std::vector<string> archs = APT::Configuration::getArchitectures();
+ fprintf(output, "Architecture: %s\n", arch);
+ fprintf(output, "Architectures:");
+ for (std::vector<string>::const_iterator a = archs.begin(); a != archs.end(); ++a)
+ fprintf(output, " %s", a->c_str());
+ fprintf(output, "\n");
+
if (del.empty() == false)
fprintf(output, "Remove: %s\n", del.c_str()+1);
if (inst.empty() == false)
@@ -411,6 +438,13 @@ bool EDSP::ReadRequest(int const input, std::list<std::string> &install,
distUpgrade = EDSP::StringToBool(line.c_str() + 14, false);
else if (line.compare(0, 11, "Autoremove:") == 0)
autoRemove = EDSP::StringToBool(line.c_str() + 12, false);
+ else if (line.compare(0, 13, "Architecture:") == 0)
+ _config->Set("APT::Architecture", line.c_str() + 14);
+ else if (line.compare(0, 14, "Architectures:") == 0)
+ {
+ std::string const archs = line.c_str() + 15;
+ _config->Set("APT::Architectures", SubstVar(archs, " ", ","));
+ }
else
_error->Warning("Unknown line in EDSP Request stanza: %s", line.c_str());
@@ -508,7 +542,7 @@ bool EDSP::WriteError(char const * const uuid, std::string const &message, FILE*
}
/*}}}*/
// EDSP::ExecuteSolver - fork requested solver and setup ipc pipes {{{*/
-bool EDSP::ExecuteSolver(const char* const solver, int *solver_in, int *solver_out) {
+pid_t EDSP::ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool) {
std::vector<std::string> const solverDirs = _config->FindVector("Dir::Bin::Solvers");
std::string file;
for (std::vector<std::string>::const_iterator dir = solverDirs.begin();
@@ -520,10 +554,16 @@ bool EDSP::ExecuteSolver(const char* const solver, int *solver_in, int *solver_o
}
if (file.empty() == true)
- return _error->Error("Can't call external solver '%s' as it is not in a configured directory!", solver);
+ {
+ _error->Error("Can't call external solver '%s' as it is not in a configured directory!", solver);
+ return 0;
+ }
int external[4] = {-1, -1, -1, -1};
if (pipe(external) != 0 || pipe(external + 2) != 0)
- return _error->Errno("Resolve", "Can't create needed IPC pipes for EDSP");
+ {
+ _error->Errno("Resolve", "Can't create needed IPC pipes for EDSP");
+ return 0;
+ }
for (int i = 0; i < 4; ++i)
SetCloseExec(external[i], true);
@@ -540,11 +580,19 @@ bool EDSP::ExecuteSolver(const char* const solver, int *solver_in, int *solver_o
close(external[3]);
if (WaitFd(external[1], true, 5) == false)
- return _error->Errno("Resolve", "Timed out while Waiting on availability of solver stdin");
+ {
+ _error->Errno("Resolve", "Timed out while Waiting on availability of solver stdin");
+ return 0;
+ }
*solver_in = external[1];
*solver_out = external[2];
- return true;
+ return Solver;
+}
+bool EDSP::ExecuteSolver(const char* const solver, int *solver_in, int *solver_out) {
+ if (ExecuteSolver(solver, solver_in, solver_out, true) == 0)
+ return false;
+ return true;
}
/*}}}*/
// EDSP::ResolveExternal - resolve problems by asking external for help {{{*/
@@ -552,7 +600,8 @@ bool EDSP::ResolveExternal(const char* const solver, pkgDepCache &Cache,
bool const upgrade, bool const distUpgrade,
bool const autoRemove, OpProgress *Progress) {
int solver_in, solver_out;
- if (EDSP::ExecuteSolver(solver, &solver_in, &solver_out) == false)
+ pid_t const solver_pid = EDSP::ExecuteSolver(solver, &solver_in, &solver_out, true);
+ if (solver_pid == 0)
return false;
FILE* output = fdopen(solver_in, "w");
@@ -572,6 +621,6 @@ bool EDSP::ResolveExternal(const char* const solver, pkgDepCache &Cache,
if (EDSP::ReadResponse(solver_out, Cache, Progress) == false)
return false;
- return true;
+ return ExecWait(solver_pid, solver);
}
/*}}}*/
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index f3092d3c6..9e833556a 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -205,10 +205,10 @@ public:
* \param[out] solver_in will be the stdin of the solver
* \param[out] solver_out will be the stdout of the solver
*
- * \return true if the solver could be started and the pipes
- * are set up correctly, otherwise false and the pipes are invalid
+ * \return PID of the started solver or 0 if failure occurred
*/
- bool static ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
+ pid_t static ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
+ APT_DEPRECATED bool static ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
/** \brief call an external resolver to handle the request
*
diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
index 775cf2e5f..f4d034b85 100644
--- a/apt-pkg/srcrecords.cc
+++ b/apt-pkg/srcrecords.cc
@@ -81,6 +81,27 @@ bool pkgSrcRecords::Restart()
return true;
}
/*}}}*/
+// SrcRecords::Next - Step to the next Source Record /*{{{*/
+// ---------------------------------------------------------------------
+/* Step to the next source package record */
+const pkgSrcRecords::Parser* pkgSrcRecords::Next()
+{
+ if (Current == Files.end())
+ return 0;
+
+ // Step to the next record, possibly switching files
+ while ((*Current)->Step() == false)
+ {
+ if (_error->PendingError() == true)
+ return 0;
+ ++Current;
+ if (Current == Files.end())
+ return 0;
+ }
+
+ return *Current;
+}
+ /*}}}*/
// SrcRecords::Find - Find the first source package with the given name /*{{{*/
// ---------------------------------------------------------------------
/* This searches on both source package names and output binary names and
@@ -88,21 +109,11 @@ bool pkgSrcRecords::Restart()
function to be called multiple times to get successive entries */
pkgSrcRecords::Parser *pkgSrcRecords::Find(const char *Package,bool const &SrcOnly)
{
- if (Current == Files.end())
- return 0;
-
while (true)
{
- // Step to the next record, possibly switching files
- while ((*Current)->Step() == false)
- {
- if (_error->PendingError() == true)
- return 0;
- ++Current;
- if (Current == Files.end())
- return 0;
- }
-
+ if(Next() == 0)
+ return 0;
+
// IO error somehow
if (_error->PendingError() == true)
return 0;
diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
index 9915debfe..82460d70f 100644
--- a/apt-pkg/srcrecords.h
+++ b/apt-pkg/srcrecords.h
@@ -95,8 +95,13 @@ class pkgSrcRecords
// Reset the search
bool Restart();
- // Locate a package by name
- Parser *Find(const char *Package,bool const &SrcOnly = false);
+ // Step to the next SourcePackage and return pointer to the
+ // next SourceRecord. The pointer is owned by libapt.
+ const Parser* Next();
+
+ // Locate a package by name and return pointer to the Parser.
+ // The pointer is owned by libapt.
+ Parser* Find(const char *Package,bool const &SrcOnly = false);
pkgSrcRecords(pkgSourceList &List);
virtual ~pkgSrcRecords();
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 107ed398e..a365d4294 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -617,7 +617,8 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
if (Fix != NULL)
{
// Call the scored problem resolver
- Fix->Resolve(true);
+ if (Fix->Resolve(true) == false && Cache->BrokenCount() == 0)
+ return false;
}
// Now we check the state of the packages,
@@ -801,3 +802,144 @@ bool DoInstall(CommandLine &CmdL)
return InstallPackages(Cache,false);
}
/*}}}*/
+
+// TryToInstall - Mark a package for installation /*{{{*/
+void TryToInstall::operator() (pkgCache::VerIterator const &Ver) {
+ pkgCache::PkgIterator Pkg = Ver.ParentPkg();
+
+ Cache->GetDepCache()->SetCandidateVersion(Ver);
+ pkgDepCache::StateCache &State = (*Cache)[Pkg];
+
+ // Handle the no-upgrade case
+ if (_config->FindB("APT::Get::upgrade",true) == false && Pkg->CurrentVer != 0)
+ ioprintf(c1out,_("Skipping %s, it is already installed and upgrade is not set.\n"),
+ Pkg.FullName(true).c_str());
+ // Ignore request for install if package would be new
+ else if (_config->FindB("APT::Get::Only-Upgrade", false) == true && Pkg->CurrentVer == 0)
+ ioprintf(c1out,_("Skipping %s, it is not installed and only upgrades are requested.\n"),
+ Pkg.FullName(true).c_str());
+ else {
+ if (Fix != NULL) {
+ Fix->Clear(Pkg);
+ Fix->Protect(Pkg);
+ }
+ Cache->GetDepCache()->MarkInstall(Pkg,false);
+
+ if (State.Install() == false) {
+ if (_config->FindB("APT::Get::ReInstall",false) == true) {
+ if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false)
+ ioprintf(c1out,_("Reinstallation of %s is not possible, it cannot be downloaded.\n"),
+ Pkg.FullName(true).c_str());
+ else
+ Cache->GetDepCache()->SetReInstall(Pkg, true);
+ } else
+ ioprintf(c1out,_("%s is already the newest version.\n"),
+ Pkg.FullName(true).c_str());
+ }
+
+ // Install it with autoinstalling enabled (if we not respect the minial
+ // required deps or the policy)
+ if (FixBroken == false)
+ doAutoInstallLater.insert(Pkg);
+ }
+
+ // see if we need to fix the auto-mark flag
+ // e.g. apt-get install foo
+ // where foo is marked automatic
+ if (State.Install() == false &&
+ (State.Flags & pkgCache::Flag::Auto) &&
+ _config->FindB("APT::Get::ReInstall",false) == false &&
+ _config->FindB("APT::Get::Only-Upgrade",false) == false &&
+ _config->FindB("APT::Get::Download-Only",false) == false)
+ {
+ ioprintf(c1out,_("%s set to manually installed.\n"),
+ Pkg.FullName(true).c_str());
+ Cache->GetDepCache()->MarkAuto(Pkg,false);
+ AutoMarkChanged++;
+ }
+}
+ /*}}}*/
+bool TryToInstall::propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > const &start, std::ostream &out)/*{{{*/
+{
+ for (std::list<std::pair<pkgCache::VerIterator, std::string> >::const_iterator s = start.begin();
+ s != start.end(); ++s)
+ Cache->GetDepCache()->SetCandidateVersion(s->first);
+
+ bool Success = true;
+ // the Changed list contains:
+ // first: "new version"
+ // second: "what-caused the change"
+ std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > Changed;
+ for (std::list<std::pair<pkgCache::VerIterator, std::string> >::const_iterator s = start.begin();
+ s != start.end(); ++s)
+ {
+ Changed.push_back(std::make_pair(s->first, pkgCache::VerIterator(*Cache)));
+ // We continue here even if it failed to enhance the ShowBroken output
+ Success &= Cache->GetDepCache()->SetCandidateRelease(s->first, s->second, Changed);
+ }
+ for (std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> >::const_iterator c = Changed.begin();
+ c != Changed.end(); ++c)
+ {
+ if (c->second.end() == true)
+ ioprintf(out, _("Selected version '%s' (%s) for '%s'\n"),
+ c->first.VerStr(), c->first.RelStr().c_str(), c->first.ParentPkg().FullName(true).c_str());
+ else if (c->first.ParentPkg()->Group != c->second.ParentPkg()->Group)
+ {
+ pkgCache::VerIterator V = (*Cache)[c->first.ParentPkg()].CandidateVerIter(*Cache);
+ ioprintf(out, _("Selected version '%s' (%s) for '%s' because of '%s'\n"), V.VerStr(),
+ V.RelStr().c_str(), V.ParentPkg().FullName(true).c_str(), c->second.ParentPkg().FullName(true).c_str());
+ }
+ }
+ return Success;
+}
+ /*}}}*/
+void TryToInstall::doAutoInstall() { /*{{{*/
+ for (APT::PackageSet::const_iterator P = doAutoInstallLater.begin();
+ P != doAutoInstallLater.end(); ++P) {
+ pkgDepCache::StateCache &State = (*Cache)[P];
+ if (State.InstBroken() == false && State.InstPolicyBroken() == false)
+ continue;
+ Cache->GetDepCache()->MarkInstall(P, true);
+ }
+ doAutoInstallLater.clear();
+}
+ /*}}}*/
+// TryToRemove - Mark a package for removal /*{{{*/
+void TryToRemove::operator() (pkgCache::VerIterator const &Ver)
+{
+ pkgCache::PkgIterator Pkg = Ver.ParentPkg();
+
+ if (Fix != NULL)
+ {
+ Fix->Clear(Pkg);
+ Fix->Protect(Pkg);
+ Fix->Remove(Pkg);
+ }
+
+ if ((Pkg->CurrentVer == 0 && PurgePkgs == false) ||
+ (PurgePkgs == true && Pkg->CurrentState == pkgCache::State::NotInstalled))
+ {
+ pkgCache::GrpIterator Grp = Pkg.Group();
+ pkgCache::PkgIterator P = Grp.PackageList();
+ for (; P.end() != true; P = Grp.NextPkg(P))
+ {
+ if (P == Pkg)
+ continue;
+ if (P->CurrentVer != 0 || (PurgePkgs == true && P->CurrentState != pkgCache::State::NotInstalled))
+ {
+ // TRANSLATORS: Note, this is not an interactive question
+ ioprintf(c1out,_("Package '%s' is not installed, so not removed. Did you mean '%s'?\n"),
+ Pkg.FullName(true).c_str(), P.FullName(true).c_str());
+ break;
+ }
+ }
+ if (P.end() == true)
+ ioprintf(c1out,_("Package '%s' is not installed, so not removed\n"),Pkg.FullName(true).c_str());
+
+ // MarkInstall refuses to install packages on hold
+ Pkg->SelectedState = pkgCache::State::Hold;
+ }
+ else
+ Cache->GetDepCache()->MarkDelete(Pkg, PurgePkgs);
+}
+ /*}}}*/
diff --git a/apt-private/private-install.h b/apt-private/private-install.h
index 5e18560c5..828163e40 100644
--- a/apt-private/private-install.h
+++ b/apt-private/private-install.h
@@ -3,28 +3,18 @@
#include <apt-pkg/cachefile.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/depcache.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/algorithms.h>
#include <apt-pkg/macros.h>
-#include <apt-private/private-output.h>
-
-#include <stddef.h>
-#include <iosfwd>
#include <list>
-#include <map>
#include <string>
#include <utility>
-
-#include <apti18n.h>
-
class CacheFile;
class CommandLine;
+class pkgProblemResolver;
#define RAMFS_MAGIC 0x858458f6
@@ -39,7 +29,7 @@ APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
// TryToInstall - Mark a package for installation /*{{{*/
-struct TryToInstall {
+struct APT_PUBLIC TryToInstall {
pkgCacheFile* Cache;
pkgProblemResolver* Fix;
bool FixBroken;
@@ -49,109 +39,13 @@ struct TryToInstall {
TryToInstall(pkgCacheFile &Cache, pkgProblemResolver *PM, bool const FixBroken) : Cache(&Cache), Fix(PM),
FixBroken(FixBroken), AutoMarkChanged(0) {};
- void operator() (pkgCache::VerIterator const &Ver) {
- pkgCache::PkgIterator Pkg = Ver.ParentPkg();
-
- Cache->GetDepCache()->SetCandidateVersion(Ver);
- pkgDepCache::StateCache &State = (*Cache)[Pkg];
-
- // Handle the no-upgrade case
- if (_config->FindB("APT::Get::upgrade",true) == false && Pkg->CurrentVer != 0)
- ioprintf(c1out,_("Skipping %s, it is already installed and upgrade is not set.\n"),
- Pkg.FullName(true).c_str());
- // Ignore request for install if package would be new
- else if (_config->FindB("APT::Get::Only-Upgrade", false) == true && Pkg->CurrentVer == 0)
- ioprintf(c1out,_("Skipping %s, it is not installed and only upgrades are requested.\n"),
- Pkg.FullName(true).c_str());
- else {
- if (Fix != NULL) {
- Fix->Clear(Pkg);
- Fix->Protect(Pkg);
- }
- Cache->GetDepCache()->MarkInstall(Pkg,false);
-
- if (State.Install() == false) {
- if (_config->FindB("APT::Get::ReInstall",false) == true) {
- if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false)
- ioprintf(c1out,_("Reinstallation of %s is not possible, it cannot be downloaded.\n"),
- Pkg.FullName(true).c_str());
- else
- Cache->GetDepCache()->SetReInstall(Pkg, true);
- } else
- ioprintf(c1out,_("%s is already the newest version.\n"),
- Pkg.FullName(true).c_str());
- }
-
- // Install it with autoinstalling enabled (if we not respect the minial
- // required deps or the policy)
- if (FixBroken == false)
- doAutoInstallLater.insert(Pkg);
- }
-
- // see if we need to fix the auto-mark flag
- // e.g. apt-get install foo
- // where foo is marked automatic
- if (State.Install() == false &&
- (State.Flags & pkgCache::Flag::Auto) &&
- _config->FindB("APT::Get::ReInstall",false) == false &&
- _config->FindB("APT::Get::Only-Upgrade",false) == false &&
- _config->FindB("APT::Get::Download-Only",false) == false)
- {
- ioprintf(c1out,_("%s set to manually installed.\n"),
- Pkg.FullName(true).c_str());
- Cache->GetDepCache()->MarkAuto(Pkg,false);
- AutoMarkChanged++;
- }
- }
-
- bool propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > start, std::ostream &out)
- {
- for (std::list<std::pair<pkgCache::VerIterator, std::string> >::const_iterator s = start.begin();
- s != start.end(); ++s)
- Cache->GetDepCache()->SetCandidateVersion(s->first);
-
- bool Success = true;
- // the Changed list contains:
- // first: "new version"
- // second: "what-caused the change"
- std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > Changed;
- for (std::list<std::pair<pkgCache::VerIterator, std::string> >::const_iterator s = start.begin();
- s != start.end(); ++s)
- {
- Changed.push_back(std::make_pair(s->first, pkgCache::VerIterator(*Cache)));
- // We continue here even if it failed to enhance the ShowBroken output
- Success &= Cache->GetDepCache()->SetCandidateRelease(s->first, s->second, Changed);
- }
- for (std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> >::const_iterator c = Changed.begin();
- c != Changed.end(); ++c)
- {
- if (c->second.end() == true)
- ioprintf(out, _("Selected version '%s' (%s) for '%s'\n"),
- c->first.VerStr(), c->first.RelStr().c_str(), c->first.ParentPkg().FullName(true).c_str());
- else if (c->first.ParentPkg()->Group != c->second.ParentPkg()->Group)
- {
- pkgCache::VerIterator V = (*Cache)[c->first.ParentPkg()].CandidateVerIter(*Cache);
- ioprintf(out, _("Selected version '%s' (%s) for '%s' because of '%s'\n"), V.VerStr(),
- V.RelStr().c_str(), V.ParentPkg().FullName(true).c_str(), c->second.ParentPkg().FullName(true).c_str());
- }
- }
- return Success;
- }
-
- void doAutoInstall() {
- for (APT::PackageSet::const_iterator P = doAutoInstallLater.begin();
- P != doAutoInstallLater.end(); ++P) {
- pkgDepCache::StateCache &State = (*Cache)[P];
- if (State.InstBroken() == false && State.InstPolicyBroken() == false)
- continue;
- Cache->GetDepCache()->MarkInstall(P, true);
- }
- doAutoInstallLater.clear();
- }
+ void operator() (pkgCache::VerIterator const &Ver);
+ bool propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > const &start, std::ostream &out);
+ void doAutoInstall();
};
/*}}}*/
// TryToRemove - Mark a package for removal /*{{{*/
-struct TryToRemove {
+struct APT_PUBLIC TryToRemove {
pkgCacheFile* Cache;
pkgProblemResolver* Fix;
bool PurgePkgs;
@@ -159,43 +53,7 @@ struct TryToRemove {
TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM) : Cache(&Cache), Fix(PM),
PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};
- void operator() (pkgCache::VerIterator const &Ver)
- {
- pkgCache::PkgIterator Pkg = Ver.ParentPkg();
-
- if (Fix != NULL)
- {
- Fix->Clear(Pkg);
- Fix->Protect(Pkg);
- Fix->Remove(Pkg);
- }
-
- if ((Pkg->CurrentVer == 0 && PurgePkgs == false) ||
- (PurgePkgs == true && Pkg->CurrentState == pkgCache::State::NotInstalled))
- {
- pkgCache::GrpIterator Grp = Pkg.Group();
- pkgCache::PkgIterator P = Grp.PackageList();
- for (; P.end() != true; P = Grp.NextPkg(P))
- {
- if (P == Pkg)
- continue;
- if (P->CurrentVer != 0 || (PurgePkgs == true && P->CurrentState != pkgCache::State::NotInstalled))
- {
- // TRANSLATORS: Note, this is not an interactive question
- ioprintf(c1out,_("Package '%s' is not installed, so not removed. Did you mean '%s'?\n"),
- Pkg.FullName(true).c_str(), P.FullName(true).c_str());
- break;
- }
- }
- if (P.end() == true)
- ioprintf(c1out,_("Package '%s' is not installed, so not removed\n"),Pkg.FullName(true).c_str());
-
- // MarkInstall refuses to install packages on hold
- Pkg->SelectedState = pkgCache::State::Hold;
- }
- else
- Cache->GetDepCache()->MarkDelete(Pkg, PurgePkgs);
- }
+ void operator() (pkgCache::VerIterator const &Ver);
};
/*}}}*/
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 84b775390..1414617eb 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -507,7 +507,7 @@ static bool DumpAvail(CommandLine &)
break;
}
- FileFd PkgF(File.FileName(),FileFd::ReadOnly);
+ FileFd PkgF(File.FileName(),FileFd::ReadOnly, FileFd::Extension);
if (_error->PendingError() == true)
break;
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index 2c1107d90..b0edafcbd 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -43,7 +43,8 @@ static bool DoDownloadFile(CommandLine &CmdL)
std::string hash;
if (CmdL.FileSize() > 3)
hash = CmdL.FileList[3];
- new pkgAcqFile(&Fetcher, download_uri, hash, 0, "desc", "short-desc",
+ // we use download_uri as descr and targetfile as short-descr
+ new pkgAcqFile(&Fetcher, download_uri, hash, 0, download_uri, targetfile,
"dest-dir-ignored", targetfile);
Fetcher.Run();
bool Failed = false;
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index b85c07c33..e4cdf6381 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -31,6 +31,7 @@
#include <string>
#include <unistd.h>
#include <cstdio>
+#include <stdlib.h>
#include <apti18n.h>
/*}}}*/
@@ -56,6 +57,12 @@ static bool ShowHelp(CommandLine &) {
return true;
}
/*}}}*/
+APT_NORETURN static void DIE(std::string const &message) { /*{{{*/
+ std::cerr << "ERROR: " << message << std::endl;
+ _error->DumpErrors(std::cerr);
+ exit(EXIT_FAILURE);
+}
+ /*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Args Args[] = {
@@ -115,34 +122,29 @@ int main(int argc,const char *argv[]) /*{{{*/
EDSP::WriteProgress(0, "Start up solver…", output);
- if (pkgInitSystem(*_config,_system) == false) {
- std::cerr << "System could not be initialized!" << std::endl;
- return 1;
- }
+ if (pkgInitSystem(*_config,_system) == false)
+ DIE("System could not be initialized!");
EDSP::WriteProgress(1, "Read request…", output);
if (WaitFd(input, false, 5) == false)
- std::cerr << "WAIT timed out in the resolver" << std::endl;
+ DIE("WAIT timed out in the resolver");
std::list<std::string> install, remove;
bool upgrade, distUpgrade, autoRemove;
- if (EDSP::ReadRequest(input, install, remove, upgrade, distUpgrade, autoRemove) == false) {
- std::cerr << "Parsing the request failed!" << std::endl;
- return 2;
- }
+ if (EDSP::ReadRequest(input, install, remove, upgrade, distUpgrade, autoRemove) == false)
+ DIE("Parsing the request failed!");
EDSP::WriteProgress(5, "Read scenario…", output);
pkgCacheFile CacheFile;
- CacheFile.Open(NULL, false);
+ if (CacheFile.Open(NULL, false) == false)
+ DIE("Failed to open CacheFile!");
EDSP::WriteProgress(50, "Apply request on scenario…", output);
- if (EDSP::ApplyRequest(install, remove, CacheFile) == false) {
- std::cerr << "Failed to apply request to depcache!" << std::endl;
- return 3;
- }
+ if (EDSP::ApplyRequest(install, remove, CacheFile) == false)
+ DIE("Failed to apply request to depcache!");
pkgProblemResolver Fix(CacheFile);
for (std::list<std::string>::const_iterator i = remove.begin();
@@ -183,10 +185,8 @@ int main(int argc,const char *argv[]) /*{{{*/
EDSP::WriteProgress(95, "Write solution…", output);
- if (EDSP::WriteSolution(CacheFile, output) == false) {
- std::cerr << "Failed to output the solution!" << std::endl;
- return 4;
- }
+ if (EDSP::WriteSolution(CacheFile, output) == false)
+ DIE("Failed to output the solution!");
EDSP::WriteProgress(100, "Done", output);
diff --git a/debian/libapt-inst1.5.symbols b/debian/libapt-inst1.5.symbols
index 35cce919f..8ce707287 100644
--- a/debian/libapt-inst1.5.symbols
+++ b/debian/libapt-inst1.5.symbols
@@ -88,4 +88,4 @@ libapt-inst.so.1.5 libapt-inst1.5 #MINVER#
(c++|regex|optional=std)"^std::basic_string<.+ >\(.+\)@Base$" 0.8.0
(c++|regex|optional=std)"^typeinfo name for std::iterator<.*>@Base$" 0.8.0
(c++|regex|optional=std)"^typeinfo for std::iterator<.*>@Base$" 0.8.0
-###
+ (c++|optional=std)"std::ctype<char>::do_widen(char) const@Base" 1.0.3
diff --git a/debian/libapt-pkg4.12.symbols b/debian/libapt-pkg4.12.symbols
index 5d7b21f10..3fa128cff 100644
--- a/debian/libapt-pkg4.12.symbols
+++ b/debian/libapt-pkg4.12.symbols
@@ -181,7 +181,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgRecords::Parser::ShortDesc()@Base" 0.8.0
(c++)"pkgRecords::Parser::SourcePkg()@Base" 0.8.0
(c++)"pkgRecords::Parser::SourceVer()@Base" 0.8.0
- (c++)"pkgRecords::Parser::~Parser()@Base" 0.8.0
(c++)"pkgRecords::pkgRecords(pkgCache&)@Base" 0.8.0
(c++)"pkgRecords::~pkgRecords()@Base" 0.8.0
(c++)"pkgTagFile::Step(pkgTagSection&)@Base" 0.8.0
@@ -315,8 +314,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgIndexFile::Type::GlobalListLen@Base" 0.8.0
(c++)"pkgIndexFile::Type::GetType(char const*)@Base" 0.8.0
(c++)"pkgIndexFile::Type::Type()@Base" 0.8.0
- (c++)"pkgIndexFile::Type::~Type()@Base" 0.8.0
- (c++)"pkgIndexFile::~pkgIndexFile()@Base" 0.8.0
(c++)"pkgOrderList::VisitRDeps(bool (pkgOrderList::*)(pkgCache::DepIterator), pkgCache::PkgIterator)@Base" 0.8.0
(c++)"pkgOrderList::OrderUnpack(std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)@Base" 0.8.0
(c++)"pkgOrderList::DepConfigure(pkgCache::DepIterator)@Base" 0.8.0
@@ -402,7 +399,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgSourceList::Type::GlobalListLen@Base" 0.8.0
(c++)"pkgSourceList::Type::GetType(char const*)@Base" 0.8.0
(c++)"pkgSourceList::Type::Type()@Base" 0.8.0
- (c++)"pkgSourceList::Type::~Type()@Base" 0.8.0
(c++)"pkgSourceList::Reset()@Base" 0.8.0
(c++)"pkgSourceList::pkgSourceList(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
(c++)"pkgSourceList::pkgSourceList()@Base" 0.8.0
@@ -411,7 +407,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgSrcRecords::Find(char const*, bool const&)@Base" 0.8.0
(c++)"pkgSrcRecords::Parser::BuildDepRec::~BuildDepRec()@Base" 0.8.0
(c++)"pkgSrcRecords::Parser::BuildDepType(unsigned char const&)@Base" 0.8.0
- (c++)"pkgSrcRecords::Parser::~Parser()@Base" 0.8.0
(c++)"pkgSrcRecords::Restart()@Base" 0.8.0
(c++)"pkgSrcRecords::pkgSrcRecords(pkgSourceList&)@Base" 0.8.0
(c++)"pkgSrcRecords::~pkgSrcRecords()@Base" 0.8.0
@@ -457,7 +452,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"debReleaseIndex::debReleaseIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
(c++)"debReleaseIndex::~debReleaseIndex()@Base" 0.8.0
(c++)"debSLTypeDebSrc::~debSLTypeDebSrc()@Base" 0.8.0
- (c++)"debSLTypeDebian::~debSLTypeDebian()@Base" 0.8.0
(c++)"debSourcesIndex::debSourcesIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)@Base" 0.8.0
(c++)"debSourcesIndex::~debSourcesIndex()@Base" 0.8.0
(c++)"pkgAcqDiffIndex::ParseDiffIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
@@ -503,13 +497,11 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgAcquireStatus::Start()@Base" 0.8.0
(c++)"pkgAcquireStatus::IMSHit(pkgAcquire::ItemDesc&)@Base" 0.8.0
(c++)"pkgAcquireStatus::pkgAcquireStatus()@Base" 0.8.0
- (c++)"pkgAcquireStatus::~pkgAcquireStatus()@Base" 0.8.0
(c++)"PreferenceSection::TrimRecord(bool, char const*&)@Base" 0.8.0
(c++)"pkgArchiveCleaner::Go(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, pkgCache&)@Base" 0.8.0
(c++)"pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)@Base" 0.8.0
(c++)"pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
(c++)"pkgCacheGenerator::ListParser::CollectFileProvides(pkgCache&, pkgCache::VerIterator&)@Base" 0.8.0
- (c++)"pkgCacheGenerator::ListParser::~ListParser()@Base" 0.8.0
(c++)"pkgCacheGenerator::NewFileVer(pkgCache::VerIterator&, pkgCacheGenerator::ListParser&)@Base" 0.8.0
(c++)"pkgCacheGenerator::NewPackage(pkgCache::PkgIterator&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
(c++)"pkgCacheGenerator::SelectFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pkgIndexFile const&, unsigned long)@Base" 0.8.0
@@ -586,7 +578,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgVersioningSystem::TestCompatibility(pkgVersioningSystem const&)@Base" 0.8.0
(c++)"pkgVersioningSystem::GetVS(char const*)@Base" 0.8.0
(c++)"pkgVersioningSystem::pkgVersioningSystem()@Base" 0.8.0
- (c++)"pkgVersioningSystem::~pkgVersioningSystem()@Base" 0.8.0
(c++)"debTranslationsIndex::debTranslationsIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*)@Base" 0.8.0
(c++)"debTranslationsIndex::~debTranslationsIndex()@Base" 0.8.0
(c++)"APT::CacheFilter::PackageNameMatchesRegEx::PackageNameMatchesRegEx(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.8.0
@@ -671,7 +662,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"IndexCopy::ConvertToSourceList(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@Base" 0.8.0
(c++)"IndexCopy::ChopDirs(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)@Base" 0.8.0
(c++)"IndexCopy::GrabFirst(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)@Base" 0.8.0
- (c++)"IndexCopy::~IndexCopy()@Base" 0.8.0
(c++)"SigVerify::CopyAndVerify(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)@Base" 0.8.0
(c++)"SigVerify::CopyMetaIndex(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
(c++)"SigVerify::Verify(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, indexRecords*)@Base" 0.8.0
@@ -685,7 +675,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"debSystem::UnLock(bool)@Base" 0.8.0
(c++)"debSystem::debSystem()@Base" 0.8.0
(c++)"debSystem::~debSystem()@Base" 0.8.0
- (c++)"metaIndex::~metaIndex()@Base" 0.8.0
(c++)"pkgDPkgPM::SendV2Pkgs(_IO_FILE*)@Base" 0.8.0
(c++)"pkgDPkgPM::DoTerminalPty(int)@Base" 0.8.0
(c++)"pkgDPkgPM::WriteHistoryTag(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.8.0
@@ -716,7 +705,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"pkgSystem::Score(Configuration const&)@Base" 0.8.0
(c++)"pkgSystem::GetSystem(char const*)@Base" 0.8.0
(c++)"pkgSystem::pkgSystem()@Base" 0.8.0
- (c++)"pkgSystem::~pkgSystem()@Base" 0.8.0
(c++)"HashString::VerifyFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const@Base" 0.8.0
(c++)"HashString::empty() const@Base" 0.8.0
(c++)"HashString::toStr() const@Base" 0.8.0
@@ -1448,7 +1436,6 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
### rework of the packagemanager rework
(c++)"APT::Progress::PackageManager::ConffilePrompt(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
(c++)"APT::Progress::PackageManager::Error(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.13~exp1
- (c++)"APT::Progress::PackageManagerFancy::GetNumberTerminalRows()@Base" 0.9.13~exp1
(c++)"APT::Progress::PackageManagerFancy::HandleSIGWINCH(int)@Base" 0.9.13~exp1
(c++)"APT::Progress::PackageManagerFancy::~PackageManagerFancy()@Base" 0.9.13~exp1
(c++)"APT::Progress::PackageManagerFancy::PackageManagerFancy()@Base" 0.9.13~exp1
@@ -1579,13 +1566,40 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++)"debListParser::ParseDepends(char const*, char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int&, bool const&, bool const&, bool const&)@Base" 0.9.16
(c++)"pkgCacheGenerator::ListParser::SameVersion(unsigned short, pkgCache::VerIterator const&)@Base" 0.9.16
(c++)"Rename(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)@Base" 0.9.16
+ (c++)"pkgDepCache::IsInstallOkDependenciesSatisfiableByCandidates(pkgCache::PkgIterator const&, bool, unsigned long, bool)@Base" 1.0
+ (c++)"APT::Progress::PackageManagerFancy::GetTerminalSize()@Base" 1.0
+ (c++)"APT::Progress::PackageManagerFancy::GetTextProgressStr(float, int)@Base" 1.0
+ (c++)"pkgCdromStatus::GetOpProgress()@Base" 1.0
+ (c++)"pkgCdromStatus::SetTotal(int)@Base" 1.0
+ (c++)"EDSP::ExecuteSolver(char const*, int*, int*, bool)@Base" 1.0.4
+ (c++)"pkgPackageManager::EarlyRemove(pkgCache::PkgIterator, pkgCache::DepIterator const*)@Base" 1.0.4
+ (c++)"debTranslationsParser::Architecture()@Base" 1.0.4
+ (c++)"debTranslationsParser::~debTranslationsParser()@Base" 1.0.4
+ (c++)"debTranslationsParser::Version()@Base" 1.0.4
+ (c++)"typeinfo for debTranslationsParser@Base" 1.0.4
+ (c++)"typeinfo name for debTranslationsParser@Base" 1.0.4
+ (c++)"vtable for debTranslationsParser@Base" 1.0.4
### demangle strangeness - buildd report it as MISSING and as new…
(c++)"pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<IndexTarget*, std::allocator<IndexTarget*> > const*, indexRecords*)@Base" 0.8.0
### gcc-4.6 artefacts
- (c++|optional=implicit)"HashString::operator=(HashString const&)@Base" 0.8.0
- (c++|optional=implicit)"HashString::HashString(HashString const&)@Base" 0.8.0
- (c++|optional=inline)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator std::max_element<APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, CompareProviders>(APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, CompareProviders)@Base" 0.8.0
- (c++|optional=inline)"pkgCache::VerIterator::ParentPkg() const@Base" 0.8.0
+# (c++|optional=implicit)"HashString::operator=(HashString const&)@Base" 0.8.0
+# (c++|optional=implicit)"HashString::HashString(HashString const&)@Base" 0.8.0
+# (c++|optional=inline)"APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator std::max_element<APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, CompareProviders>(APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, APT::VersionContainer<std::list<pkgCache::VerIterator, std::allocator<pkgCache::VerIterator> > >::iterator, CompareProviders)@Base" 0.8.0
+# (c++|optional=inline)"pkgCache::VerIterator::ParentPkg() const@Base" 0.8.0
+### gcc-4.8 artefacts
+# (c++|optional=implicit)"debSLTypeDebian::~debSLTypeDebian()@Base" 0.8.0
+### empty destructors included in the .h file
+# (c++|optional=inline)"pkgVersioningSystem::~pkgVersioningSystem()@Base" 0.8.0
+# (c++|optional=inline)"pkgSystem::~pkgSystem()@Base" 0.8.0
+# (c++|optional=inline)"pkgRecords::Parser::~Parser()@Base" 0.8.0
+# (c++|optional=inline)"pkgSrcRecords::Parser::~Parser()@Base" 0.8.0
+# (c++|optional=inline)"pkgIndexFile::Type::~Type()@Base" 0.8.0
+# (c++|optional=inline)"pkgSourceList::Type::~Type()@Base" 0.8.0
+# (c++|optional=inline)"pkgIndexFile::~pkgIndexFile()@Base" 0.8.0
+# (c++|optional=inline)"pkgCacheGenerator::ListParser::~ListParser()@Base" 0.8.0
+# (c++|optional=inline)"pkgAcquireStatus::~pkgAcquireStatus()@Base" 0.8.0
+# (c++|optional=inline)"metaIndex::~metaIndex()@Base" 0.8.0
+# (c++|optional=inline)"IndexCopy::~IndexCopy()@Base" 0.8.0
### std library artefacts
(c++|regex|optional=std)"^std::vector<DiffInfo, .+@Base$" 0.8.0
(c++|regex|optional=std)"^std::vector<.+ >::(vector|push_back|erase|_[^ ]+)\(.+\)( const|)@Base$" 0.8.0
@@ -1593,15 +1607,13 @@ libapt-pkg.so.4.12 libapt-pkg4.12 #MINVER#
(c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
(c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
(c++|optional=std)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0.8.0
- (c++|optional=std)"std::basic_string<char, std::char_traits<char>, std::allocator<char> >& std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_dispatch<unsigned char*>(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, unsigned char*, unsigned char*, std::__false_type)@Base" 0.8.0
### try to ignore std:: template instances
(c++|regex|optional=std)"^(void |)std::[^ ]+<.+ >::(_|~).+\(.*\)@Base$" 0.8.0
(c++|regex|optional=std)"^std::[^ ]+<.+ >::(append|insert|reserve|operator[^ ]+)\(.*\)@Base$" 0.8.0
(c++|regex|optional=std)"^(void |DiffInfo\* |)std::_.*@Base$" 0.8.0
- (c++|regex|optional=std)"^(bool|void) std::(operator|sort_heap|make_heap)[^ ]+<.+ >\(.+\)@Base$" 0.8.0
(c++|regex|optional=std)"^std::reverse_iterator<.+ > std::__.+@Base$" 0.8.0
(c++|regex|optional=std)"^std::basic_string<.+ >\(.+\)@Base$" 0.8.0
- (c++|regex|optional=std)"^std::basic_string<.+ >::basic_string<.+>\(.+\)@Base$" 0.8.0
(c++|regex|optional=std)"^__gnu_cxx::__[^ ]+<.*@Base$" 0.8.0
(c++|regex|optional=std)"^typeinfo name for std::iterator<.*>@Base$" 0.8.0
(c++|regex|optional=std)"^typeinfo for std::iterator<.*>@Base$" 0.8.0
+ (c++|optional=std)"std::ctype<char>::do_widen(char) const@Base" 1.0.3
diff --git a/doc/external-dependency-solver-protocol.txt b/doc/external-dependency-solver-protocol.txt
index 7a124d8f9..790f2f1ee 100644
--- a/doc/external-dependency-solver-protocol.txt
+++ b/doc/external-dependency-solver-protocol.txt
@@ -1,4 +1,4 @@
-# APT External Dependency Solver Protocol (EDSP) - version 0.4
+# APT External Dependency Solver Protocol (EDSP) - version 0.5
This document describes the communication protocol between APT and
external dependency solvers. The protocol is called APT EDSP, for "APT
@@ -110,16 +110,24 @@ Within a dependency solving scenario, a request represents the action on
installed packages requested by the user.
A request is a single Deb 822 stanza opened by a mandatory Request field
-and followed by a mixture of action and preference fields.
+and followed by a mixture of action, preference, and global
+configuration fields.
The value of the **Request:** field is a string describing the EDSP
protocol which will be used to communicate. At present, the string must
-be `EDSP 0.4`.
+be `EDSP 0.5`. Request fields are mainly used to identify the beginning
+of a request stanza; their actual values are otherwise not used by the
+EDSP protocol.
-a unique request identifier, such as an
-UUID. Request fields are mainly used to identify the beginning of a
-request stanza; their actual values are otherwise not used by the EDSP
-protocol.
+The following **configuration fields** are supported in request stanzas:
+
+- **Architecture:** (mandatory) The name of the *native* architecture on
+ the user machine (see also: `dpkg --print-architecture`)
+
+- **Architectures:** (optional, defaults to the native architecture) A
+ space separated list of *all* architectures known to APT (this is
+ roughly equivalent to the union of `dpkg --print-architecture` and
+ `dpkg --print-foreign-architectures`)
The following **action fields** are supported in request stanzas:
@@ -201,6 +209,15 @@ field. The following fields are supported in package stanzas:
should be removed by the solver only when the Autoremove action is
requested (see Request section).
+- **APT-Release:** (optional) The releases the package belongs to, according to
+ APT. The format of this field is multiline with one value per line and the
+ first line (the one containing the field name) empty. Each subsequent line
+ corresponds to one of the releases the package belongs to and looks like
+ this: `o=Debian,a=unstable,n=sid,l=Debian,c=main`. That is, each release line
+ is a comma-separated list of "key=value" pairs, each of which denotes a
+ Release file entry (Origin, Label, Codename, etc.) in the format of
+ APT_PREFERENCES(5).
+
### Answer
An answer from the external solver to APT is either a *solution* or an
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc
index 12eac20d8..0901492f7 100644
--- a/ftparchive/cachedb.cc
+++ b/ftparchive/cachedb.cc
@@ -99,7 +99,7 @@ bool CacheDB::ReadyDB(std::string const &DB)
return _error->Error(_("Unable to open DB file %s: %s"),DB.c_str(), db_strerror(err));
}
}
-
+
DBFile = DB;
DBLoaded = true;
return true;
@@ -188,6 +188,45 @@ bool CacheDB::GetFileStat(bool const &doStat)
return true;
}
/*}}}*/
+// CacheDB::GetCurStatCompatOldFormat /*{{{*/
+// ---------------------------------------------------------------------
+/* Read the old (32bit FileSize) StateStore format from disk */
+bool CacheDB::GetCurStatCompatOldFormat()
+{
+ InitQueryStats();
+ Data.data = &CurStatOldFormat;
+ Data.flags = DB_DBT_USERMEM;
+ Data.ulen = sizeof(CurStatOldFormat);
+ if (Get() == false)
+ {
+ CurStat.Flags = 0;
+ } else {
+ CurStat.Flags = CurStatOldFormat.Flags;
+ CurStat.mtime = CurStatOldFormat.mtime;
+ CurStat.FileSize = CurStatOldFormat.FileSize;
+ memcpy(CurStat.MD5, CurStatOldFormat.MD5, sizeof(CurStat.MD5));
+ memcpy(CurStat.SHA1, CurStatOldFormat.SHA1, sizeof(CurStat.SHA1));
+ memcpy(CurStat.SHA256, CurStatOldFormat.SHA256, sizeof(CurStat.SHA256));
+ }
+ return true;
+}
+ /*}}}*/
+// CacheDB::GetCurStatCompatOldFormat /*{{{*/
+// ---------------------------------------------------------------------
+/* Read the new (64bit FileSize) StateStore format from disk */
+bool CacheDB::GetCurStatCompatNewFormat()
+{
+ InitQueryStats();
+ Data.data = &CurStat;
+ Data.flags = DB_DBT_USERMEM;
+ Data.ulen = sizeof(CurStat);
+ if (Get() == false)
+ {
+ CurStat.Flags = 0;
+ }
+ return true;
+}
+ /*}}}*/
// CacheDB::GetCurStat - Set the CurStat variable. /*{{{*/
// ---------------------------------------------------------------------
/* Sets the CurStat variable. Either to 0 if no database is used
@@ -198,19 +237,29 @@ bool CacheDB::GetCurStat()
if (DBLoaded)
{
- /* First see if there is anything about it
- in the database */
-
- /* Get the flags (and mtime) */
+ // do a first query to just get the size of the data on disk
InitQueryStats();
- // Ensure alignment of the returned structure
Data.data = &CurStat;
- Data.ulen = sizeof(CurStat);
Data.flags = DB_DBT_USERMEM;
- if (Get() == false)
+ Data.ulen = 0;
+ Get();
+
+ if (Data.size == 0)
{
- CurStat.Flags = 0;
- }
+ // nothing needs to be done, we just have not data for this deb
+ }
+ // check if the record is written in the old format (32bit filesize)
+ else if(Data.size == sizeof(CurStatOldFormat))
+ {
+ GetCurStatCompatOldFormat();
+ }
+ else if(Data.size == sizeof(CurStat))
+ {
+ GetCurStatCompatNewFormat();
+ } else {
+ return _error->Error("Cache record size mismatch (%ul)", Data.size);
+ }
+
CurStat.Flags = ntohl(CurStat.Flags);
CurStat.FileSize = ntohl(CurStat.FileSize);
}
diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h
index edb8594bf..29d710d2c 100644
--- a/ftparchive/cachedb.h
+++ b/ftparchive/cachedb.h
@@ -85,8 +85,12 @@ class CacheDB
bool OpenDebFile();
void CloseDebFile();
- bool GetFileStat(bool const &doStat = false);
+ // GetCurStat needs some compat code, see lp #1274466)
+ bool GetCurStatCompatOldFormat();
+ bool GetCurStatCompatNewFormat();
bool GetCurStat();
+
+ bool GetFileStat(bool const &doStat = false);
bool LoadControl();
bool LoadContents(bool const &GenOnly);
bool LoadSource();
@@ -101,6 +105,20 @@ class CacheDB
FlSHA512=(1<<6), FlSource=(1<<7),
};
+ // the on-disk format changed (FileSize increased to 64bit) in
+ // commit 650faab0 which will lead to corruption with old caches
+ struct StatStoreOldFormat
+ {
+ uint32_t Flags;
+ uint32_t mtime;
+ uint32_t FileSize;
+ uint8_t MD5[16];
+ uint8_t SHA1[20];
+ uint8_t SHA256[32];
+ } CurStatOldFormat;
+
+ // WARNING: this struct is read/written to the DB so do not change the
+ // layout of the fields (see lp #1274466), only append to it
struct StatStore
{
uint32_t Flags;
diff --git a/po/it.po b/po/it.po
index 77183b431..c7d596ce2 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,24 +1,24 @@
# Italian translation of apt
-# Copyright (C) 2002-2010, 2011, 2012, 2013 The Free Software Foundation, Inc.
+# Copyright (C) 2002-2010, 2011, 2012, 2013, 2014 The Free Software Foundation, Inc.
# This file is distributed under the same license as the apt package.
# Samuele Giovanni Tonon <samu@debian.org>, 2002.
-# Milo Casagrande <milo@ubuntu.com>, 2009, 2010, 2011, 2012, 2013.
+# Milo Casagrande <milo@ubuntu.com>, 2009, 2010, 2011, 2012, 2013, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: apt\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2014-05-05 16:26+0200\n"
-"PO-Revision-Date: 2013-08-27 22:06+0200\n"
-"Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
+"PO-Revision-Date: 2014-05-31 17:04+0100\n"
+"Last-Translator: Milo Casagrande <milo@milo.name>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
+"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
"X-Launchpad-Export-Date: 2012-06-25 19:48+0000\n"
-"X-Generator: Gtranslator 2.91.6\n"
+"X-Generator: Poedit 1.6.5\n"
#: cmdline/apt-cache.cc:149
#, c-format
@@ -255,7 +255,6 @@ msgid "Failed to mount '%s' to '%s'"
msgstr "Mount di \"%s\" su \"%s\" non riuscito"
#: cmdline/apt-cdrom.cc:178
-#, fuzzy
msgid ""
"No CD-ROM could be auto-detected or found using the default mount point.\n"
"You may try the --cdrom option to set the CD-ROM mount point.\n"
@@ -265,8 +264,8 @@ msgstr ""
"Impossibile rilevare automaticamente un CD-ROM oppure è stato trovato con "
"il\n"
"punto di mount predefinito.\n"
-"È possibile provare l'opzione --cdrom per impostare il punto di mount del\n"
-"CD-ROM. Per maggiori informazioni sull'autorilevamento e sul punto di mount\n"
+"Provare l'opzione --cdrom per impostare il punto di mount del CD-ROM.\n"
+"Per maggiori informazioni sull'autorilevamento e sul punto di mount\n"
"del CD-ROM, consultare \"man apt-cdrom\"."
#: cmdline/apt-cdrom.cc:182
@@ -306,22 +305,19 @@ msgstr ""
" -o=? Imposta un'opzione di configurazione, come -o dir::cache=/tmp\n"
#: cmdline/apt-get.cc:245
-#, fuzzy, c-format
+#, c-format
msgid "Can not find a package for architecture '%s'"
-msgstr ""
-"Impossibile trovare alcun pacchetto tramite l'espressione regolare \"%s\""
+msgstr "Impossibile trovare un pacchetto per l'architettura \"%s\""
#: cmdline/apt-get.cc:327
-#, fuzzy, c-format
+#, c-format
msgid "Can not find a package '%s' with version '%s'"
-msgstr ""
-"Impossibile trovare alcun pacchetto tramite l'espressione regolare \"%s\""
+msgstr "Impossibile trovare un pacchetto \"%s\" con versione \"%s\""
#: cmdline/apt-get.cc:330
-#, fuzzy, c-format
+#, c-format
msgid "Can not find a package '%s' with release '%s'"
-msgstr ""
-"Impossibile trovare alcun pacchetto tramite l'espressione regolare \"%s\""
+msgstr "Impossibile trovare un pacchetto \"%s\" con release \"%s\""
#: cmdline/apt-get.cc:367
#, c-format
@@ -329,9 +325,9 @@ msgid "Picking '%s' as source package instead of '%s'\n"
msgstr "Scelto \"%s\" come pacchetto sorgente al posto di \"%s\"\n"
#: cmdline/apt-get.cc:423
-#, fuzzy, c-format
+#, c-format
msgid "Can not find version '%s' of package '%s'"
-msgstr "Ignorata la versione \"%s\" non disponibile del pacchetto \"%s\""
+msgstr "Impossibile trovare la versione \"%s\" del pacchetto \"%s\""
#: cmdline/apt-get.cc:454
#, c-format
@@ -645,14 +641,12 @@ msgstr ""
" Questo APT ha i poteri della Super Mucca.\n"
#: cmdline/apt-helper.cc:35
-#, fuzzy
msgid "Must specify at least one pair url/filename"
-msgstr ""
-"È necessario specificare almeno un pacchetto di cui recuperare il sorgente"
+msgstr "È necessario specificare almeno una coppia URL/nome file"
#: cmdline/apt-helper.cc:52
msgid "Download Failed"
-msgstr ""
+msgstr "Scaricamento non riuscito"
#: cmdline/apt-helper.cc:65
msgid ""
@@ -666,6 +660,15 @@ msgid ""
"\n"
" This APT helper has Super Meep Powers.\n"
msgstr ""
+"Uso: apt-helper [OPZIONI] COMANDO\n"
+" apt-helper [OPZIONI] download-file uri percorso\n"
+"\n"
+"apt-helper è un programma d'aiuto interno per apt\n"
+"\n"
+"Comandi:\n"
+" download-file Scarica l'URI fornito in percorso\n"
+"\n"
+" Questo APT ha super poteri.\n"
#: cmdline/apt-mark.cc:68
#, c-format
@@ -713,7 +716,6 @@ msgid "Executing dpkg failed. Are you root?"
msgstr "Esecuzione di dpkg non riuscita. È stato lanciato come root?"
#: cmdline/apt-mark.cc:392
-#, fuzzy
msgid ""
"Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
"\n"
@@ -743,12 +745,17 @@ msgstr ""
"\n"
"apt-mark è una semplice interfaccia a riga di comando per segnalare i "
"pacchetti\n"
-"come installati manualmente o automaticamente. Può anche elencare le \n"
+"come installati manualmente o automaticamente. Può anche elencare le "
"segnalazioni.\n"
"\n"
"Comandi:\n"
-" auto Segna i pacchetti forniti come installati automaticamente\n"
-" manual Segna i pacchetti forniti come installati manualmente\n"
+" auto Segna i pacchetti forniti come installati automaticamente\n"
+" manual Segna i pacchetti forniti come installati manualmente\n"
+" hold Segna un pacchetto come bloccato a una vecchia versione\n"
+" unhold Sblocca un pacchetto bloccato a una vecchia versione\n"
+" showauto Stampa l'elenco dei pacchetti installati automaticamente\n"
+" showmanual Stampa l'elenco dei pacchetti installati manualmente\n"
+" showhold Stampa l'elenco dei pacchetti bloccati\n"
"\n"
"Opzioni:\n"
" -h Mostra questo aiuto\n"
@@ -782,6 +789,25 @@ msgid ""
"\n"
" edit-sources - edit the source information file\n"
msgstr ""
+"Uso: apt [OPZIONI] COMANDO\n"
+"\n"
+"Interfaccia a riga di comando per apt.\n"
+"Comandi di base:\n"
+" list Elenca i pacchetti in base al nome\n"
+" search Cerca tra le descrizioni dei pacchetti\n"
+" show Mostra dettagli di un pacchetto\n"
+"\n"
+" update Aggiorna l'elenco dei pacchetti disponibili\n"
+"\n"
+" install Installa pacchetti\n"
+" remove Rimuove pacchetti\n"
+"\n"
+" upgrade Esegue l'avanzamento di versione del sistema installando e\n"
+" aggiornando i pacchetti\n"
+" full-upgrade Esegue l'avanzamento di versione del sistema rimuovendo,\n"
+" installando e aggiornando i pacchetti\n"
+"\n"
+" edit-sources Modifica il file sulle informazioni delle sorgenti\n"
#: methods/cdrom.cc:203
#, c-format
@@ -1167,9 +1193,8 @@ msgid "Calculating upgrade... "
msgstr "Calcolo dell'aggiornamento... "
#: apt-private/private-upgrade.cc:30
-#, fuzzy
msgid "Internal error, Upgrade broke stuff"
-msgstr "Errore interno, AllUpgrade ha rovinato qualche cosa"
+msgstr "Errore interno, Upgrade ha rovinato qualche cosa"
#: apt-private/private-upgrade.cc:32
msgid "Done"
@@ -1177,19 +1202,19 @@ msgstr "Eseguito"
#: apt-private/private-cacheset.cc:35 apt-private/private-search.cc:47
msgid "Sorting"
-msgstr ""
+msgstr "Ordinamento"
#: apt-private/private-list.cc:131
msgid "Listing"
-msgstr ""
+msgstr "Elencazione"
#: apt-private/private-list.cc:164
#, c-format
msgid "There is %i additional version. Please use the '-a' switch to see it"
msgid_plural ""
"There are %i additional versions. Please use the '-a' switch to see them."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "C'è %i versione aggiuntiva: usare \"-a\" per visualizzarla"
+msgstr[1] "Ci sono %i versioni aggiuntive: usare \"-a\" per visualizzarle"
#: apt-private/private-cachefile.cc:93
msgid "Correcting dependencies..."
@@ -1222,40 +1247,37 @@ msgstr "Dipendenze non trovate. Riprovare usando -f."
#: apt-private/private-output.cc:102 apt-private/private-show.cc:84
#: apt-private/private-show.cc:89
msgid "unknown"
-msgstr ""
+msgstr "sconosciuto"
#: apt-private/private-output.cc:232
-#, fuzzy, c-format
+#, c-format
msgid "[installed,upgradable to: %s]"
-msgstr " [Installato]"
+msgstr "[installato, aggiornabile a: %s]"
#: apt-private/private-output.cc:236
-#, fuzzy
msgid "[installed,local]"
-msgstr " [Installato]"
+msgstr "[installato, locale]"
#: apt-private/private-output.cc:239
msgid "[installed,auto-removable]"
-msgstr ""
+msgstr "[installato, auto-rimovibile]"
#: apt-private/private-output.cc:241
-#, fuzzy
msgid "[installed,automatic]"
-msgstr " [Installato]"
+msgstr "[installato, automatico]"
#: apt-private/private-output.cc:243
-#, fuzzy
msgid "[installed]"
-msgstr " [Installato]"
+msgstr "[installato]"
#: apt-private/private-output.cc:247
#, c-format
msgid "[upgradable from: %s]"
-msgstr ""
+msgstr "[aggiornabile da: %s]"
#: apt-private/private-output.cc:251
msgid "[residual-config]"
-msgstr ""
+msgstr "[configurazione residua]"
#: apt-private/private-output.cc:351
msgid "The following packages have unmet dependencies:"
@@ -1394,12 +1416,12 @@ msgstr "Il comando update non accetta argomenti"
msgid "There is %i additional record. Please use the '-a' switch to see it"
msgid_plural ""
"There are %i additional records. Please use the '-a' switch to see them."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "C'è %i record aggiuntivo: usare \"-a\" per visualizzarlo"
+msgstr[1] "Ci sono %i record aggiuntivi: usare \"-a\" per visualizzarli"
#: apt-private/private-show.cc:163
msgid "not a real package (virtual)"
-msgstr ""
+msgstr "non un vero pacchetto (virtuale)"
#: apt-private/private-install.cc:81
msgid "Internal error, InstallPackages was called with broken packages!"
@@ -1667,18 +1689,19 @@ msgid "Failed to fetch %s %s\n"
msgstr "Impossibile recuperare %s %s\n"
#: apt-private/private-sources.cc:58
-#, fuzzy, c-format
+#, c-format
msgid "Failed to parse %s. Edit again? "
-msgstr "Rinomina di %s in %s non riuscita"
+msgstr "Analisi di %s non riuscita: modificare nuovamente?"
#: apt-private/private-sources.cc:70
#, c-format
msgid "Your '%s' file changed, please run 'apt-get update'."
msgstr ""
+"Il proprio file \"%s\" è stato modificato: eseguire \"apt-get update\"."
#: apt-private/private-search.cc:51
msgid "Full Text Search"
-msgstr ""
+msgstr "Ricerca sul testo"
#: apt-private/acqprogress.cc:66
msgid "Hit "
@@ -1984,7 +2007,7 @@ msgstr "Impossibile eseguire stat su %s."
#: apt-pkg/install-progress.cc:57
#, c-format
msgid "Progress: [%3i%%]"
-msgstr ""
+msgstr "Avanzamento: [%3i%%]"
#: apt-pkg/install-progress.cc:91 apt-pkg/install-progress.cc:174
msgid "Running dpkg"
@@ -2036,9 +2059,9 @@ msgid "The method driver %s could not be found."
msgstr "Impossibile trovare un driver per il metodo %s."
#: apt-pkg/acquire-worker.cc:118
-#, fuzzy, c-format
+#, c-format
msgid "Is the package %s installed?"
-msgstr "Verificare che il pacchetto \"dpkg-dev\" sia installato.\n"
+msgstr "Il pacchetto %s è installato?"
#: apt-pkg/acquire-worker.cc:169
#, c-format
@@ -2253,9 +2276,8 @@ msgid "Size mismatch"
msgstr "Le dimensioni non corrispondono"
#: apt-pkg/acquire-item.cc:173
-#, fuzzy
msgid "Invalid file format"
-msgstr "Operazione %s non valida"
+msgstr "Formato file non valido"
#: apt-pkg/acquire-item.cc:1579
#, c-format
@@ -2590,10 +2612,9 @@ msgstr ""
"Impossibile trovare alcun pacchetto tramite l'espressione regolare \"%s\""
#: apt-pkg/cacheset.cc:615
-#, fuzzy, c-format
+#, c-format
msgid "Couldn't find any package by glob '%s'"
-msgstr ""
-"Impossibile trovare alcun pacchetto tramite l'espressione regolare \"%s\""
+msgstr "Impossibile trovare alcun pacchetto tramite il glob \"%s\""
#: apt-pkg/cacheset.cc:626
#, c-format
@@ -2657,9 +2678,9 @@ msgid "Invalid 'Date' entry in Release file %s"
msgstr "Voce \"Date\" nel file Release %s non valida"
#: apt-pkg/sourcelist.cc:127
-#, fuzzy, c-format
+#, c-format
msgid "Malformed stanza %u in source list %s (URI parse)"
-msgstr "La riga %lu nel file %s non è corretta (URI parse)"
+msgstr "La stanza %u nel file delle sorgenti %s non è corretta (analisi URI)"
#: apt-pkg/sourcelist.cc:170
#, c-format
@@ -2734,12 +2755,13 @@ msgstr "La riga %u nel file %s non è corretta (type)"
#: apt-pkg/sourcelist.cc:375
#, c-format
msgid "Type '%s' is not known on line %u in source list %s"
-msgstr "Tipo \"%s\" non riconosciuto alla riga %u nel file %s"
+msgstr "Tipo \"%s\" non riconosciuto alla riga %u nel file delle sorgenti %s"
#: apt-pkg/sourcelist.cc:416
-#, fuzzy, c-format
+#, c-format
msgid "Type '%s' is not known on stanza %u in source list %s"
-msgstr "Tipo \"%s\" non riconosciuto alla riga %u nel file %s"
+msgstr ""
+"Tipo \"%s\" non riconosciuto nella stanza %u nel file delle sorgenti %s"
#: apt-pkg/deb/dpkgpm.cc:95
#, c-format
@@ -2824,20 +2846,20 @@ msgstr "Pacchetto %s rimosso completamente"
#: apt-pkg/deb/dpkgpm.cc:1066
msgid "ioctl(TIOCGWINSZ) failed"
-msgstr ""
+msgstr "ioctl(TIOCGWINSZ) non riuscita"
#: apt-pkg/deb/dpkgpm.cc:1069 apt-pkg/deb/dpkgpm.cc:1090
-#, fuzzy, c-format
+#, c-format
msgid "Can not write log (%s)"
-msgstr "Impossibile scrivere in %s"
+msgstr "Impossibile scrivere il registro (%s)"
#: apt-pkg/deb/dpkgpm.cc:1069
msgid "Is /dev/pts mounted?"
-msgstr ""
+msgstr "È /dev/pts montato?"
#: apt-pkg/deb/dpkgpm.cc:1090
msgid "Is stdout a terminal?"
-msgstr ""
+msgstr "stdout è un terminale?"
#: apt-pkg/deb/dpkgpm.cc:1568
msgid "Operation was interrupted before it could finish"
@@ -2876,23 +2898,22 @@ msgid ""
"error"
msgstr ""
"Segnalazione apport non scritta poiché il messaggio di errore indica un "
-"errore di memoria esaurita"
+"errore di memoria esaurita."
#: apt-pkg/deb/dpkgpm.cc:1657 apt-pkg/deb/dpkgpm.cc:1663
-#, fuzzy
msgid ""
"No apport report written because the error message indicates an issue on the "
"local system"
msgstr ""
"Segnalazione apport non scritta poiché il messaggio di errore indica un "
-"errore per disco pieno."
+"errore nel sistema locale."
#: apt-pkg/deb/dpkgpm.cc:1684
msgid ""
"No apport report written because the error message indicates a dpkg I/O error"
msgstr ""
"Segnalazione apport non scritta poiché il messaggio di errore indica un "
-"errore di I/O di dpkg"
+"errore di I/O di dpkg."
#: apt-pkg/deb/debsystem.cc:91
#, c-format
@@ -3297,9 +3318,9 @@ msgstr ""
" -o=? Imposta un'opzione di configurazione, come -o dir::cache=/tmp\n"
#: cmdline/apt-extracttemplates.cc:254
-#, fuzzy, c-format
+#, c-format
msgid "Unable to mkstemp %s"
-msgstr "Impossibile eseguire stat su %s"
+msgstr "Impossibile eseguire mkstemp %s"
#: cmdline/apt-extracttemplates.cc:300
msgid "Cannot get debconf version. Is debconf installed?"
@@ -3550,9 +3571,9 @@ msgstr "Impossibile aprire %s"
#. skip spaces
#. find end of word
#: ftparchive/override.cc:68
-#, fuzzy, c-format
+#, c-format
msgid "Malformed override %s line %llu (%s)"
-msgstr "Override %s riga %llu malformato #1"
+msgstr "Override %s riga %llu malformato (%s)"
#: ftparchive/override.cc:127 ftparchive/override.cc:201
#, c-format
diff --git a/test/integration/cachedb-lp1274466-old-format.db b/test/integration/cachedb-lp1274466-old-format.db
new file mode 100644
index 000000000..88da5f1ee
--- /dev/null
+++ b/test/integration/cachedb-lp1274466-old-format.db
Binary files differ
diff --git a/test/integration/deb-lp1274466-cachedb.deb b/test/integration/deb-lp1274466-cachedb.deb
new file mode 100644
index 000000000..43d7ee6f1
--- /dev/null
+++ b/test/integration/deb-lp1274466-cachedb.deb
Binary files differ
diff --git a/test/integration/framework b/test/integration/framework
index 4f0a69994..7959699fd 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -194,6 +194,12 @@ setupenvironment() {
touch var/lib/dpkg/available
mkdir -p usr/lib/apt
ln -s ${METHODSDIR} usr/lib/apt/methods
+ if [ "$BUILDDIRECTORY" = "$LIBRARYPATH" ]; then
+ mkdir -p usr/lib/apt/solvers
+ ln -s "${BUILDDIRECTORY}/apt-dump-solver" usr/lib/apt/solvers/dump
+ ln -s "${BUILDDIRECTORY}/apt-internal-solver" usr/lib/apt/solvers/apt
+ echo "Dir::Bin::Solvers \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/solvers\";" > etc/apt/apt.conf.d/externalsolver.conf
+ fi
# use the autoremove from the BUILDDIRECTORY if its there, otherwise
# system
if [ -e ${BUILDDIRECTORY}/../../debian/apt.conf.autoremove ]; then
diff --git a/test/integration/run-tests b/test/integration/run-tests
index d700cc3fc..d39daeee5 100755
--- a/test/integration/run-tests
+++ b/test/integration/run-tests
@@ -39,7 +39,7 @@ fi
TOTAL="$(run-parts --list $DIR | grep '/test-' | wc -l)"
for testcase in $(run-parts --list $DIR | grep '/test-'); do
if [ "$MSGLEVEL" -le 2 ]; then
- echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: "
+ echo -n "($(($ALL+1))/${TOTAL}) ${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: "
else
echo "${CTEST}Run Testcase ($(($ALL+1))/${TOTAL}) ${CHIGH}$(basename ${testcase})${CRESET}"
fi
diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466
new file mode 100755
index 000000000..211740a53
--- /dev/null
+++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466
@@ -0,0 +1,51 @@
+#!/bin/sh
+set -e
+
+
+#
+# main()
+#
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+
+# gather the db and the deb, ensure mtime is not modfied as its saved in the DB
+cp -p $TESTDIR/deb-lp1274466-cachedb.deb foo_1_i386.deb
+cp $TESTDIR/cachedb-lp1274466-old-format.db old-format.db
+
+# verify that the format is different
+testsuccess aptftparchive --db new-format.db packages .
+db_dump new-format.db > new-format.dump
+db_dump old-format.db > old-format.dump
+testfailure diff -u old-format.dump new-format.dump
+
+# ensure the new format as the sha512
+testsuccess grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c new-format.dump
+# but the old format does not
+testfailure grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c old-format.dump
+
+# regression test for corruption with previous generation of cachedb
+testequal "Package: foo
+Priority: optional
+Section: others
+Installed-Size: 29
+Maintainer: Joe Sixpack <joe@example.org>
+Architecture: i386
+Version: 1
+Filename: ./foo_1_i386.deb
+Size: 1270
+MD5sum: 85d0e908c1a897700e2c5dea72d7e3c0
+SHA1: 858b09169032b7925a0e463f46b6634243fc40ce
+SHA256: 3750a2c9c6b5beee7f307564be3d51d3ec7cbb78fa4f0b47f84a7c41477bff59
+SHA512: 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c
+Description: an autogenerated dummy foo=1/test
+ If you find such a package installed on your system,
+ something went horribly wrong! They are autogenerated
+ und used only by testcases and surf no other propose…
+" aptftparchive --db old-format.db packages .
+
+# ensure that the db is updated
+db_dump old-format.db > old-format.dump
+testsuccess diff -u old-format.dump new-format.dump
+
diff --git a/test/integration/test-bug-745046-candidate-propagation-fails b/test/integration/test-bug-745046-candidate-propagation-fails
new file mode 100755
index 000000000..e4aa67a72
--- /dev/null
+++ b/test/integration/test-bug-745046-candidate-propagation-fails
@@ -0,0 +1,39 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'amd64'
+
+insertinstalledpackage 'gedit' 'amd64' '1'
+
+insertpackage 'unstable' 'gedit' 'amd64' '1'
+insertpackage 'experimental' 'gedit' 'amd64' '2' 'Depends: common (>= 2)'
+
+setupaptarchive
+
+testequal "Reading package lists...
+Building dependency tree...
+Selected version '2' (experimental [amd64]) for 'gedit'
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ gedit : Depends: common (>= 2) but it is not installable
+E: Unable to correct problems, you have held broken packages." aptget install gedit/experimental -sq=0
+
+insertinstalledpackage 'common' 'amd64' '2'
+
+testequal "Reading package lists...
+Building dependency tree...
+Selected version '2' (experimental [amd64]) for 'gedit'
+The following packages will be upgraded:
+ gedit
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+Inst gedit [1] (2 experimental [amd64])
+Conf gedit (2 experimental [amd64])" aptget install gedit/experimental -sq=0
diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes
index 67ca0ba27..6671dd75a 100755
--- a/test/integration/test-compressed-indexes
+++ b/test/integration/test-compressed-indexes
@@ -67,6 +67,8 @@ testrun() {
msgtest "\tdsc file is present"; testsuccess --nomsg test -f testpkg_1.0.dsc
msgtest "\tdirectory is present"; testsuccess --nomsg test -d testpkg-1.0
rm -rf testpkg-1.0
+ testequal "$(aptcache show testpkg -o Acquire::Languages=none)
+" aptcache dumpavail
}
echo 'Acquire::GzipIndexes "false";' > rootdir/etc/apt/apt.conf.d/02compressindex
diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak
index 842dce61c..d60c6cbd5 100755
--- a/test/integration/test-essential-force-loopbreak
+++ b/test/integration/test-essential-force-loopbreak
@@ -5,18 +5,18 @@ TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
-configarchitecture 'amd64'
+configarchitecture 'native'
-insertinstalledpackage 'sysvinit' 'amd64' '1' 'Essential: yes'
+insertinstalledpackage 'sysvinit' 'native' '1' 'Essential: yes'
-buildsimplenativepackage 'sysvinit' 'amd64' '2' 'sid' 'Pre-Depends: sysvinit-core | systemd-sysv
+buildsimplenativepackage 'sysvinit' 'native' '2' 'sid' 'Pre-Depends: sysvinit-core | systemd-sysv
Essential: yes'
-buildsimplenativepackage 'sysvinit-core' 'amd64' '2' 'sid'
+buildsimplenativepackage 'sysvinit-core' 'native' '2' 'sid'
-buildsimplenativepackage 'systemd-sysv' 'amd64' '2~conflict' 'sid-conflict' 'Conflicts: sysvinit (<< 2)
+buildsimplenativepackage 'systemd-sysv' 'native' '2~conflict' 'sid-conflict' 'Conflicts: sysvinit (<< 2)
Breaks: sysvinit-core'
-buildsimplenativepackage 'systemd-sysv' 'amd64' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core'
+buildsimplenativepackage 'systemd-sysv' 'native' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core'
setupaptarchive
@@ -25,7 +25,7 @@ cp -a rootdir/var/lib/dpkg/status dpkg.status.backup
testforcebreak() {
cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
rm -f rootdir/var/lib/apt/extended_states
- testequal 'Reading package lists...
+ testequal "Reading package lists...
Building dependency tree...
The following extra packages will be installed:
sysvinit
@@ -34,8 +34,8 @@ The following NEW packages will be installed:
The following packages will be upgraded:
sysvinit
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
-E: This installation run will require temporarily removing the essential package sysvinit:amd64 due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
-E: Internal Error, Could not early remove sysvinit:amd64 (2)' aptget install systemd-sysv -t "$1" -s
+E: This installation run will require temporarily removing the essential package sysvinit:$(getarchitecture 'native') due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
+E: Internal Error, Could not early remove sysvinit:amd64 (2)" aptget install systemd-sysv -t "$1" -s
# ensure that really nothing happens
testfailure aptget install systemd-sysv -y -t "$1" -o Debug::pkgPackageManager=1
testdpkginstalled 'sysvinit'
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol
new file mode 100755
index 000000000..129565993
--- /dev/null
+++ b/test/integration/test-external-dependency-solver-protocol
@@ -0,0 +1,65 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertinstalledpackage 'cool' 'all' '1'
+insertinstalledpackage 'stuff' 'all' '1'
+
+insertpackage 'unstable' 'cool' 'all' '2' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'stuff' 'all' '2' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'coolstuff' 'i386,amd64' '2' 'Depends: cool, stuff'
+insertpackage 'unstable' 'awesome' 'all' '2' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'awesomecoolstuff' 'i386' '2' 'Depends: coolstuff, awesome'
+
+insertpackage 'experimental' 'cool' 'all' '3' 'Multi-Arch: foreign'
+insertpackage 'experimental' 'stuff' 'all' '3' 'Multi-Arch: foreign'
+insertpackage 'experimental' 'coolstuff' 'i386,amd64' '3' 'Depends: cool, stuff'
+
+setupaptarchive
+
+rm -f /tmp/dump.edsp
+testequal 'Reading package lists...
+Building dependency tree...
+Execute external solver...
+The solver encountered an error of type: ERR_JUST_DUMPING
+The following information might help you to understand what is wrong:
+I am too dumb, i can just dump!
+Please use one of my friends instead!
+
+E: External solver failed with: I am too dumb, i can just dump!' aptget install --solver dump coolstuff -s
+testsuccess test -s /tmp/dump.edsp
+rm -f /tmp/dump.edsp
+
+#FIXME: this should be unstable, but we don't support pinning yet
+testequal 'Reading package lists...
+Building dependency tree...
+Execute external solver...
+The following NEW packages will be installed:
+ coolstuff
+0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
+Inst coolstuff (3 experimental [amd64])
+Conf coolstuff (3 experimental [amd64])' aptget install --solver apt coolstuff -s
+
+testsuccess aptget install awesomecoolstuff:i386 -s
+testsuccess aptget install --solver apt awesomecoolstuff:i386 -s
+
+rm -f /tmp/dump.edsp
+testfailure aptget install --solver dump awesomecoolstuff:i386 -s
+testsuccess test -s /tmp/dump.edsp
+
+configarchitecture 'armel'
+msgtest 'Test direct calling is okay for' 'apt-internal-solver'
+cat /tmp/dump.edsp | runapt apt-internal-solver > solver.result 2>&1 || true
+if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then
+ msgpass
+else
+ cat solver.result
+ msgfail
+fi
+rm -f /tmp/dump.edsp
+
+testfailure aptget install --solver apt awesomecoolstuff:i386 -s