Browse Source

add the various foldmarkers in apt-pkg & cmdline (no code change)

debian/1.8.y
David Kalnischkies 13 years ago
parent
commit
92fcbfc163
  1. 102
      apt-pkg/acquire-item.cc
  2. 44
      apt-pkg/acquire-item.h
  3. 2
      apt-pkg/acquire-method.cc
  4. 5
      apt-pkg/acquire.cc
  5. 24
      apt-pkg/acquire.h
  6. 3
      apt-pkg/algorithms.cc
  7. 8
      apt-pkg/algorithms.h
  8. 3
      apt-pkg/cachefile.cc
  9. 36
      apt-pkg/cacheiterators.h
  10. 18
      apt-pkg/cdrom.cc
  11. 9
      apt-pkg/cdrom.h
  12. 1
      apt-pkg/clean.cc
  13. 11
      apt-pkg/contrib/hashes.cc
  14. 32
      apt-pkg/contrib/sha256.cc
  15. 54
      apt-pkg/depcache.cc
  16. 16
      apt-pkg/indexcopy.cc
  17. 22
      apt-pkg/indexcopy.h
  18. 1
      apt-pkg/indexfile.cc
  19. 14
      apt-pkg/indexrecords.cc
  20. 10
      apt-pkg/orderlist.cc
  21. 4
      apt-pkg/packagemanager.cc
  22. 48
      apt-pkg/pkgcache.h
  23. 1
      apt-pkg/pkgcachegen.cc
  24. 8
      apt-pkg/pkgcachegen.h
  25. 8
      apt-pkg/pkgrecords.h
  26. 19
      apt-pkg/vendorlist.cc
  27. 19
      cmdline/apt-cache.cc
  28. 10
      cmdline/apt-cdrom.cc
  29. 4
      cmdline/apt-config.cc
  30. 4
      cmdline/apt-extracttemplates.cc
  31. 18
      cmdline/apt-get.cc
  32. 8
      cmdline/apt-sortpkgs.cc
  33. 1
      debian/changelog
  34. 348
      po/apt-all.pot

102
apt-pkg/acquire-item.cc

