patch attributes
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 22 Apr 2008 15:44:45 +0000 (15:44 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 22 Apr 2008 15:44:45 +0000 (15:44 +0000)
VERSION.cmake
zypp/Patch.cc
zypp/Patch.h
zypp/sat/SolvAttr.cc
zypp/sat/SolvAttr.h

index 9bff196..4b05e12 100644 (file)
@@ -46,5 +46,4 @@
 
 SET(LIBZYPP_MAJOR "4")
 SET(LIBZYPP_MINOR "14")
-SET(LIBZYPP_COMPATMINOR "14")
 SET(LIBZYPP_PATCH "0")
index b83be20..d1b83ef 100644 (file)
@@ -48,15 +48,15 @@ namespace zypp
   std::string Patch::category() const
   { return lookupStrAttribute( sat::SolvAttr::patchcategory ); }
 
-  bool Patch::reboot_needed() const
-  { return lookupBoolAttribute( sat::SolvAttr::needReboot ); }
+  bool Patch::rebootSuggested() const
+  { return lookupBoolAttribute( sat::SolvAttr::rebootSuggested ); }
 
-  bool Patch::affects_pkg_manager() const
-  { return lookupBoolAttribute( sat::SolvAttr::needRestart ); }
+  bool Patch::restartSuggested() const
+  { return lookupBoolAttribute( sat::SolvAttr::restartSuggested ); }
 
   bool Patch::interactive() const
   {
-    if ( reboot_needed()
+    if ( rebootSuggested()
          || ! licenseToConfirm().empty() )
     {
       return true;
index 3b2d91e..cf5411c 100644 (file)
@@ -45,7 +45,8 @@ namespace zypp
 
     public:
       /**
-       * issue date time
+       * Issue date time. For now it is the same as
+       * \ref buildtime().
        */
       Date timestamp() const
       { return buildtime(); }
@@ -58,12 +59,25 @@ namespace zypp
       /**
        * Does the system need to reboot to finish the update process?
        */
-      bool reboot_needed() const;
-
+      bool rebootSuggested() const;
+      
       /**
        * Does the patch affect the package manager itself?
+       * restart is suggested then
+       */
+      bool restartSuggested() const;
+
+      /**
+       * Use \ref rebootSuggested()
+       */
+      ZYPP_DEPRECATED bool reboot_needed() const
+      { return rebootSuggested(); }
+
+      /**
+       * Use \ref restartSuggested()
        */
-      bool affects_pkg_manager() const;
+      ZYPP_DEPRECATED bool affects_pkg_manager() const
+      { return restartSuggested(); }
 
       /**
        * Is the patch installation interactive? (does it need user input?)
index 089ef32..f9d212d 100644 (file)
@@ -67,9 +67,9 @@ namespace sat
   const SolvAttr SolvAttr::headerend    ( SOLVABLE_HEADEREND );
 
   // patch
-  const SolvAttr SolvAttr::patchcategory( SOLVABLE_PATCHCATEGORY );
-  const SolvAttr SolvAttr::needReboot   ( UPDATE_REBOOT );
-  const SolvAttr SolvAttr::needRestart  ( UPDATE_RESTART );
+  const SolvAttr SolvAttr::patchcategory            ( SOLVABLE_PATCHCATEGORY );
+  const SolvAttr SolvAttr::rebootSuggested          ( UPDATE_REBOOT );
+  const SolvAttr SolvAttr::restartSuggested          ( UPDATE_RESTART );
   const SolvAttr SolvAttr::updateCollectionName     ( UPDATE_COLLECTION_NAME );
   const SolvAttr SolvAttr::updateCollectionEvr      ( UPDATE_COLLECTION_EVR );
   const SolvAttr SolvAttr::updateCollectionArch     ( UPDATE_COLLECTION_ARCH );
index cdd8261..eac8655 100644 (file)
@@ -76,8 +76,8 @@ namespace sat
 
       // patch
       static const SolvAttr patchcategory;
-      static const SolvAttr needReboot;
-      static const SolvAttr needRestart;
+      static const SolvAttr rebootSuggested;
+      static const SolvAttr restartSuggested;
       static const SolvAttr updateCollectionName;
       static const SolvAttr updateCollectionEvr;
       static const SolvAttr updateCollectionArch;