projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an options and timeout config item to ssh/rsh.
[apt.git]
/
apt-pkg
/
algorithms.cc
diff --git
a/apt-pkg/algorithms.cc
b/apt-pkg/algorithms.cc
index aa3e86568cb88c2b6c902df8eb79d6889b6ac5aa..fec16e09589d5dd2d8385a6c74f4131d6f31b7fa 100644
(file)
--- a/
apt-pkg/algorithms.cc
+++ b/
apt-pkg/algorithms.cc
@@
-1,6
+1,6
@@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: algorithms.cc,v 1.4
1 2002/04/26 05:36:20 jgg
Exp $
+// $Id: algorithms.cc,v 1.4
2 2002/11/09 23:10:32 doogie
Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
/* ######################################################################
Algorithms - A set of misc algorithms
@@
-49,17
+49,22
@@
pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache),
/*}}}*/
// Simulate::Describe - Describe a package /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
// Simulate::Describe - Describe a package /*{{{*/
// ---------------------------------------------------------------------
-/* */
+/* Parameter Now == true gives both current and available varsion,
+ Parameter Now == false gives only the available package version */
void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Now)
{
VerIterator Ver(Sim);
void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Now)
{
VerIterator Ver(Sim);
+
+ out << Pkg.Name();
+
if (Now == true)
if (Now == true)
+ {
Ver = Pkg.CurrentVer();
Ver = Pkg.CurrentVer();
- else
- Ver = Sim[Pkg].CandidateVerIter(Sim);
+ if (Ver.end() == false)
+ out << " [" << Ver.VerStr() << ']';
+ }
- out << Pkg.Name();
-
+ Ver = Sim[Pkg].CandidateVerIter(Sim);
if (Ver.end() == true)
return;
if (Ver.end() == true)
return;
@@
-76,7
+81,7
@@
bool pkgSimulate::Install(PkgIterator iPkg,string /*File*/)
Flags[Pkg->ID] = 1;
cout << "Inst ";
Flags[Pkg->ID] = 1;
cout << "Inst ";
- Describe(Pkg,cout,
fals
e);
+ Describe(Pkg,cout,
tru
e);
Sim.MarkInstall(Pkg,false);
// Look for broken conflicts+predepends.
Sim.MarkInstall(Pkg,false);
// Look for broken conflicts+predepends.