@ -131,9 +131,7 @@ void pkgAcquire::Item::Rename(string From,string To)
}
}
/*}}}*/
// AcqDiffIndex::AcqDiffIndex - Constructor
// AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Get the DiffIndex file first and see if there are patches availabe
* If so, create a pkgAcqIndexDiffs fetcher that will get and apply the
@ -184,7 +182,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
QueueURI(Desc);
}
/*}}}*/
// AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
/* The only header we use is the last-modified header. */
@ -202,9 +200,8 @@ string pkgAcqDiffIndex::Custom600Headers()
return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
/*}}}*/
bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/
{
if(Debug)
std::clog << "pkgAcqIndexDiffs::ParseIndexDiff() " << IndexDiffFile
@ -291,8 +288,8 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
std::clog << "Can't find a patch in the index file" << std::endl;
return false;
}
void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
/*}}}*/
void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
{
if(Debug)
std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << std::endl
@ -305,8 +302,8 @@ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Status = StatDone;
Dequeue();
}
void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash,
/*}}}*/
void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/
pkgAcquire::MethodConfig *Cnf)
{
if(Debug)
@ -335,10 +332,8 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash,
Dequeue();
return;
}
// AcqIndexDiffs::AcqIndexDiffs - Constructor
/*}}}*/
// AcqIndexDiffs::AcqIndexDiffs - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* The package diff is added to the queue. one object is constructed
* for each diff and the index
@ -372,9 +367,8 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
QueueNextDiff();
}
}
void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
/*}}}*/
void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
{
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << std::endl
@ -383,9 +377,8 @@ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
ExpectedHash);
Finish();
}
// helper that cleans the item out of the fetcher queue
/*}}}*/
// Finish - helper that cleans the item out of the fetcher queue /*{{{*/
void pkgAcqIndexDiffs::Finish(bool allDone)
{
// we restore the original name, this is required, otherwise
@ -420,10 +413,8 @@ void pkgAcqIndexDiffs::Finish(bool allDone)
Dequeue();
return;
}
bool pkgAcqIndexDiffs::QueueNextDiff()
/*}}}*/
bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
{
// calc sha1 of the just patched file
@ -469,10 +460,8 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
return true;
}
void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash,
/*}}}*/
void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/
pkgAcquire::MethodConfig *Cnf)
{
if(Debug)
@ -543,8 +532,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash,
return Finish(true);
}
}
/*}}}*/
// AcqIndex::AcqIndex - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* The package file is added to the queue and a second class is
@ -594,8 +582,7 @@ string pkgAcqIndex::Custom600Headers()
return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
{
bool descChanged = false;
// no .bz2 found, retry with .gz
@ -630,8 +617,7 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Item::Failed(Message,Cnf);
}
/*}}}*/
// AcqIndex::Done - Finished a fetch /*{{{*/
// ---------------------------------------------------------------------
/* This goes through a number of states.. On the initial fetch the
@ -735,7 +721,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
QueueURI(Desc);
Mode = decompProg;
}
/*}}}*/
// AcqIndexTrans::pkgAcqIndexTrans - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* The Translation file is added to the queue */
@ -744,7 +730,6 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
: pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashString(), "")
{
}
/*}}}*/
// AcqIndexTrans::Failed - Silence failure messages for missing files /*{{{*/
// ---------------------------------------------------------------------
@ -764,8 +749,7 @@ void pkgAcqIndexTrans::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Item::Failed(Message,Cnf);
}
/*}}}*/
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, /*{{{*/
string URI,string URIDesc,string ShortDesc,
string MetaIndexURI, string MetaIndexURIDesc,
string MetaIndexShortDesc,
@ -854,7 +838,7 @@ void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5,
}
/*}}}*/
void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
{
string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
@ -890,8 +874,8 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
Item::Failed(Message,Cnf);
}
pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner,
/*}}}*/
pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/
string URI,string URIDesc,string ShortDesc,
string SigFile,
const vector<struct IndexTarget*>* IndexTargets,
@ -910,7 +894,6 @@ pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner,
QueueURI(Desc);
}
/*}}}*/
// pkgAcqMetaIndex::Custom600Headers - Insert custom request headers /*{{{*/
// ---------------------------------------------------------------------
@ -926,8 +909,8 @@ string pkgAcqMetaIndex::Custom600Headers()
return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash,
/*}}}*/
void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*/
pkgAcquire::MethodConfig *Cfg)
{
Item::Done(Message,Size,Hash,Cfg);
@ -968,8 +951,8 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash,
}
}
}
void pkgAcqMetaIndex::RetrievalDone(string Message)
/*}}}*/
void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/
{
// We have just finished downloading a Release file (it is not
// verified yet)
@ -1007,8 +990,8 @@ void pkgAcqMetaIndex::RetrievalDone(string Message)
chmod(FinalFile.c_str(),0644);
DestFile = FinalFile;
}
void pkgAcqMetaIndex::AuthDone(string Message)
/*}}}*/
void pkgAcqMetaIndex::AuthDone(string Message) /*{{{*/
{
// At this point, the gpgv method has succeeded, so there is a
// valid signature from a key in the trusted keyring. We
@ -1041,8 +1024,8 @@ void pkgAcqMetaIndex::AuthDone(string Message)
Rename(SigFile,VerifiedSigFile);
chmod(VerifiedSigFile.c_str(),0644);
}
void pkgAcqMetaIndex::QueueIndexes(bool verify)
/*}}}*/
void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/
{
for (vector <struct IndexTarget*>::const_iterator Target = IndexTargets->begin();
Target != IndexTargets->end();
@ -1084,8 +1067,8 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)
(*Target)->ShortDesc, ExpectedIndexHash);
}
}
bool pkgAcqMetaIndex::VerifyVendor(string Message)
/*}}}*/
bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/
{
// // Maybe this should be made available from above so we don't have
// // to read and parse it every time?
@ -1171,9 +1154,8 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message)
return true;
}
/*}}}*/
// pkgAcqMetaIndex::Failed - no Release file present or no signature
// file present /*{{{*/
/*}}}*/
// pkgAcqMetaIndex::Failed - no Release file present or no signature file present /*{{{*/
// ---------------------------------------------------------------------
/* */
void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
@ -1210,9 +1192,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
// back to queueing Packages files without verification
QueueIndexes(false);
}
/*}}}*/
// AcqArchive::AcqArchive - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* This just sets up the initial fetch environment and queues the first
@ -1495,14 +1475,13 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
}
}
/*}}}*/
// AcqArchive::IsTrusted - Determine whether this archive comes from a
// trusted source /*{{{*/
// AcqArchive::IsTrusted - Determine whether this archive comes from a trusted source /*{{{*/
// ---------------------------------------------------------------------
bool pkgAcqArchive::IsTrusted()
{
return Trusted;
}
/*}}}*/
// AcqArchive::Finished - Fetching has finished, tidy up /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -1514,7 +1493,6 @@ void pkgAcqArchive::Finished()
StoreFilename = string();
}
/*}}}*/
// AcqFile::pkgAcqFile - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* The file is added to the queue */

44
apt-pkg/acquire-item.h

