summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-11-27 15:40:47 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-27 15:40:47 +0100
commit5dd00edbcf702cac1ea22392796c65881a8ef6f9 (patch)
treedc6889cd336109df822a3b7c9f72881a6824157e
parent28f24d3dad1844af316337d565ba2ebc11c8ce97 (diff)
add messages to our deprecation warnings in libapt
Git-Dch: Ignore
-rw-r--r--apt-inst/contrib/extracttar.h2
-rw-r--r--apt-pkg/acquire-item.h2
-rw-r--r--apt-pkg/acquire.h2
-rw-r--r--apt-pkg/algorithms.h2
-rw-r--r--apt-pkg/cachefile.h4
-rw-r--r--apt-pkg/cacheiterators.h4
-rw-r--r--apt-pkg/cacheset.h77
-rw-r--r--apt-pkg/contrib/fileutl.cc2
-rw-r--r--apt-pkg/contrib/fileutl.h4
-rw-r--r--apt-pkg/contrib/hashes.h22
-rw-r--r--apt-pkg/contrib/macros.h2
-rw-r--r--apt-pkg/contrib/sptr.h5
-rw-r--r--apt-pkg/contrib/strutl.h2
-rw-r--r--apt-pkg/deb/dpkgpm.h2
-rw-r--r--apt-pkg/depcache.h2
-rw-r--r--apt-pkg/edsp.h2
-rw-r--r--apt-pkg/indexcopy.h4
-rw-r--r--apt-pkg/indexfile.cc15
-rw-r--r--apt-pkg/indexfile.h11
-rw-r--r--apt-pkg/metaindex.h2
-rw-r--r--apt-pkg/orderlist.h2
-rw-r--r--apt-pkg/packagemanager.h4
-rw-r--r--apt-pkg/pkgcache.h8
-rw-r--r--apt-pkg/pkgcachegen.cc4
-rw-r--r--apt-pkg/pkgcachegen.h4
-rw-r--r--apt-pkg/pkgrecords.h8
-rw-r--r--apt-pkg/srcrecords.h4
-rw-r--r--apt-pkg/tagfile.h5
-rw-r--r--apt-pkg/upgrade.h5
29 files changed, 101 insertions, 111 deletions
diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h
index 871946edb..edd3cec8e 100644
--- a/apt-inst/contrib/extracttar.h
+++ b/apt-inst/contrib/extracttar.h
@@ -49,7 +49,7 @@ class ExtractTar
// Fork and reap gzip
bool StartGzip();
bool Done();
- APT_DEPRECATED bool Done(bool Force); // Force is ignored – and the default behaviour
+ APT_DEPRECATED_MSG("Parameter Force is ignored, use Done() instead.") bool Done(bool Force);
public:
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 6d58f2ba9..d77b5f9ef 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -105,7 +105,7 @@ class pkgAcquire::Item : public WeakPointable /*{{{*/
/** \brief If not \b NULL, contains the name of a subprocess that
* is operating on this object (for instance, "gzip" or "gpgv").
*/
- APT_DEPRECATED const char *Mode;
+ APT_DEPRECATED_MSG("Use the std::string member ActiveSubprocess instead") const char *Mode;
/** \brief contains the name of the subprocess that is operating on this object
* (for instance, "gzip", "rred" or "gpgv"). This is obsoleting #Mode from above
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index f4019d556..7044797b3 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -364,7 +364,7 @@ class pkgAcquire
* if no lock file should be used. If set also all needed directories
* will be created.
*/
- APT_DEPRECATED bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = "");
+ APT_DEPRECATED_MSG("Use constructors, .SetLog and .GetLock as needed") bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = "");
void SetLog(pkgAcquireStatus *Progress) { Log = Progress; }
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 77a39b415..1a9d5aefd 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -142,7 +142,7 @@ class pkgProblemResolver /*{{{*/
// Try to resolve problems only by using keep
bool ResolveByKeep(OpProgress * const Progress = NULL);
- APT_DEPRECATED void InstallProtect();
+ APT_DEPRECATED_MSG("NOOP as MarkInstall enforces not overriding FromUser markings") void InstallProtect();
explicit pkgProblemResolver(pkgDepCache *Cache);
virtual ~pkgProblemResolver();
diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h
index f4cadf5e6..df724ff45 100644
--- a/apt-pkg/cachefile.h
+++ b/apt-pkg/cachefile.h
@@ -64,13 +64,13 @@ class pkgCacheFile
inline unsigned char &operator [](pkgCache::DepIterator const &I) const {return (*DCache)[I];};
bool BuildCaches(OpProgress *Progress = NULL,bool WithLock = true);
- APT_DEPRECATED bool BuildCaches(OpProgress &Progress,bool const &WithLock = true) { return BuildCaches(&Progress, WithLock); };
+ APT_DEPRECATED_MSG("Pass Progress in as a pointer") bool BuildCaches(OpProgress &Progress,bool const &WithLock = true) { return BuildCaches(&Progress, WithLock); };
bool BuildSourceList(OpProgress *Progress = NULL);
bool BuildPolicy(OpProgress *Progress = NULL);
bool BuildDepCache(OpProgress *Progress = NULL);
bool Open(OpProgress *Progress = NULL, bool WithLock = true);
inline bool ReadOnlyOpen(OpProgress *Progress = NULL) { return Open(Progress, false); };
- APT_DEPRECATED bool Open(OpProgress &Progress,bool const &WithLock = true) { return Open(&Progress, WithLock); };
+ APT_DEPRECATED_MSG("Pass Progress in as a pointer") bool Open(OpProgress &Progress,bool const &WithLock = true) { return Open(&Progress, WithLock); };
static void RemoveCaches();
void Close();
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 887d2e691..0647e39f1 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -157,7 +157,7 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
inline const char *Name() const { return Group().Name(); }
// Versions have sections - and packages can have different versions with different sections
// so this interface is broken by design. Run as fast as you can to Version.Section().
- APT_DEPRECATED inline const char *Section() const;
+ APT_DEPRECATED_MSG("Use the .Section method of VerIterator instead") inline const char *Section() const;
inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge ||
(S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}
inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}
@@ -514,7 +514,7 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const
{return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);}
inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const
{return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);}
-APT_DEPRECATED inline const char * pkgCache::PkgIterator::Section() const
+APT_DEPRECATED_MSG("Use the .Section method of VerIterator instead") inline const char * pkgCache::PkgIterator::Section() const
{return S->VersionList == 0 ? 0 : VersionList().Section();}
/*}}}*/
#endif
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index c790d4311..790eee6dc 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -76,8 +76,7 @@ public: /*{{{*/
pkgCacheFile &Cache, const char * cmdline,
std::list<PkgModifier> const &mods);
- // use PackageFrom(PACKAGENAME, …) instead
- APT_DEPRECATED pkgCache::PkgIterator PackageFromName(pkgCacheFile &Cache, std::string const &pattern);
+ APT_DEPRECATED_MSG("use .PackageFrom(PACKAGENAME, …) instead") pkgCache::PkgIterator PackageFromName(pkgCacheFile &Cache, std::string const &pattern);
/** \brief be notified about the package being selected via pattern
*
@@ -89,10 +88,10 @@ public: /*{{{*/
*/
virtual void showPackageSelection(pkgCache::PkgIterator const &pkg, PkgSelector const select, std::string const &pattern);
// use the method above instead, react only on the type you need and let the base handle the rest if need be
- // this allows use to add new selection methods without breaking the ABI constantly with new virtual methods
- APT_DEPRECATED virtual void showTaskSelection(pkgCache::PkgIterator const &pkg, std::string const &pattern);
- APT_DEPRECATED virtual void showRegExSelection(pkgCache::PkgIterator const &pkg, std::string const &pattern);
- APT_DEPRECATED virtual void showFnmatchSelection(pkgCache::PkgIterator const &pkg, std::string const &pattern);
+ // this allows us to add new selection methods without breaking the ABI constantly with new virtual methods
+ APT_DEPRECATED_MSG("override .showPackageSelection and select with switch") virtual void showTaskSelection(pkgCache::PkgIterator const &pkg, std::string const &pattern);
+ APT_DEPRECATED_MSG("override .showPackageSelection and select with switch") virtual void showRegExSelection(pkgCache::PkgIterator const &pkg, std::string const &pattern);
+ APT_DEPRECATED_MSG("override .showPackageSelection and select with switch") virtual void showFnmatchSelection(pkgCache::PkgIterator const &pkg, std::string const &pattern);
/** \brief be notified if a package can't be found via pattern
*
@@ -105,10 +104,10 @@ public: /*{{{*/
*/
virtual void canNotFindPackage(enum PkgSelector const select, PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &pattern);
// same as above for showPackageSelection
- APT_DEPRECATED virtual void canNotFindTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
- APT_DEPRECATED virtual void canNotFindRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
- APT_DEPRECATED virtual void canNotFindFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
- APT_DEPRECATED virtual void canNotFindPackage(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str);
+ APT_DEPRECATED_MSG("override .canNotFindPackage and select with switch") virtual void canNotFindTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
+ APT_DEPRECATED_MSG("override .canNotFindPackage and select with switch") virtual void canNotFindRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
+ APT_DEPRECATED_MSG("override .canNotFindPackage and select with switch") virtual void canNotFindFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
+ APT_DEPRECATED_MSG("override .canNotFindPackage and select with switch") virtual void canNotFindPackage(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str);
/** \brief specifies which version(s) we want to refer to */
enum VerSelector {
@@ -145,8 +144,7 @@ public: /*{{{*/
*/
virtual void showVersionSelection(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const &Ver,
enum VerSelector const select, std::string const &pattern);
- // renamed to have a similar interface to showPackageSelection
- APT_DEPRECATED virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver,
+ APT_DEPRECATED_MSG("use .showVersionSelection instead, similar to .showPackageSelection") virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver,
std::string const &ver, bool const verIsRel);
/** \brief be notified if a version can't be found for a package
@@ -159,23 +157,21 @@ public: /*{{{*/
* \param Pkg is the package we wanted a version from
*/
virtual void canNotFindVersion(enum VerSelector const select, VersionContainerInterface * const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg);
- // same as above for showPackageSelection
- APT_DEPRECATED virtual void canNotFindAllVer(VersionContainerInterface * const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg);
- APT_DEPRECATED virtual void canNotFindInstCandVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("override .canNotFindVersion and select via switch") virtual void canNotFindAllVer(VersionContainerInterface * const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg);
+ APT_DEPRECATED_MSG("override .canNotFindVersion and select via switch") virtual void canNotFindInstCandVer(VersionContainerInterface * const vci, pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg);
- APT_DEPRECATED virtual void canNotFindCandInstVer(VersionContainerInterface * const vci,
+ APT_DEPRECATED_MSG("override .canNotFindVersion and select via switch") virtual void canNotFindCandInstVer(VersionContainerInterface * const vci,
pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg);
// the difference between canNotFind and canNotGet is that the later is more low-level
// and called from other places: In this case looking into the code is the only real answer…
virtual pkgCache::VerIterator canNotGetVersion(enum VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg);
- // same as above for showPackageSelection
- APT_DEPRECATED virtual pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("override .canNotGetVersion and select via switch") virtual pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg);
- APT_DEPRECATED virtual pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("override .canNotGetVersion and select via switch") virtual pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg);
- APT_DEPRECATED virtual pkgCache::VerIterator canNotFindInstalledVer(pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("override .canNotGetVersion and select via switch") virtual pkgCache::VerIterator canNotFindInstalledVer(pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg);
virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str);
@@ -316,7 +312,7 @@ public:
inline const char *Name() const {return getType().Name(); }
inline std::string FullName(bool const Pretty) const { return getType().FullName(Pretty); }
inline std::string FullName() const { return getType().FullName(); }
- APT_DEPRECATED inline const char *Section() const {
+ APT_DEPRECATED_MSG("Use the .Section method of VerIterator instead") inline const char *Section() const {
APT_IGNORE_DEPRECATED_PUSH
return getType().Section();
APT_IGNORE_DEPRECATED_POP
@@ -345,8 +341,7 @@ public:
virtual void clear() = 0;
virtual size_t size() const = 0;
- // FIXME: This is a bloody hack removed soon. Use CacheSetHelper::PkgSelector !
- enum APT_DEPRECATED Constructor { UNKNOWN = CacheSetHelper::UNKNOWN,
+ enum APT_DEPRECATED_MSG("Use CacheSetHelper::PkgSelector instead") Constructor { UNKNOWN = CacheSetHelper::UNKNOWN,
REGEX = CacheSetHelper::REGEX,
TASK = CacheSetHelper::TASK,
FNMATCH = CacheSetHelper::FNMATCH };
@@ -361,25 +356,25 @@ APT_IGNORE_DEPRECATED_POP
PackageContainerInterface& operator=(PackageContainerInterface const &other);
virtual ~PackageContainerInterface();
- APT_DEPRECATED static bool FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFrom(CacheSetHelper::TASK, …) instead") static bool FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::TASK, pci, Cache, pattern); }
- APT_DEPRECATED static bool FromRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFrom(CacheSetHelper::REGEX, …) instead") static bool FromRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::REGEX, pci, Cache, pattern); }
- APT_DEPRECATED static bool FromFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFrom(CacheSetHelper::FNMATCH, …) instead") static bool FromFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::FNMATCH, pci, Cache, pattern); }
- APT_DEPRECATED static bool FromGroup(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFrom(CacheSetHelper::PACKAGENAME, …) instead") static bool FromGroup(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::PACKAGENAME, pci, Cache, pattern); }
- APT_DEPRECATED static bool FromString(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFrom(CacheSetHelper::STRING, …) instead") static bool FromString(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::STRING, pci, Cache, pattern); }
- APT_DEPRECATED static bool FromCommandLine(PackageContainerInterface * const pci, pkgCacheFile &Cache, const char **cmdline, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFromCommandLine instead") static bool FromCommandLine(PackageContainerInterface * const pci, pkgCacheFile &Cache, const char **cmdline, CacheSetHelper &helper) {
return helper.PackageFromCommandLine(pci, Cache, cmdline); }
- APT_DEPRECATED typedef CacheSetHelper::PkgModifier Modifier;
+ APT_DEPRECATED_MSG("enum moved to CacheSetHelper::PkgModifier") typedef CacheSetHelper::PkgModifier Modifier;
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFromName instead") static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &pattern, CacheSetHelper &helper) {
return helper.PackageFromName(Cache, pattern); }
- APT_DEPRECATED static bool FromModifierCommandLine(unsigned short &modID, PackageContainerInterface * const pci,
+ APT_DEPRECATED_MSG("Use helper.PackageFromModifierCommandLine instead") static bool FromModifierCommandLine(unsigned short &modID, PackageContainerInterface * const pci,
pkgCacheFile &Cache, const char * cmdline,
std::list<Modifier> const &mods, CacheSetHelper &helper) {
return helper.PackageFromModifierCommandLine(modID, pci, Cache, cmdline, mods); }
@@ -445,7 +440,7 @@ public: /*{{{*/
PackageContainer() : PackageContainerInterface(CacheSetHelper::UNKNOWN) {}
explicit PackageContainer(CacheSetHelper::PkgSelector const &by) : PackageContainerInterface(by) {}
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED explicit PackageContainer(Constructor const &by) : PackageContainerInterface((CacheSetHelper::PkgSelector)by) {}
+ APT_DEPRECATED_MSG("Construct with a CacheSetHelper::PkgSelector instead") explicit PackageContainer(Constructor const &by) : PackageContainerInterface((CacheSetHelper::PkgSelector)by) {}
APT_IGNORE_DEPRECATED_POP
template<typename Itr> PackageContainer(Itr first, Itr last) : PackageContainerInterface(CacheSetHelper::UNKNOWN), _cont(first, last) {}
#if __cplusplus >= 201103L
@@ -520,10 +515,10 @@ APT_IGNORE_DEPRECATED_PUSH
\param Cache the package is in
\param pattern String the package name should be extracted from
\param helper responsible for error and message handling */
- APT_DEPRECATED static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &pattern, CacheSetHelper &helper) {
+ APT_DEPRECATED_MSG("Use helper.PackageFromName instead") static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &pattern, CacheSetHelper &helper) {
return helper.PackageFromName(Cache, pattern);
}
- APT_DEPRECATED static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &pattern) {
+ APT_DEPRECATED_MSG("Use helper.PackageFromName instead") static pkgCache::PkgIterator FromName(pkgCacheFile &Cache, std::string const &pattern) {
CacheSetHelper helper;
return FromName(Cache, pattern, helper);
}
@@ -799,7 +794,7 @@ public:
virtual size_t size() const = 0;
/** \brief specifies which version(s) will be returned if non is given */
- enum APT_DEPRECATED Version {
+ enum APT_DEPRECATED_MSG("enum moved to CacheSetHelper::VerSelector instead") Version {
ALL = CacheSetHelper::ALL,
CANDANDINST = CacheSetHelper::CANDANDINST,
CANDIDATE = CacheSetHelper::CANDIDATE,
@@ -818,7 +813,7 @@ public:
enum CacheSetHelper::VerSelector const select) : ID(id), Alias(alias), Pos(pos),
SelectVersion(select) {}
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED Modifier(unsigned short const &id, const char * const alias, Position const &pos,
+ APT_DEPRECATED_MSG("Construct with a CacheSetHelper::VerSelector instead") Modifier(unsigned short const &id, const char * const alias, Position const &pos,
Version const &select) : ID(id), Alias(alias), Pos(pos),
SelectVersion((CacheSetHelper::VerSelector)select) {}
APT_IGNORE_DEPRECATED_POP
@@ -828,7 +823,7 @@ APT_IGNORE_DEPRECATED_POP
const char **cmdline, CacheSetHelper::VerSelector const fallback,
CacheSetHelper &helper);
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED static bool FromCommandLine(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("Use CacheSetHelper::VerSelector as fallback selector") static bool FromCommandLine(VersionContainerInterface * const vci, pkgCacheFile &Cache,
const char **cmdline, Version const &fallback,
CacheSetHelper &helper) {
return FromCommandLine(vci, Cache, cmdline, (CacheSetHelper::VerSelector)fallback, helper);
@@ -839,7 +834,7 @@ APT_IGNORE_DEPRECATED_POP
std::string pkg, CacheSetHelper::VerSelector const fallback, CacheSetHelper &helper,
bool const onlyFromName = false);
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED static bool FromString(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("Use CacheSetHelper::VerSelector as fallback selector") static bool FromString(VersionContainerInterface * const vci, pkgCacheFile &Cache,
std::string pkg, Version const &fallback, CacheSetHelper &helper,
bool const onlyFromName = false) {
return FromString(vci, Cache, pkg, (CacheSetHelper::VerSelector)fallback, helper, onlyFromName);
@@ -850,7 +845,7 @@ APT_IGNORE_DEPRECATED_POP
pkgCache::PkgIterator const &P, CacheSetHelper::VerSelector const fallback,
CacheSetHelper &helper);
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED static bool FromPackage(VersionContainerInterface * const vci, pkgCacheFile &Cache,
+ APT_DEPRECATED_MSG("Use CacheSetHelper::VerSelector as fallback selector") static bool FromPackage(VersionContainerInterface * const vci, pkgCacheFile &Cache,
pkgCache::PkgIterator const &P, Version const &fallback,
CacheSetHelper &helper) {
return FromPackage(vci, Cache, P, (CacheSetHelper::VerSelector)fallback, helper);
@@ -870,7 +865,7 @@ APT_IGNORE_DEPRECATED_POP
CacheSetHelper::VerSelector const selector,
CacheSetHelper &helper);
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED static bool FromDependency(VersionContainerInterface * const vci,
+ APT_DEPRECATED_MSG("Use CacheSetHelper::VerSelector as fallback selector") static bool FromDependency(VersionContainerInterface * const vci,
pkgCacheFile &Cache,
pkgCache::DepIterator const &D,
Version const &selector,
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 537b3df49..46de63417 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -2090,7 +2090,7 @@ bool FileFd::FileFdError(const char *Description,...) {
}
/*}}}*/
-APT_DEPRECATED gzFile FileFd::gzFd() {
+gzFile FileFd::gzFd() {
#ifdef HAVE_ZLIB
return d->gz;
#else
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index 177a74064..5809bf1de 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -97,7 +97,7 @@ class FileFd
And as the auto-conversation converts a 'unsigned long *' to a 'bool'
instead of 'unsigned long long *' we need to provide this explicitly -
otherwise applications magically start to fail… */
- bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED
+ bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED_MSG("The Actual variable you pass in should be an unsigned long long")
{
unsigned long long R;
bool const T = Read(To, Size, &R);
@@ -121,7 +121,7 @@ class FileFd
// Simple manipulators
inline int Fd() {return iFd;};
inline void Fd(int fd) { OpenDescriptor(fd, ReadWrite);};
- gzFile gzFd() APT_DEPRECATED APT_PURE;
+ gzFile gzFd() APT_DEPRECATED_MSG("Implementation detail, do not use to be able to support bzip2, xz and co") APT_PURE;
inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;};
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 74024befd..b3f08535f 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -55,8 +55,8 @@ class HashString
// get hash type used
std::string HashType() const { return Type; };
std::string HashValue() const { return Hash; };
- APT_DEPRECATED std::string HashType() { return Type; };
- APT_DEPRECATED std::string HashValue() { return Hash; };
+ APT_DEPRECATED_MSG("method was const-ified") std::string HashType() { return Type; };
+ APT_DEPRECATED_MSG("method was const-ified") std::string HashValue() { return Hash; };
// verify the given filename against the currently loaded hash
bool VerifyFile(std::string filename) const;
@@ -188,15 +188,15 @@ class Hashes
public:
/* those will disappear in the future as it is hard to add new ones this way.
* Use Add* to build the results and get them via GetHashStringList() instead */
- APT_DEPRECATED MD5Summation MD5;
- APT_DEPRECATED SHA1Summation SHA1;
- APT_DEPRECATED SHA256Summation SHA256;
- APT_DEPRECATED SHA512Summation SHA512;
+ APT_DEPRECATED_MSG("Use general .Add* and .GetHashStringList methods instead of hardcoding specific hashes") MD5Summation MD5;
+ APT_DEPRECATED_MSG("Use general .Add* and .GetHashStringList methods instead of hardcoding specific hashes") SHA1Summation SHA1;
+ APT_DEPRECATED_MSG("Use general .Add* and .GetHashStringList methods instead of hardcoding specific hashes") SHA256Summation SHA256;
+ APT_DEPRECATED_MSG("Use general .Add* and .GetHashStringList methods instead of hardcoding specific hashes") SHA512Summation SHA512;
static const int UntilEOF = 0;
bool Add(const unsigned char * const Data, unsigned long long const Size);
- APT_DEPRECATED bool Add(const unsigned char * const Data, unsigned long long const Size, unsigned int const Hashes);
+ APT_DEPRECATED_MSG("Construct accordingly instead of choosing hashes while adding") bool Add(const unsigned char * const Data, unsigned long long const Size, unsigned int const Hashes);
inline bool Add(const char * const Data)
{return Add((unsigned char const * const)Data,strlen(Data));};
inline bool Add(const unsigned char * const Beg,const unsigned char * const End)
@@ -205,9 +205,9 @@ class Hashes
enum SupportedHashes { MD5SUM = (1 << 0), SHA1SUM = (1 << 1), SHA256SUM = (1 << 2),
SHA512SUM = (1 << 3) };
bool AddFD(int const Fd,unsigned long long Size = 0);
- APT_DEPRECATED bool AddFD(int const Fd,unsigned long long Size, unsigned int const Hashes);
+ APT_DEPRECATED_MSG("Construct accordingly instead of choosing hashes while adding") bool AddFD(int const Fd,unsigned long long Size, unsigned int const Hashes);
bool AddFD(FileFd &Fd,unsigned long long Size = 0);
- APT_DEPRECATED bool AddFD(FileFd &Fd,unsigned long long Size, unsigned int const Hashes);
+ APT_DEPRECATED_MSG("Construct accordingly instead of choosing hashes while adding") bool AddFD(FileFd &Fd,unsigned long long Size, unsigned int const Hashes);
HashStringList GetHashStringList();
@@ -238,11 +238,11 @@ APT_IGNORE_DEPRECATED_POP
public:
APT_IGNORE_DEPRECATED_PUSH
- APT_DEPRECATED bool AddFD(int const Fd, unsigned long long Size, bool const addMD5,
+ APT_DEPRECATED_MSG("Construct accordingly instead of choosing hashes while adding") bool AddFD(int const Fd, unsigned long long Size, bool const addMD5,
bool const addSHA1, bool const addSHA256, bool const addSHA512) {
return AddFD(Fd, Size, boolsToFlag(addMD5, addSHA1, addSHA256, addSHA512));
};
- APT_DEPRECATED bool AddFD(FileFd &Fd, unsigned long long Size, bool const addMD5,
+ APT_DEPRECATED_MSG("Construct accordingly instead of choosing hashes while adding") bool AddFD(FileFd &Fd, unsigned long long Size, bool const addMD5,
bool const addSHA1, bool const addSHA256, bool const addSHA512) {
return AddFD(Fd, Size, boolsToFlag(addMD5, addSHA1, addSHA256, addSHA512));
};
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
index c361bded1..2727fd81f 100644
--- a/apt-pkg/contrib/macros.h
+++ b/apt-pkg/contrib/macros.h
@@ -72,6 +72,7 @@
#if APT_GCC_VERSION >= 0x0300
#define APT_DEPRECATED __attribute__ ((deprecated))
+ #define APT_DEPRECATED_MSG(X) __attribute__ ((deprecated(X)))
#define APT_CONST __attribute__((const))
#define APT_PURE __attribute__((pure))
#define APT_NORETURN __attribute__((noreturn))
@@ -79,6 +80,7 @@
#define APT_WEAK __attribute__((weak));
#else
#define APT_DEPRECATED
+ #define APT_DEPRECATED_MSG
#define APT_CONST
#define APT_PURE
#define APT_NORETURN
diff --git a/apt-pkg/contrib/sptr.h b/apt-pkg/contrib/sptr.h
index 92f4cdec8..ee4a65d60 100644
--- a/apt-pkg/contrib/sptr.h
+++ b/apt-pkg/contrib/sptr.h
@@ -20,9 +20,10 @@
/*}}}*/
#ifndef SMART_POINTER_H
#define SMART_POINTER_H
+#include <apt-pkg/macros.h>
template <class T>
-class APT_DEPRECATED SPtr
+class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtr
{
public:
T *Ptr;
@@ -43,7 +44,7 @@ class APT_DEPRECATED SPtr
};
template <class T>
-class APT_DEPRECATED SPtrArray
+class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtrArray
{
public:
T *Ptr;
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index 01bbfef72..3e3c2cef6 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -66,7 +66,7 @@ std::string URItoFileName(const std::string &URI);
std::string TimeRFC1123(time_t Date);
bool RFC1123StrToTime(const char* const str,time_t &time) APT_MUSTCHECK;
bool FTPMDTMStrToTime(const char* const str,time_t &time) APT_MUSTCHECK;
-APT_DEPRECATED bool StrToTime(const std::string &Val,time_t &Result);
+APT_DEPRECATED_MSG("Use RFC1123StrToTime or FTPMDTMStrToTime as needed instead") bool StrToTime(const std::string &Val,time_t &Result);
std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0);
int StringToBool(const std::string &Text,int Default = -1);
bool ReadMessages(int Fd, std::vector<std::string> &List);
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index 82c1bef5d..ff6e16c71 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -91,7 +91,7 @@ class pkgDPkgPM : public pkgPackageManager
// Helpers
bool RunScriptsWithPkgs(const char *Cnf);
- APT_DEPRECATED bool SendV2Pkgs(FILE *F);
+ APT_DEPRECATED_MSG("Use SendPkgInfo with the version as parameter instead") bool SendV2Pkgs(FILE *F);
bool SendPkgsInfo(FILE * const F, unsigned int const &Version);
void WriteHistoryTag(std::string const &tag, std::string value);
std::string ExpandShortPackageName(pkgDepCache &Cache,
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 237a15335..7521133d4 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -362,7 +362,7 @@ class pkgDepCache : protected pkgCache::Namespace
inline pkgVersioningSystem &VS() {return *Cache->VS;};
// Policy implementation
- APT_DEPRECATED inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return /* GetCandidateVersion(Pkg); but for API compat: */ LocalPolicy->GetCandidateVer(Pkg);};
+ APT_DEPRECATED_MSG("Confusingly named method which returns the candidate as choosen by policy (NOT as choosen via .SetCandidateVersion!). You probably want to use .GetCandidateVersion instead.") inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return /* GetCandidateVersion(Pkg); but for API compat: */ LocalPolicy->GetCandidateVer(Pkg);};
inline bool IsImportantDep(DepIterator Dep) const {return LocalPolicy->IsImportantDep(Dep);};
inline Policy &GetPolicy() {return *LocalPolicy;};
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 4f5f500a1..2053e14e1 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -192,7 +192,7 @@ namespace EDSP /*{{{*/
* \return PID of the started solver or 0 if failure occurred
*/
pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
- APT_DEPRECATED bool ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
+ APT_DEPRECATED_MSG("add a dummy bool parameter to use the overload returning a pid_t") bool 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/indexcopy.h b/apt-pkg/indexcopy.h
index d4f04b5b1..dc3b985a2 100644
--- a/apt-pkg/indexcopy.h
+++ b/apt-pkg/indexcopy.h
@@ -116,9 +116,9 @@ class SigVerify /*{{{*/
bool CopyAndVerify(std::string CDROM,std::string Name,std::vector<std::string> &SigList,
std::vector<std::string> PkgList,std::vector<std::string> SrcList);
- APT_DEPRECATED static bool RunGPGV(std::string const &File, std::string const &FileOut,
+ APT_DEPRECATED_MSG("Use ExecGPGV instead") static bool RunGPGV(std::string const &File, std::string const &FileOut,
int const &statusfd, int fd[2]);
- APT_DEPRECATED static bool RunGPGV(std::string const &File, std::string const &FileOut,
+ APT_DEPRECATED_MSG("Use ExecGPGV instead") static bool RunGPGV(std::string const &File, std::string const &FileOut,
int const &statusfd = -1);
SigVerify();
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 34ebcb2b8..487a5b920 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -89,19 +89,12 @@ std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &/*Record*/,
}
/*}}}*/
// IndexFile::TranslationsAvailable - Check if will use Translation /*{{{*/
-// ---------------------------------------------------------------------
-/* */
bool pkgIndexFile::TranslationsAvailable() {
return (APT::Configuration::getLanguages().empty() != true);
}
/*}}}*/
// IndexFile::CheckLanguageCode - Check the Language Code /*{{{*/
-// ---------------------------------------------------------------------
-/* No intern need for this method anymore as the check for correctness
- is already done in getLanguages(). Note also that this check is
- rather bad (doesn't take three character like ast into account).
- TODO: Remove method with next API break */
-APT_DEPRECATED bool pkgIndexFile::CheckLanguageCode(const char * const Lang)
+bool pkgIndexFile::CheckLanguageCode(const char * const Lang)
{
if (strlen(Lang) == 2 || (strlen(Lang) == 5 && Lang[2] == '_'))
return true;
@@ -113,11 +106,7 @@ APT_DEPRECATED bool pkgIndexFile::CheckLanguageCode(const char * const Lang)
}
/*}}}*/
// IndexFile::LanguageCode - Return the Language Code /*{{{*/
-// ---------------------------------------------------------------------
-/* As we have now possibly more than one LanguageCode this method is
- supersided by a) private classmembers or b) getLanguages().
- TODO: Remove method with next API break */
-APT_DEPRECATED std::string pkgIndexFile::LanguageCode() {
+std::string pkgIndexFile::LanguageCode() {
if (TranslationsAvailable() == false)
return "";
return APT::Configuration::getLanguages()[0];
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index 79abe2f4f..f87693a8f 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -143,9 +143,14 @@ class pkgIndexFile
virtual bool Merge(pkgCacheGenerator &/*Gen*/, OpProgress* const /*Prog*/) { return true; };
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
- static bool TranslationsAvailable();
- static bool CheckLanguageCode(const char * const Lang);
- static std::string LanguageCode();
+ APT_DEPRECATED_MSG("These methods make no sense anymore with multi-language support") static bool TranslationsAvailable();
+ /* No intern need for this method anymore as the check for correctness
+ is already done in getLanguages(). Note also that this check is
+ rather bad (doesn't take three character like ast into account).*/
+ APT_DEPRECATED_MSG("These methods make no sense anymore with multi-language support") static bool CheckLanguageCode(const char * const Lang);
+ /* As we have now possibly more than one LanguageCode this method is
+ superseeded by a) private classmembers or b) getLanguages() */
+ APT_DEPRECATED_MSG("These methods make no sense anymore with multi-language support") static std::string LanguageCode();
bool IsTrusted() const { return Trusted; };
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index ff531b4d7..3bfc2684d 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -35,7 +35,7 @@ public:
HashStringList Hashes;
unsigned long long Size;
- APT_DEPRECATED HashString Hash;
+ APT_DEPRECATED_MSG("Use the HashStringList member Hashes instead of a hardcoded HashString") HashString Hash;
};
APT_IGNORE_DEPRECATED_POP
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h
index 80876e3f9..9171c45d6 100644
--- a/apt-pkg/orderlist.h
+++ b/apt-pkg/orderlist.h
@@ -48,7 +48,7 @@ class pkgOrderList : protected pkgCache::Namespace
bool Debug;
// Main visit function
- APT_DEPRECATED bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); };
+ APT_DEPRECATED_MSG("Add a unique calling identifier as parameter for debugging output") bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); };
bool VisitNode(PkgIterator Pkg, char const* from);
bool VisitDeps(DepFunc F,PkgIterator Pkg);
bool VisitRDeps(DepFunc F,PkgIterator Pkg);
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index 287f5d192..83d26115f 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -113,7 +113,7 @@ class pkgPackageManager : protected pkgCache::Namespace
// Do the installation
OrderResult DoInstall(APT::Progress::PackageManager *progress);
// compat
- APT_DEPRECATED OrderResult DoInstall(int statusFd=-1);
+ APT_DEPRECATED_MSG("Use APT::Progress::PackageManager subclass instead of fd") OrderResult DoInstall(int statusFd=-1);
// stuff that needs to be done before the fork() of a library that
// uses apt
@@ -124,7 +124,7 @@ class pkgPackageManager : protected pkgCache::Namespace
// stuff that needs to be done after the fork
OrderResult DoInstallPostFork(APT::Progress::PackageManager *progress);
// compat
- APT_DEPRECATED OrderResult DoInstallPostFork(int statusFd=-1);
+ APT_DEPRECATED_MSG("Use APT::Progress::PackageManager subclass instead of fd") OrderResult DoInstallPostFork(int statusFd=-1);
// ?
bool FixMissing();
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index f72dd30b0..e44fd544c 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -212,7 +212,7 @@ class pkgCache /*{{{*/
Provides *ProvideP;
Dependency *DepP;
DependencyData *DepDataP;
- APT_DEPRECATED StringItem *StringItemP;
+ APT_DEPRECATED_MSG("Not used anymore in cache generation and without a replacement") StringItem *StringItemP;
char *StrP;
virtual bool ReMap(bool const &Errorchecks = true);
@@ -413,7 +413,7 @@ struct pkgCache::Package
* Note that the access method Name() will remain. It is just this data member
* deprecated as this information is already stored and available via the
* associated Group – so it is wasting precious binary cache space */
- APT_DEPRECATED map_stringitem_t Name;
+ APT_DEPRECATED_MSG("Use the .Name() method instead of accessing the member directly") map_stringitem_t Name;
/** \brief Architecture of the package */
map_stringitem_t Arch;
/** \brief Base of a singly linked list of versions
@@ -602,7 +602,7 @@ struct pkgCache::Version
AllAllowed = All | Allowed };
/** \brief deprecated variant of No */
- static const APT_DEPRECATED VerMultiArch None = No;
+ static const APT_DEPRECATED_MSG("The default value of the Multi-Arch field is no, not none") VerMultiArch None = No;
/** \brief stores the MultiArch capabilities of this version
@@ -742,7 +742,7 @@ struct pkgCache::Provides
};
/*}}}*/
// UNUSED StringItem structure /*{{{*/
-struct APT_DEPRECATED pkgCache::StringItem
+struct APT_DEPRECATED_MSG("No longer used in cache generation without a replacement") pkgCache::StringItem
{
/** \brief string this refers to */
map_ptrloc String; // StringItem
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index e1958f45a..61f7a1124 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1557,7 +1557,7 @@ static bool loadBackMMapFromFile(std::unique_ptr<pkgCacheGenerator> &Gen,
Gen.reset(new pkgCacheGenerator(Map.get(),Progress));
return true;
}
-APT_DEPRECATED bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
+bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
MMap **OutMap, bool AllowMem)
{ return pkgCacheGenerator::MakeStatusCache(List, &Progress, OutMap, AllowMem); }
bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
@@ -1712,7 +1712,7 @@ public:
ScopedErrorMerge() { _error->PushToStack(); }
~ScopedErrorMerge() { _error->MergeWithStack(); }
};
-APT_DEPRECATED bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
+bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
{ return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); }
bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
{
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 46fccdaa5..328d296bf 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -191,8 +191,8 @@ class APT_HIDDEN pkgCacheListParser
};
/*}}}*/
-bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
+APT_DEPRECATED_MSG("Use pkgCacheGenerator::MakeStatusCache instead") bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
MMap **OutMap = 0,bool AllowMem = false);
-bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap);
+APT_DEPRECATED_MSG("Use pkgCacheGenerator::MakeOnlyStatusCache instead") bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap);
#endif
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index 0ed731f1f..8da3265c6 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -68,10 +68,10 @@ class pkgRecords::Parser /*{{{*/
* choose the hash to be used.
*/
virtual HashStringList Hashes() const { return HashStringList(); };
- APT_DEPRECATED std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); };
- APT_DEPRECATED std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); };
- APT_DEPRECATED std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); };
- APT_DEPRECATED std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); };
+ APT_DEPRECATED_MSG("Use .Hashes instead of a hardcoded hash algorithm") std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); };
// These are some general stats about the package
virtual std::string Maintainer() {return std::string();};
diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
index f0a3c463a..9cc58c5b4 100644
--- a/apt-pkg/srcrecords.h
+++ b/apt-pkg/srcrecords.h
@@ -33,8 +33,8 @@ APT_IGNORE_DEPRECATED_PUSH
// Describes a single file
struct File
{
- APT_DEPRECATED std::string MD5Hash;
- APT_DEPRECATED unsigned long Size;
+ APT_DEPRECATED_MSG("Use Hashes member instead of hardcoded hash algorithm") std::string MD5Hash;
+ APT_DEPRECATED_MSG("Use FileSize member instead") unsigned long Size;
std::string Path;
std::string Type;
};
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 7fc8ab0e6..922b56f8e 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -163,15 +163,14 @@ class pkgTagFile
extern const char **TFRewritePackageOrder;
extern const char **TFRewriteSourceOrder;
-// Use pkgTagSection::Tag and pkgTagSection::Write() instead
APT_IGNORE_DEPRECATED_PUSH
-struct APT_DEPRECATED TFRewriteData
+struct APT_DEPRECATED_MSG("Use pkgTagSection::Tag and pkgTagSection::Write() instead") TFRewriteData
{
const char *Tag;
const char *Rewrite;
const char *NewTag;
};
-APT_DEPRECATED bool TFRewrite(FILE *Output,pkgTagSection const &Tags,const char *Order[],
+APT_DEPRECATED_MSG("Use pkgTagSection::Tag and pkgTagSection::Write() instead") bool TFRewrite(FILE *Output,pkgTagSection const &Tags,const char *Order[],
TFRewriteData *Rewrite);
APT_IGNORE_DEPRECATED_POP
diff --git a/apt-pkg/upgrade.h b/apt-pkg/upgrade.h
index 6cad64fd9..71dbb4fd3 100644
--- a/apt-pkg/upgrade.h
+++ b/apt-pkg/upgrade.h
@@ -28,9 +28,8 @@ namespace APT {
}
}
-// please use APT::Upgrade::Upgrade() instead
-APT_DEPRECATED bool pkgDistUpgrade(pkgDepCache &Cache);
-APT_DEPRECATED bool pkgAllUpgrade(pkgDepCache &Cache);
+APT_DEPRECATED_MSG("Use APT::Upgrade::Upgrade() instead") bool pkgDistUpgrade(pkgDepCache &Cache);
+APT_DEPRECATED_MSG("Use APT::Upgrade::Upgrade() instead") bool pkgAllUpgrade(pkgDepCache &Cache);
bool pkgMinimizeUpgrade(pkgDepCache &Cache);
#endif