Hello community, here is the log from the commit of package libzypp for openSUSE:Factory checked in at Mon Aug 31 21:05:03 CEST 2009. -------- --- libzypp/libzypp.changes 2009-08-26 17:15:39.000000000 +0200 +++ libzypp/libzypp.changes 2009-08-31 17:08:13.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Aug 31 15:17:01 CEST 2009 - ma@suse.de + +- package-manager script: Fall back to package selection if no + packages are passed on the commandline. (bnc #529137) + +------------------------------------------------------------------- +Fri Aug 28 17:33:55 CEST 2009 - dmacvicar@suse.de + +- package-manager script: + do not fail if kpackagekit is not installed (bnc #529510) +- version 6.13.3 (11) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libzypp-6.13.2.tar.bz2 New: ---- libzypp-6.13.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.4tn5K5/_old 2009-08-31 21:03:27.000000000 +0200 +++ /var/tmp/diff_new_pack.4tn5K5/_new 2009-08-31 21:03:27.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package libzypp (Version 6.13.2) +# spec file for package libzypp (Version 6.13.3) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -24,7 +24,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReqProv: on Summary: Package, Patch, Pattern, and Product Management -Version: 6.13.2 +Version: 6.13.3 Release: 1 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc ++++++ libzypp-6.13.2.tar.bz2 -> libzypp-6.13.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/VERSION.cmake new/libzypp-6.13.3/VERSION.cmake --- old/libzypp-6.13.2/VERSION.cmake 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/VERSION.cmake 2009-08-31 16:24:12.000000000 +0200 @@ -61,8 +61,8 @@ SET(LIBZYPP_MAJOR "6") SET(LIBZYPP_COMPATMINOR "11") SET(LIBZYPP_MINOR "13") -SET(LIBZYPP_PATCH "2") +SET(LIBZYPP_PATCH "3") # -# LAST RELEASED: 6.13.2 (11) +# LAST RELEASED: 6.13.3 (11) # (The number in parenthesis is LIBZYPP_COMPATMINOR) #======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/package/libzypp.changes new/libzypp-6.13.3/package/libzypp.changes --- old/libzypp-6.13.2/package/libzypp.changes 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/package/libzypp.changes 2009-08-31 16:24:12.000000000 +0200 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Mon Aug 31 15:17:01 CEST 2009 - ma@suse.de + +- package-manager script: Fall back to package selection if no + packages are passed on the commandline. (bnc #529137) + +------------------------------------------------------------------- +Fri Aug 28 17:33:55 CEST 2009 - dmacvicar@suse.de + +- package-manager script: + do not fail if kpackagekit is not installed (bnc #529510) +- version 6.13.3 (11) + +------------------------------------------------------------------- Wed Aug 26 15:55:22 CEST 2009 - ma@suse.de - Tune CheckAccessDeleted to focus on libraries and executables. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/tests/lib/TestSetup.h new/libzypp-6.13.3/tests/lib/TestSetup.h --- old/libzypp-6.13.2/tests/lib/TestSetup.h 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/tests/lib/TestSetup.h 2009-08-31 16:24:12.000000000 +0200 @@ -81,14 +81,14 @@ typedef TestSetupOptions Options; public: - TestSetup( const Arch & sysarch_r = Arch() ) + TestSetup( const Arch & sysarch_r = Arch_empty ) { _ctor( Pathname(), sysarch_r, Options() ); } - TestSetup( const Pathname & rootdir_r, const Arch & sysarch_r = Arch(), const Options & options_r = Options() ) + TestSetup( const Pathname & rootdir_r, const Arch & sysarch_r = Arch_empty, const Options & options_r = Options() ) { _ctor( rootdir_r, sysarch_r, options_r ); } TestSetup( const Pathname & rootdir_r, const Options & options_r ) - { _ctor( rootdir_r, Arch(), options_r ); } + { _ctor( rootdir_r, Arch_empty, options_r ); } ~TestSetup() { USR << (_tmprootdir.path() == _rootdir ? "DELETE" : "KEEP") << " TESTSETUP below " << _rootdir << endl; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/tools/package-manager/package-manager new/libzypp-6.13.3/tools/package-manager/package-manager --- old/libzypp-6.13.2/tools/package-manager/package-manager 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/tools/package-manager/package-manager 2009-08-31 16:24:12.000000000 +0200 @@ -21,21 +21,47 @@ done } +function check_installed() +{ + rpm -q "$1" >/dev/null + return $? +} + +function what_do_we_have() +{ + echo "Zlm: ${HAVE_ZLM}" + echo "openSUSE: ${HAVE_OPENSUSE}" + echo "KPackagekit: ${HAVE_KPACKAGEKIT}" + echo "GPackagekit: ${HAVE_GPACKAGEKIT}" + echo "KDE running: ${KDE_FULL_SESSION}" +} + # check what we have HAVE_ZLM=false -if rpm -q zen-updater >/dev/null; then +check_installed "zen-updater" +if [ "$?" == "0" ] +then HAVE_ZLM=true fi + HAVE_OPENSUSE=false -if rpm -q yast2-packager >/dev/null; then +check_installed "yast2-packager" +if [ $? == 0 ] +then HAVE_OPENSUSE=true fi + HAVE_KPACKAGEKIT=false -if rpm -q kpackagekit >/dev/null; then +check_installed "kpackagekit" +if [ "$?" == "0" ] +then HAVE_KPACKAGEKIT=true fi + HAVE_GPACKAGEKIT=false -if rpm -q gnome-packagekit >/dev/null; then +check_installed "gnome-packagekit" +if [ $? == 0 ] +then HAVE_GPACKAGEKIT=true fi @@ -69,11 +95,9 @@ METHOD=yast # determine what we can use -if [[ $HAVE_KPACKAGEKIT && $KDE_FULL_SESSION ]] -then +if $HAVE_KPACKAGEKIT && [ "$KDE_FULL_SESSION" ]; then METHOD=kpackagekit -elif [[ $HAVE_GPACKAGEKIT && "$WINDOWMANAGER" == "/usr/bin/gnome" ]] -then +elif $HAVE_GPACKAGEKIT && [ "$WINDOWMANAGER" == "/usr/bin/gnome" ]; then METHOD=gnome-packagekit else if [ "$STACK" == "zlm" ]; then @@ -83,6 +107,7 @@ fi fi +echo $METHOD xsu() { # a copy of xdg-su. @@ -123,16 +148,24 @@ do_install() { case "${METHOD}" in yast) - xsu /sbin/yast2 --install "$@" + xsu /sbin/yast2 --install "$@" ;; zlm) zen-installer "$@" ;; kpackagekit) - kpackagekit "$@" + if [ $# == 0 ]; then + xsu /sbin/yast2 --install + else + kpackagekit "$@" + fi ;; gnome-packagekit) - /usr/bin/gpk-install-local-file "$@" + if [ $# == 0 ]; then + xsu /sbin/yast2 --install + else + /usr/bin/gpk-install-local-file "$@" + fi ;; esac } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/zypp/Capability.cc new/libzypp-6.13.3/zypp/Capability.cc --- old/libzypp-6.13.2/zypp/Capability.cc 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/zypp/Capability.cc 2009-08-31 16:24:12.000000000 +0200 @@ -33,6 +33,104 @@ /////////////////////////////////////////////////////////////////// namespace { ///////////////////////////////////////////////////////////////// + + /** backward skip whitespace starting at pos_r */ + inline std::string::size_type backskipWs( const std::string & str_r, std::string::size_type pos_r ) + { + for ( ; pos_r != std::string::npos; --pos_r ) + { + char ch = str_r[pos_r]; + if ( ch != ' ' && ch != '\t' ) + break; + } + return pos_r; + } + + /** backward skip non-whitespace starting at pos_r */ + inline std::string::size_type backskipNWs( const std::string & str_r, std::string::size_type pos_r ) + { + for ( ; pos_r != std::string::npos; --pos_r ) + { + char ch = str_r[pos_r]; + if ( ch == ' ' || ch == '\t' ) + break; + } + return pos_r; + } + + /** Split any 'op edition' from str_r */ + void splitOpEdition( std::string & str_r, Rel & op_r, Edition & ed_r ) + { + if ( str_r.empty() ) + return; + std::string::size_type ch( str_r.size()-1 ); + + // check whether the one but last word is a valid Rel: + if ( (ch = backskipWs( str_r, ch )) != std::string::npos ) + { + std::string::size_type ee( ch ); + if ( (ch = backskipNWs( str_r, ch )) != std::string::npos ) + { + std::string::size_type eb( ch ); + if ( (ch = backskipWs( str_r, ch )) != std::string::npos ) + { + std::string::size_type oe( ch ); + ch = backskipNWs( str_r, ch ); // now before 'op'? begin + if ( op_r.parseFrom( str_r.substr( ch+1, oe-ch ) ) ) + { + // found a legal 'op' + ed_r = Edition( str_r.substr( eb+1, ee-eb ) ); + if ( ch != std::string::npos ) // 'op' is not at str_r begin, so skip WS + ch = backskipWs( str_r, ch ); + str_r.erase( ch+1 ); + return; + } + } + } + } + // HERE: Didn't find 'name op edition' + // As a convenience we check for an embeded 'op' (not surounded by WS). + // But just '[<=>]=?|!=' and not inside '()'. + ch = str_r.find_last_of( "<=>)" ); + if ( ch != std::string::npos && str_r[ch] != ')' ) + { + std::string::size_type oe( ch ); + + // do edition first: + ch = str_r.find_first_not_of( " \t", oe+1 ); + if ( ch != std::string::npos ) + ed_r = Edition( str_r.substr( ch ) ); + + // now finish op: + ch = oe-1; + if ( str_r[oe] != '=' ) // '[<>]' + { + op_r = ( str_r[oe] == '<' ) ? Rel::LT : Rel::GT; + } + else + { // '?=' + if ( ch != std::string::npos ) + { + switch ( str_r[ch] ) + { + case '<': --ch; op_r = Rel::LE; break; + case '>': --ch; op_r = Rel::GE; break; + case '!': --ch; op_r = Rel::NE; break; + case '=': --ch; // fall through + default: op_r = Rel::EQ; break; + } + } + } + + // finally name: + if ( ch != std::string::npos ) // 'op' is not at str_r begin, so skip WS + ch = backskipWs( str_r, ch ); + str_r.erase( ch+1 ); + return; + } + // HERE: It's a plain 'name' + } + /** Build \ref Capability from data. No parsing required. */ sat::detail::IdType relFromStr( ::_Pool * pool_r, @@ -118,35 +216,13 @@ const std::string & str_r, const ResKind & kind_r, Capability::CtorFlag flag_r ) { - // strval_r has at least two words which could make 'op edition'? - // improve regex! - static const str::regex rx( "(.*[^ \t])([ \t]+)([^ \t]+)([ \t]+)([^ \t]+)" ); - static str::smatch what; - std::string name( str_r ); Rel op; Edition ed; - if ( flag_r == Capability::UNPARSED - && str_r.find(' ') != std::string::npos - && str::regex_match( str_r, what, rx ) ) + if ( flag_r == Capability::UNPARSED ) { - try - { - Rel cop( what[3] ); - Edition ced( what[5] ); - name = what[1]; - op = cop; - ed = ced; - } - catch ( Exception & excpt ) - { - // So they don't make valid 'op edition' - ZYPP_CAUGHT( excpt ); - DBG << "Trying named relation for: " << str_r << endl; - } + splitOpEdition( name, op, ed ); } - //else - // not a versioned relation if ( arch_r.empty() ) return relFromStr( pool_r, name, op, ed, kind_r ); // parses for name[.arch] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/zypp/Rel.cc new/libzypp-6.13.3/zypp/Rel.cc --- old/libzypp-6.13.2/zypp/Rel.cc 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/zypp/Rel.cc 2009-08-31 16:24:12.000000000 +0200 @@ -86,6 +86,17 @@ : _op( parse( strval_r, default_r ) ) {} + bool Rel::parseFrom( const std::string & strval_r ) + { + std::mapstd::string,Rel::for_use_in_switch::const_iterator it = findStr( strval_r ); + if ( it == _table.end() ) + { + return false; + } + _op = it->second; + return true; + } + /////////////////////////////////////////////////////////////////// // // METHOD NAME : Rel::asString diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-6.13.2/zypp/Rel.h new/libzypp-6.13.3/zypp/Rel.h --- old/libzypp-6.13.2/zypp/Rel.h 2009-08-28 11:42:24.000000000 +0200 +++ new/libzypp-6.13.3/zypp/Rel.h 2009-08-31 16:24:12.000000000 +0200 @@ -87,15 +87,20 @@ * * \throw PARSE if \a strval_r is not legal. * \todo refine exceptions and check throw. - */ + */ explicit Rel( const std::string & strval_r ); /** Ctor from string (non-throwing). * Illegal string values resolve to \c default_r - */ + */ Rel( const std::string & strval_r, const Rel & default_r ); + /** Assign from string IFF it contains a legal value. + * \return Whether \a strval_r contained a legal value. + */ + bool parseFrom( const std::string & strval_r ); + /** Ctor from bits. */ explicit Rel( unsigned bits_r ) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de