@ -34,7 +34,7 @@
* \file acquire-item.h
*/
/** \brief Represents the process by which a pkgAcquire object should
/** \brief Represents the process by which a pkgAcquire object should {{{
* retrieve a file or a collection of files.
*
* By convention, Item subclasses should insert themselves into the
@ -261,8 +261,8 @@ class pkgAcquire::Item
*/
virtual ~Item();
};
/** \brief Information about an index patch (aka diff). */
/*}}}*/
/** \brief Information about an index patch (aka diff). */ /*{{{*/
struct DiffInfo {
/** The filename of the diff. */
string file;
@ -273,8 +273,8 @@ struct DiffInfo {
/** The size of the diff. */
unsigned long size;
};
/** \brief An item that is responsible for fetching an index file of
/*}}}*/
/** \brief An item that is responsible for fetching an index file of {{{
* package list diffs and starting the package list's download.
*
* This item downloads the Index file and parses it, then enqueues
@ -348,8 +348,8 @@ class pkgAcqDiffIndex : public pkgAcquire::Item
pkgAcqDiffIndex(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc, HashString ExpectedHash);
};
/** \brief An item that is responsible for fetching all the patches
/*}}}*/
/** \brief An item that is responsible for fetching all the patches {{{
* that need to be applied to a given package index file.
*
* After downloading and applying a single patch, this item will
@ -477,8 +477,8 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item
string ShortDesc, HashString ExpectedHash,
vector<DiffInfo> diffs=vector<DiffInfo>());
};
/** \brief An acquire item that is responsible for fetching an index
/*}}}*/
/** \brief An acquire item that is responsible for fetching an index {{{
* file (e.g., Packages or Sources).
*
* \sa pkgAcqDiffIndex, pkgAcqIndexDiffs, pkgAcqIndexTrans
@ -545,8 +545,8 @@ class pkgAcqIndex : public pkgAcquire::Item
pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc, HashString ExpectedHash, string compressExt="");
};
/** \brief An acquire item that is responsible for fetching a
/*}}}*/
/** \brief An acquire item that is responsible for fetching a {{{
* translated index file.
*
* The only difference from pkgAcqIndex is that transient failures
@ -579,8 +579,8 @@ class pkgAcqIndexTrans : public pkgAcqIndex
pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc);
};
/** \brief Information about an index file. */
/*}}}*/
/** \brief Information about an index file. */ /*{{{*/
struct IndexTarget
{
/** \brief A URI from which the index file can be downloaded. */
@ -597,8 +597,8 @@ struct IndexTarget
*/
string MetaKey;
};
/** \brief An acquire item that downloads the detached signature
/*}}}*/
/** \brief An acquire item that downloads the detached signature {{{
* of a meta-index (Release) file, then queues up the release
* file itself.
*
@ -660,8 +660,8 @@ class pkgAcqMetaSig : public pkgAcquire::Item
const vector<struct IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser);
};
/** \brief An item that is responsible for downloading the meta-index
/*}}}*/
/** \brief An item that is responsible for downloading the meta-index {{{
* file (i.e., Release) itself and verifying its signature.
*
* Once the download and verification are complete, the downloads of
@ -756,8 +756,8 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
const vector<struct IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser);
};
/** \brief An item that is responsible for fetching a package file.
/*}}}*/
/** \brief An item that is responsible for fetching a package file. {{{
*
* If the package file already exists in the cache, nothing will be
* done.
@ -840,8 +840,8 @@ class pkgAcqArchive : public pkgAcquire::Item
pkgRecords *Recs,pkgCache::VerIterator const &Version,
string &StoreFilename);
};
/** \brief Retrieve an arbitrary file to the current directory.
/*}}}*/
/** \brief Retrieve an arbitrary file to the current directory. {{{
*
* The file is retrieved even if it is accessed via a URL type that
* normally is a NOP, such as "file". If the download fails, the
@ -902,7 +902,7 @@ class pkgAcqFile : public pkgAcquire::Item
string Desc, string ShortDesc,
const string &DestDir="", const string &DestFilename="");
};
/*}}}*/
/** @} */
#endif

2
apt-pkg/acquire-method.cc

@ -446,7 +446,6 @@ void pkgAcqMethod::Status(const char *Format,...)
exit(100);
}
/*}}}*/
// AcqMethod::Redirect - Send a redirect message /*{{{*/
// ---------------------------------------------------------------------
/* This method sends the redirect message and also manipulates the queue
@ -478,7 +477,6 @@ void pkgAcqMethod::Redirect(const string &NewURI)
QueueBack = I->Next;
}
/*}}}*/
// AcqMethod::FetchResult::FetchResult - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */

5
apt-pkg/acquire.cc

