]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheset.h
fix arguments for MarkInstall so packages are really marked as automatic
[apt.git] / apt-pkg / cacheset.h
index c8c3dd096dbe349c11c1c3517c15cd20c99b30ad..e690d660cd01bb99f4946f32196cd5c6fa42aadc 100644 (file)
@@ -32,7 +32,9 @@ class CacheSetHelper {                                                        /*{{{*/
     printed out.
 */
 public:                                                                        /*{{{*/
     printed out.
 */
 public:                                                                        /*{{{*/
-       CacheSetHelper(bool const &ShowError = true) : ShowError(ShowError) {};
+       CacheSetHelper(bool const &ShowError = true,
+               GlobalError::MsgType ErrorType = GlobalError::ERROR) :
+                       ShowError(ShowError), ErrorType(ErrorType) {};
        virtual ~CacheSetHelper() {};
 
        virtual void showTaskSelection(PackageSet const &pkgset, string const &pattern) {};
        virtual ~CacheSetHelper() {};
 
        virtual void showTaskSelection(PackageSet const &pkgset, string const &pattern) {};
@@ -58,9 +60,21 @@ public:                                                                      /*{{{*/
 
        bool showErrors() const { return ShowError; };
        bool showErrors(bool const &newValue) { if (ShowError == newValue) return ShowError; else return ((ShowError = newValue) == false); };
 
        bool showErrors() const { return ShowError; };
        bool showErrors(bool const &newValue) { if (ShowError == newValue) return ShowError; else return ((ShowError = newValue) == false); };
+       GlobalError::MsgType errorType() const { return ErrorType; };
+       GlobalError::MsgType errorType(GlobalError::MsgType const &newValue)
+       {
+               if (ErrorType == newValue) return ErrorType;
+               else {
+                       GlobalError::MsgType const &oldValue = ErrorType;
+                       ErrorType = newValue;
+                       return oldValue;
+               }
+       };
+
                                                                        /*}}}*/
 protected:
        bool ShowError;
                                                                        /*}}}*/
 protected:
        bool ShowError;
+       GlobalError::MsgType ErrorType;
 };                                                                     /*}}}*/
 class PackageSet : public std::set<pkgCache::PkgIterator> {            /*{{{*/
 /** \class APT::PackageSet
 };                                                                     /*}}}*/
 class PackageSet : public std::set<pkgCache::PkgIterator> {            /*{{{*/
 /** \class APT::PackageSet
@@ -243,7 +257,7 @@ public:                                                                     /*{{{*/
                inline const char *VerStr() const { return (**this).VerStr(); };
                inline const char *Section() const { return (**this).Section(); };
                inline const char *Arch() const { return (**this).Arch(); };
                inline const char *VerStr() const { return (**this).VerStr(); };
                inline const char *Section() const { return (**this).Section(); };
                inline const char *Arch() const { return (**this).Arch(); };
-               inline const char *Arch(bool const pseudo) const { return (**this).Arch(pseudo); };
+               __deprecated inline const char *Arch(bool const pseudo) const { return (**this).Arch(); };
                inline pkgCache::PkgIterator ParentPkg() const { return (**this).ParentPkg(); };
                inline pkgCache::DescIterator DescriptionList() const { return (**this).DescriptionList(); };
                inline pkgCache::DescIterator TranslatedDescription() const { return (**this).TranslatedDescription(); };
                inline pkgCache::PkgIterator ParentPkg() const { return (**this).ParentPkg(); };
                inline pkgCache::DescIterator DescriptionList() const { return (**this).DescriptionList(); };
                inline pkgCache::DescIterator TranslatedDescription() const { return (**this).TranslatedDescription(); };
@@ -254,7 +268,7 @@ public:                                                                     /*{{{*/
                inline const char *PriorityType() const { return (**this).PriorityType(); };
                inline string RelStr() const { return (**this).RelStr(); };
                inline bool Automatic() const { return (**this).Automatic(); };
                inline const char *PriorityType() const { return (**this).PriorityType(); };
                inline string RelStr() const { return (**this).RelStr(); };
                inline bool Automatic() const { return (**this).Automatic(); };
-               inline bool Pseudo() const { return (**this).Pseudo(); };
+               __deprecated inline bool Pseudo() const { return false; };
                inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
        };
                                                                        /*}}}*/
                inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
        };
                                                                        /*}}}*/