Author: dmacvicar Date: Tue Apr 22 17:44:45 2008 New Revision: 9789 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9789&view=rev Log: patch attributes Modified: trunk/libzypp/VERSION.cmake trunk/libzypp/zypp/Patch.cc trunk/libzypp/zypp/Patch.h trunk/libzypp/zypp/sat/SolvAttr.cc trunk/libzypp/zypp/sat/SolvAttr.h Modified: trunk/libzypp/VERSION.cmake URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=9789&r1=9788&r2=9789&view=diff ============================================================================== --- trunk/libzypp/VERSION.cmake (original) +++ trunk/libzypp/VERSION.cmake Tue Apr 22 17:44:45 2008 @@ -46,5 +46,4 @@ SET(LIBZYPP_MAJOR "4") SET(LIBZYPP_MINOR "14") -SET(LIBZYPP_COMPATMINOR "14") SET(LIBZYPP_PATCH "0") Modified: trunk/libzypp/zypp/Patch.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Patch.cc?rev=9789&r1=9788&r2=9789&view=diff ============================================================================== --- trunk/libzypp/zypp/Patch.cc (original) +++ trunk/libzypp/zypp/Patch.cc Tue Apr 22 17:44:45 2008 @@ -48,15 +48,15 @@ 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; Modified: trunk/libzypp/zypp/Patch.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Patch.h?rev=9789&r1=9788&r2=9789&view=diff ============================================================================== --- trunk/libzypp/zypp/Patch.h (original) +++ trunk/libzypp/zypp/Patch.h Tue Apr 22 17:44:45 2008 @@ -45,7 +45,8 @@ 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 @@ /** * 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?) Modified: trunk/libzypp/zypp/sat/SolvAttr.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.cc?rev=9789&r1=9788&r2=9789&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/SolvAttr.cc (original) +++ trunk/libzypp/zypp/sat/SolvAttr.cc Tue Apr 22 17:44:45 2008 @@ -67,9 +67,9 @@ 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 ); Modified: trunk/libzypp/zypp/sat/SolvAttr.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.h?rev=9789&r1=9788&r2=9789&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/SolvAttr.h (original) +++ trunk/libzypp/zypp/sat/SolvAttr.h Tue Apr 22 17:44:45 2008 @@ -76,8 +76,8 @@ // 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; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org