@ -484,7 +484,7 @@ double pkgAcquire::PartialPresent()
Total += (*I)->PartialSize;
return Total;
}
/*}}}*/
// Acquire::UriBegin - Start iterator for the uri list /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -501,7 +501,6 @@ pkgAcquire::UriIterator pkgAcquire::UriEnd()
return UriIterator(0);
}
/*}}}*/
// Acquire::MethodConfig::MethodConfig - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -515,7 +514,6 @@ pkgAcquire::MethodConfig::MethodConfig()
Next = 0;
}
/*}}}*/
// Queue::Queue - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -727,7 +725,6 @@ void pkgAcquire::Queue::Bump()
Cycle();
}
/*}}}*/
// AcquireStatus::pkgAcquireStatus - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */

24
apt-pkg/acquire.h

@ -30,7 +30,7 @@
##################################################################### */
/*}}}*/
/** \defgroup acquire Acquire system
/** \defgroup acquire Acquire system {{{
*
* \brief The Acquire system is responsible for retrieving files from
* local or remote URIs and postprocessing them (for instance,
@ -54,7 +54,7 @@
* once, but it is not clear what its behavior in this case is, and
* no subclass of pkgAcquire::Item seems to actually use this
* capability.
*/
*/ /*}}}*/
/** \addtogroup acquire
*
@ -78,7 +78,7 @@ using std::string;
class pkgAcquireStatus;
/** \brief The core download scheduler.
/** \brief The core download scheduler. {{{
*
* This class represents an ongoing download. It manages the lists
* of active and pending downloads and handles setting up and tearing
@ -366,8 +366,8 @@ struct pkgAcquire::ItemDesc
/** brief The underlying item which is to be downloaded. */
Item *Owner;
};
/** \brief A single download queue in a pkgAcquire object.
/*}}}*/
/** \brief A single download queue in a pkgAcquire object. {{{
*
* \todo Why so many protected values?
*/
@ -528,8 +528,8 @@ class pkgAcquire::Queue
*/
~Queue();
};
/** \brief Iterates over all the URIs being fetched by a pkgAcquire object. */
/*}}}*/
/** \brief Iterates over all the URIs being fetched by a pkgAcquire object. {{{*/
class pkgAcquire::UriIterator
{
/** The next queue to iterate over. */
@ -568,8 +568,8 @@ class pkgAcquire::UriIterator
}
}
};
/** \brief Information about the properties of a single acquire method. */
/*}}}*/
/** \brief Information about the properties of a single acquire method. {{{*/
struct pkgAcquire::MethodConfig
{
/** \brief The next link on the acquire method list.
@ -621,8 +621,8 @@ struct pkgAcquire::MethodConfig
*/
MethodConfig();
};
/** \brief A monitor object for downloads controlled by the pkgAcquire class.
/*}}}*/
/** \brief A monitor object for downloads controlled by the pkgAcquire class. {{{
*
* \todo Why protected members?
*
@ -762,7 +762,7 @@ class pkgAcquireStatus
pkgAcquireStatus();
virtual ~pkgAcquireStatus() {};
};
/*}}}*/
/** @} */
#endif

3
apt-pkg/algorithms.cc

@ -442,7 +442,6 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache)
return true;
}
/*}}}*/
// ProblemResolver::pkgProblemResolver - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -1323,7 +1322,6 @@ void pkgProblemResolver::InstallProtect()
}
}
/*}}}*/
// PrioSortList - Sort a list of versions by priority /*{{{*/
// ---------------------------------------------------------------------
/* This is ment to be used in conjunction with AllTargets to get a list
@ -1354,7 +1352,6 @@ void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List)
qsort(List,Count,sizeof(*List),PrioComp);
}
/*}}}*/
// CacheFile::ListUpdate - update the cache files /*{{{*/
// ---------------------------------------------------------------------
/* This is a simple wrapper to update the cache. it will fetch stuff

8
apt-pkg/algorithms.h

@ -39,7 +39,7 @@
using std::ostream;
class pkgSimulate : public pkgPackageManager
class pkgSimulate : public pkgPackageManager /*{{{*/
{
protected:
@ -75,8 +75,8 @@ private:
pkgSimulate(pkgDepCache *Cache);
};
class pkgProblemResolver
/*}}}*/
class pkgProblemResolver /*{{{*/
{
pkgDepCache &Cache;
typedef pkgCache::PkgIterator PkgIterator;
@ -124,7 +124,7 @@ class pkgProblemResolver
pkgProblemResolver(pkgDepCache *Cache);
~pkgProblemResolver();
};
/*}}}*/
bool pkgDistUpgrade(pkgDepCache &Cache);
bool pkgApplyStatus(pkgDepCache &Cache);
bool pkgFixBroken(pkgDepCache &Cache);

3
apt-pkg/cachefile.cc

@ -24,7 +24,6 @@
#include <apti18n.h>
/*}}}*/
// CacheFile::CacheFile - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -108,8 +107,6 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
return true;
}
/*}}}*/
// CacheFile::Close - close the cache files /*{{{*/
// ---------------------------------------------------------------------
/* */

36
apt-pkg/cacheiterators.h

@ -32,7 +32,7 @@
#define PKGLIB_CACHEITERATORS_H
// Package Iterator
// Package Iterator /*{{{*/
class pkgCache::PkgIterator
{
friend class pkgCache;
@ -96,8 +96,8 @@ class pkgCache::PkgIterator
};
inline PkgIterator() : Pkg(0), Owner(0), HashIndex(0) {};
};
// Version Iterator
/*}}}*/
// Version Iterator /*{{{*/
class pkgCache::VerIterator
{
Version *Ver;
@ -155,8 +155,8 @@ class pkgCache::VerIterator
Ver = Owner.VerP;
};
};
// Description Iterator
/*}}}*/
// Description Iterator /*{{{*/
class pkgCache::DescIterator
{
Description *Desc;
@ -199,8 +199,8 @@ class pkgCache::DescIterator
Desc = Owner.DescP;
};
};
// Dependency iterator
/*}}}*/
// Dependency iterator /*{{{*/
class pkgCache::DepIterator
{
Dependency *Dep;
@ -258,8 +258,8 @@ class pkgCache::DepIterator
};
inline DepIterator() : Dep(0), Type(DepVer), Owner(0) {};
};
// Provides iterator
/*}}}*/
// Provides iterator /*{{{*/
class pkgCache::PrvIterator
{
Provides *Prv;
@ -311,8 +311,8 @@ class pkgCache::PrvIterator
Prv = Owner.ProvideP;
};
};
// Package file
/*}}}*/
// Package file /*{{{*/
class pkgCache::PkgFileIterator
{
pkgCache *Owner;
@ -358,8 +358,8 @@ class pkgCache::PkgFileIterator
inline PkgFileIterator(pkgCache &Owner) : Owner(&Owner), File(Owner.PkgFileP) {};
inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Owner(&Owner), File(Trg) {};
};
// Version File
/*}}}*/
// Version File /*{{{*/
class pkgCache::VerFileIterator
{
pkgCache *Owner;
@ -390,8 +390,8 @@ class pkgCache::VerFileIterator
inline VerFileIterator() : Owner(0), FileP(0) {};
inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Owner(&Owner), FileP(Trg) {};
};
// Description File
/*}}}*/
// Description File /*{{{*/
class pkgCache::DescFileIterator
{
pkgCache *Owner;
@ -422,8 +422,8 @@ class pkgCache::DescFileIterator
inline DescFileIterator() : Owner(0), FileP(0) {};
inline DescFileIterator(pkgCache &Owner,DescFile *Trg) : Owner(&Owner), FileP(Trg) {};
};
// Inlined Begin functions cant be in the class because of order problems
/*}}}*/
// Inlined Begin functions cant be in the class because of order problems /*{{{*/
inline pkgCache::VerIterator pkgCache::PkgIterator::VersionList() const
{return VerIterator(*Owner,Owner->VerP + Pkg->VersionList);};
inline pkgCache::VerIterator pkgCache::PkgIterator::CurrentVer() const
@ -442,5 +442,5 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const
{return VerFileIterator(*Owner,Owner->VerFileP + Ver->FileList);};
inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const
{return DescFileIterator(*Owner,Owner->DescFileP + Desc->FileList);};
/*}}}*/
#endif

18
apt-pkg/cdrom.cc

@ -160,7 +160,7 @@ bool pkgCdrom::FindPackages(string CD,
return !_error->PendingError();
}
/*}}}*/
// Score - We compute a 'score' for a path /*{{{*/
// ---------------------------------------------------------------------
/* Paths are scored based on how close they come to what I consider
@ -210,7 +210,6 @@ int pkgCdrom::Score(string Path)
return Res;
}
/*}}}*/
// DropBinaryArch - Dump dirs with a string like /binary-<foo>/ /*{{{*/
// ---------------------------------------------------------------------
@ -248,8 +247,7 @@ bool pkgCdrom::DropBinaryArch(vector<string> &List)
return true;
}
/*}}}*/
// DropRepeats - Drop repeated files resulting from symlinks /*{{{*/
// ---------------------------------------------------------------------
/* Here we go and stat every file that we found and strip dup inodes. */
@ -304,7 +302,6 @@ bool pkgCdrom::DropRepeats(vector<string> &List,const char *Name)
return true;
}
/*}}}*/
// ReduceSourceList - Takes the path list and reduces it /*{{{*/
// ---------------------------------------------------------------------
/* This takes the list of source list expressed entires and collects
@ -513,9 +510,8 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
return true;
}
bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
/*}}}*/
bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log) /*{{{*/
{
stringstream msg;
@ -573,9 +569,8 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
return true;
}
bool pkgCdrom::Add(pkgCdromStatus *log)
/*}}}*/
bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/
{
stringstream msg;
@ -844,3 +839,4 @@ bool pkgCdrom::Add(pkgCdromStatus *log)
return true;
}
/*}}}*/

9
apt-pkg/cdrom.h

@ -8,7 +8,7 @@
using namespace std;
class pkgCdromStatus
class pkgCdromStatus /*{{{*/
{
protected:
int totalSteps;
@ -29,8 +29,8 @@ class pkgCdromStatus
// Progress indicator for the Index rewriter
virtual OpProgress* GetOpProgress() {return NULL; };
};
class pkgCdrom
/*}}}*/
class pkgCdrom /*{{{*/
{
protected:
enum {
@ -65,7 +65,6 @@ class pkgCdrom
bool Ident(string &ident, pkgCdromStatus *log);
bool Add(pkgCdromStatus *log);
};
/*}}}*/
#endif

1
apt-pkg/clean.cc

@ -19,7 +19,6 @@
#include <sys/stat.h>
#include <unistd.h>
/*}}}*/
// ArchiveCleaner::Go - Perform smart cleanup of the archive /*{{{*/
// ---------------------------------------------------------------------
/* Scan the directory for files to erase, we check the version information

11
apt-pkg/contrib/hashes.cc

@ -34,7 +34,7 @@ HashString::HashString(string Type, string Hash) : Type(Type), Hash(Hash)
{
}
HashString::HashString(string StringedHash)
HashString::HashString(string StringedHash) /*{{{*/
{
// legacy: md5sum without "MD5Sum:" prefix
if (StringedHash.find(":") == string::npos && StringedHash.size() == 32)
@ -50,9 +50,8 @@ HashString::HashString(string StringedHash)
if(_config->FindB("Debug::Hashes",false) == true)
std::clog << "HashString(string): " << Type << " : " << Hash << std::endl;
}
bool HashString::VerifyFile(string filename) const
/*}}}*/
bool HashString::VerifyFile(string filename) const /*{{{*/
{
FileFd fd;
MD5Summation MD5;
@ -83,7 +82,7 @@ bool HashString::VerifyFile(string filename) const
return (fileHash == Hash);
}
/*}}}*/
const char** HashString::SupportedHashes()
{
return _SupportedHashes;
@ -94,13 +93,11 @@ bool HashString::empty() const
return (Type.empty() || Hash.empty());
}
string HashString::toStr() const
{
return Type+string(":")+Hash;
}
// Hashes::AddFD - Add the contents of the FD /*{{{*/
// ---------------------------------------------------------------------
/* */

32
apt-pkg/contrib/sha256.cc

@ -1,5 +1,5 @@
/*
* Cryptographic API.
* Cryptographic API. {{{
*
* SHA-256, as specified in
* http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf
@ -17,7 +17,7 @@
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
*/
*/ /*}}}*/
#ifdef __GNUG__
#pragma implementation "apt-pkg/sha256.h"
@ -65,20 +65,20 @@ static inline u32 Maj(u32 x, u32 y, u32 z)
#define H6 0x1f83d9ab
#define H7 0x5be0cd19
static inline void LOAD_OP(int I, u32 *W, const u8 *input)
static inline void LOAD_OP(int I, u32 *W, const u8 *input) /*{{{*/
{
W[I] = ( ((u32) input[I * 4 + 0] << 24)
| ((u32) input[I * 4 + 1] << 16)
| ((u32) input[I * 4 + 2] << 8)
| ((u32) input[I * 4 + 3]));
}
/*}}}*/
static inline void BLEND_OP(int I, u32 *W)
{
W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16];
}
static void sha256_transform(u32 *state, const u8 *input)
static void sha256_transform(u32 *state, const u8 *input) /*{{{*/
{
u32 a, b, c, d, e, f, g, h, t1, t2;
u32 W[64];
@ -240,8 +240,8 @@ static void sha256_transform(u32 *state, const u8 *input)
a = b = c = d = e = f = g = h = t1 = t2 = 0;
memset(W, 0, 64 * sizeof(u32));
}
SHA256Summation::SHA256Summation()
/*}}}*/
SHA256Summation::SHA256Summation() /*{{{*/
{
Sum.state[0] = H0;
Sum.state[1] = H1;
@ -255,8 +255,8 @@ SHA256Summation::SHA256Summation()
memset(Sum.buf, 0, sizeof(Sum.buf));
Done = false;
}
bool SHA256Summation::Add(const u8 *data, unsigned long len)
/*}}}*/
bool SHA256Summation::Add(const u8 *data, unsigned long len) /*{{{*/
{
struct sha256_ctx *sctx = &Sum;
unsigned int i, index, part_len;
@ -291,8 +291,8 @@ bool SHA256Summation::Add(const u8 *data, unsigned long len)
return true;
}
SHA256SumValue SHA256Summation::Result()
/*}}}*/
SHA256SumValue SHA256Summation::Result() /*{{{*/
{
struct sha256_ctx *sctx = &Sum;
if (!Done) {
@ -340,7 +340,7 @@ SHA256SumValue SHA256Summation::Result()
return res;
}
/*}}}*/
// SHA256SumValue::SHA256SumValue - Constructs the sum from a string /*{{{*/
// ---------------------------------------------------------------------
/* The string form of a SHA256 is a 64 character hex number */
@ -349,7 +349,6 @@ SHA256SumValue::SHA256SumValue(string Str)
memset(Sum,0,sizeof(Sum));
Set(Str);
}
/*}}}*/
// SHA256SumValue::SHA256SumValue - Default constructor /*{{{*/
// ---------------------------------------------------------------------
@ -358,7 +357,6 @@ SHA256SumValue::SHA256SumValue()
{
memset(Sum,0,sizeof(Sum));
}
/*}}}*/
// SHA256SumValue::Set - Set the sum from a string /*{{{*/
// ---------------------------------------------------------------------
@ -391,9 +389,7 @@ string SHA256SumValue::Value() const
return string(Result);
}
/*}}}*/
// SHA256SumValue::operator == - Comparator /*{{{*/
// ---------------------------------------------------------------------
/* Call memcmp on the buffer */
@ -402,8 +398,6 @@ bool SHA256SumValue::operator == (const SHA256SumValue & rhs) const
return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0;
}
/*}}}*/
// SHA256Summation::AddFD - Add content of file into the checksum /*{{{*/
// ---------------------------------------------------------------------
/* */

54
apt-pkg/depcache.cc

@ -27,8 +27,8 @@
#include <sys/stat.h>
#include <apti18n.h>
// helper for Install-Recommends-Sections and Never-MarkAuto-Sections
/*}}}*/
// helper for Install-Recommends-Sections and Never-MarkAuto-Sections /*{{{*/
static bool
ConfigValueInSubTree(const char* SubTree, const char *needle)
{
@ -47,8 +47,8 @@ ConfigValueInSubTree(const char* SubTree, const char *needle)
}
return false;
}
pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) :
/*}}}*/
pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : /*{{{*/
cache(cache), released(false)
{
++cache.group_level;
@ -76,7 +76,7 @@ pkgDepCache::ActionGroup::~ActionGroup()
{
release();
}
/*}}}*/
// DepCache::pkgDepCache - Constructors /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -161,8 +161,7 @@ bool pkgDepCache::Init(OpProgress *Prog)
return true;
}
/*}}}*/
bool pkgDepCache::readStateFile(OpProgress *Prog)
bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/
{
FileFd state_file;
string state = _config->FindDir("Dir::State") + "extended_states";
@ -200,8 +199,8 @@ bool pkgDepCache::readStateFile(OpProgress *Prog)
return true;
}
bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
/*}}}*/
bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/
{
if(_config->FindB("Debug::pkgAutoRemove",false))
std::clog << "pkgDepCache::writeStateFile()" << std::endl;
@ -283,7 +282,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
return true;
}
/*}}}*/
// DepCache::CheckDep - Checks a single dependency /*{{{*/
// ---------------------------------------------------------------------
/* This first checks the dependency against the main target package and
@ -701,9 +700,7 @@ void pkgDepCache::Update(PkgIterator const &Pkg)
P.end() != true; P++)
Update(P.ParentPkg().RevDependsList());
}
/*}}}*/
// DepCache::MarkKeep - Put the package in the keep state /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -1056,7 +1053,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
}
}
}
/*}}}*/
// DepCache::AutoInstOk - check if it is to install this package /*{{{*/
// ---------------------------------------------------------------------
/* The default implementation just honors dpkg hold
@ -1168,7 +1165,6 @@ const char *pkgDepCache::StateCache::StripEpoch(const char *Ver)
return Ver;
}
/*}}}*/
// Policy::GetCandidateVer - Returns the Candidate install version /*{{{*/
// ---------------------------------------------------------------------
/* The default just returns the highest available version that is not
@ -1205,7 +1201,6 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator Pkg)
return Last;
}
/*}}}*/
// Policy::IsImportantDep - True if the dependency is important /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -1231,8 +1226,7 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep)
return false;
}
/*}}}*/
pkgDepCache::DefaultRootSetFunc::DefaultRootSetFunc()
pkgDepCache::DefaultRootSetFunc::DefaultRootSetFunc() /*{{{*/
: constructedSuccessfully(false)
{
Configuration::Item const *Opts;
@ -1261,8 +1255,8 @@ pkgDepCache::DefaultRootSetFunc::DefaultRootSetFunc()
constructedSuccessfully = true;
}
pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()
/*}}}*/
pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc() /*{{{*/
{
for(unsigned int i = 0; i < rootSetRegexp.size(); i++)
{
@ -1270,9 +1264,8 @@ pkgDepCache::DefaultRootSetFunc::~DefaultRootSetFunc()
delete rootSetRegexp[i];
}
}
bool pkgDepCache::DefaultRootSetFunc::InRootSet(const pkgCache::PkgIterator &pkg)
/*}}}*/
bool pkgDepCache::DefaultRootSetFunc::InRootSet(const pkgCache::PkgIterator &pkg) /*{{{*/
{
for(unsigned int i = 0; i < rootSetRegexp.size(); i++)
if (regexec(rootSetRegexp[i], pkg.Name(), 0, 0, 0) == 0)
@ -1280,8 +1273,8 @@ bool pkgDepCache::DefaultRootSetFunc::InRootSet(const pkgCache::PkgIterator &pkg
return false;
}
pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc()
/*}}}*/
pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc() /*{{{*/
{
DefaultRootSetFunc *f = new DefaultRootSetFunc;
if(f->wasConstructedSuccessfully())
@ -1292,7 +1285,7 @@ pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc()
return NULL;
}
}
/*}}}*/
bool pkgDepCache::MarkFollowsRecommends()
{
return _config->FindB("APT::AutoRemove::RecommendsImportant", true);
@ -1303,7 +1296,7 @@ bool pkgDepCache::MarkFollowsSuggests()
return _config->FindB("APT::AutoRemove::SuggestsImportant", false);
}
// the main mark algorithm
// pkgDepCache::MarkRequired - the main mark algorithm /*{{{*/
bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc)
{
bool follow_recommends;
@ -1348,8 +1341,8 @@ bool pkgDepCache::MarkRequired(InRootSetFunc &userFunc)
return true;
}
// mark a single package in Mark-and-Sweep
/*}}}*/
// MarkPackage - mark a single package in Mark-and-Sweep /*{{{*/
void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
const pkgCache::VerIterator &ver,
bool follow_recommends,
@ -1468,8 +1461,8 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg,
}
}
}
bool pkgDepCache::Sweep()
/*}}}*/
bool pkgDepCache::Sweep() /*{{{*/
{
// do the sweep
for(PkgIterator p=PkgBegin(); !p.end(); ++p)
@ -1492,3 +1485,4 @@ bool pkgDepCache::Sweep()
return true;
}
/*}}}*/

16
apt-pkg/indexcopy.cc

@ -542,8 +542,8 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
return true;
}
bool SigVerify::CopyMetaIndex(string CDROM, string CDName,
/*}}}*/
bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/
string prefix, string file)
{
char S[400];
@ -563,8 +563,8 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName,
return true;
}
bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
/*}}}*/
bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList, /*{{{*/
vector<string> PkgList,vector<string> SrcList)
{
if (SigList.size() == 0)
@ -665,10 +665,9 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
return true;
}
bool TranslationsCopy::CopyTranslations(string CDROM,string Name,vector<string> &List,
pkgCdromStatus *log)
/*}}}*/
bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
vector<string> &List, pkgCdromStatus *log)
{
OpProgress *Progress = NULL;
if (List.size() == 0)
@ -840,3 +839,4 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name,vector<string>
return true;
}
/*}}}*/

22
apt-pkg/indexcopy.h

@ -22,7 +22,7 @@ class FileFd;
class indexRecords;
class pkgCdromStatus;
class IndexCopy
class IndexCopy /*{{{*/
{
protected:
@ -45,8 +45,8 @@ class IndexCopy
pkgCdromStatus *log);
virtual ~IndexCopy() {};
};
class PackageCopy : public IndexCopy
/*}}}*/
class PackageCopy : public IndexCopy /*{{{*/
{
protected:
@ -57,8 +57,8 @@ class PackageCopy : public IndexCopy
public:
};
class SourceCopy : public IndexCopy
/*}}}*/
class SourceCopy : public IndexCopy /*{{{*/
{
protected:
@ -69,8 +69,8 @@ class SourceCopy : public IndexCopy
public:
};
class TranslationsCopy
/*}}}*/
class TranslationsCopy /*{{{*/
{
protected:
pkgTagSection *Section;
@ -79,9 +79,8 @@ class TranslationsCopy
bool CopyTranslations(string CDROM,string Name,vector<string> &List,
pkgCdromStatus *log);
};
class SigVerify
/*}}}*/
class SigVerify /*{{{*/
{
bool Verify(string prefix,string file, indexRecords *records);
bool CopyMetaIndex(string CDROM, string CDName,