SET(LIBZYPP_MAJOR "15")
SET(LIBZYPP_COMPATMINOR "3")
SET(LIBZYPP_MINOR "4")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
#
-# LAST RELEASED: 15.4.0 (3)
+# LAST RELEASED: 15.4.1 (3)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
-------------------------------------------------------------------
+Fri Jun 12 12:14:04 CEST 2015 - ma@suse.de
+
+- Add details to the default signature verification problem report
+- PathInfo: Avoid ExternalProgram in clean_dir
+- call rpmdb2solv without executing user-supplied scripts (bnc#926853)
+- version 15.4.1 (3)
+
+-------------------------------------------------------------------
+Thu Jun 11 01:13:31 CEST 2015 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
+Thu Jun 4 01:13:22 CEST 2015 - ma@suse.de
+
+- Update zypp-po.tar.bz2
+
+-------------------------------------------------------------------
Wed Jun 3 13:00:59 CEST 2015 - ma@suse.de
- Enhance solv.idx file handling to support zypper bash completion
/* check RepoVariablesUrlReplacer */
repo::RepoVariablesUrlReplacer replacer2;
+// // first of all url with {} must be accepted:
+ BOOST_CHECK_NO_THROW( Url("ftp://site.org/${arch}/?arch=${arch}") );
+ BOOST_CHECK_NO_THROW( Url("ftp://site.org/${arch:-noarch}/?arch=${arch:-noarch}") );
+ BOOST_CHECK_NO_THROW( Url("ftp://site.org/${arch:+somearch}/?arch=${arch:+somearch}") );
+
BOOST_CHECK_EQUAL(replacer2(Url("ftp://user:secret@site.org/$arch/")).asCompleteString(),
"ftp://user:secret@site.org/i686/");
// METHOD NAME : recursive_rmdir
// METHOD TYPE : int
//
- static int recursive_rmdir_1( const Pathname & dir )
+ static int recursive_rmdir_1( const Pathname & dir, bool removeDir = true )
{
DIR * dp;
struct dirent * d;
}
closedir( dp );
- if ( ::rmdir( dir.c_str() ) < 0 )
+ if ( removeDir && ::rmdir( dir.c_str() ) < 0 )
return errno;
return 0;
return _Log_Result( ENOTDIR );
}
- string cmd( str::form( "cd '%s' && rm -rf --preserve-root -- *", path.asString().c_str() ) );
- ExternalProgram prog( cmd, ExternalProgram::Stderr_To_Stdout );
- for ( string output( prog.receiveLine() ); output.length(); output = prog.receiveLine() ) {
- MIL << " " << output;
- }
- int ret = prog.close();
- return _Log_Result( ret, "returned" );
+ return _Log_Result( recursive_rmdir_1( path, false/* don't remove path itself */ ) );
}
///////////////////////////////////////////////////////////////////
Pathname & operator=( Pathname rhs )
{ swap( *this, rhs ); return *this; }
- /** Concatenate and assing. \see cat */
+ /** Concatenate and assign. \see cat */
Pathname & operator/=( const Pathname & path_tv )
{ return( *this = cat( *this, path_tv ) ); }
- /** Concatenate and assing. \see cat
+ /** Concatenate and assign. \see cat
* \deprecated: use /=
*/
Pathname & operator+=( const Pathname & path_tv )
*
* Using the Url::registerScheme() method, it is possible to register
* a preconfigured or derived UrlBase object for a specific scheme
- * name. The registered object will be cloned to handle all URL's
+ * name. The registered object will be cloned to handle all URLs
* containing the specified scheme name.
*
* \par RFC3986, Syntax Components:
* \brief Construct a Url object from percent-encoded URL string.
*
* Parses the \p encodedUrl string using the parseUrl() method
- * and assings the result to the new created object.
+ * and assigns the result to the newly created object.
*
* \param encodedUrl A percent-encoded URL string.
* \throws url::UrlParsingException if parsing of the url fails.
/**
* \brief Parse a percent-encoded URL string.
*
- * Trys to parses the given string into generic URL components
- * and created a clone of a scheme-specialized object or a new
+ * Tries to parse the given string into generic URL components
+ * and creates a clone of a scheme-specialized object or a new
* UrlBase object.
*
* \param encodedUrl A percent-encoded URL string.
/**
- * \brief Assign shared copy of \p url to the current object.
+ * \brief Assign a shared copy of \p url to the current object.
*
* Upon return, both objects will point to the same underlying
- * object. This state will remain until one of the object is
+ * object. This state will remain until one of the objects is
* modified.
*
* \param url The Url object to make a copy of.
/**
- * \brief Verifies specified scheme name.
+ * \brief Verifies the specified scheme name.
*
* Verifies the generic syntax of the specified \p scheme name
* and if it is contained in the current object's list of known
*
* This function ignores the configuration of the view options
* in the current object (see setViewOption()) and forces to
- * return an string with all URL components included.
+ * return a string with all URL components included.
*
* \return A complete string representation of the Url object.
*/
* Returns the encoded query string component of the URL.
*
* The query string is returned without first "?" (separator)
- * character. Further "?" characters as in e.g. LDAP URL's
- * remains in the returned string.
+ * character. Further "?" characters as in e.g. LDAP URLs
+ * remain in the returned string.
*
* \return The encoded query string component of the URL.
*/
#else
#define for_(IT,BEG,END) for ( auto IT = BEG, _for_end = END; IT != _for_end; ++IT )
#endif
-#define for_each_(IT,CONT) for_( IT, CONT.begin(), CONT.end() )
+#define for_each_(IT,CONT) for_( IT, (CONT).begin(), (CONT).end() )
/** Simple C-array iterator
* \code
* or the user will be promted for them via AuthenticationReport callback.
*
* \note The implementation currently serves both, "smb" and
- * and "cifs" URL's, but passes "cifs" to the mount command
+ * and "cifs" URLs, but passes "cifs" to the mount command
* in any case.
*/
void MediaCIFS::attachTo(bool next)
/**
* @short Implementation class for CIFS MediaHandler
*
- * NOTE: The implementation serves both, "smb" and "cifs" URL's,
+ * NOTE: The implementation serves both, "smb" and "cifs" URLs,
* but passes "cifs" to the mount command in any case.
* @see MediaHandler
**/
* The MediaManager uses several media access handlers (backends),
* that can be specified by a Media Access URL in its open() method.
*
- * All URL's may contain following query parameters, that are
+ * All URLs may contain following query parameters, that are
* reserved by the Source classes and unused/ignored by the media
* manager:
* - <tt>alias</tt>: A source specific media alias string.
}
/** Default signature verrification error handling. */
- void defaultReportSignatureError( RpmDb::CheckPackageResult ret ) const
+ void defaultReportSignatureError( RpmDb::CheckPackageResult ret, const std::string & detail_r = std::string() ) const
{
- std::string msg( str::Str() << _package->asUserString() << ": " << _("Signature verification failed") << " " << ret );
- resolveSignatureErrorAction( report()->problem( _package, repo::DownloadResolvableReport::INVALID, msg ) );
+ str::Str msg;
+ msg << _package->asUserString() << ": " << _("Signature verification failed") << " " << ret;
+ if ( ! detail_r.empty() )
+ msg << "\n" << detail_r;
+ resolveSignatureErrorAction( report()->problem( _package, repo::DownloadResolvableReport::INVALID, msg.str() ) );
}
protected:
ret.reset();
}
report()->start( _package, url );
- try // ELIMINATE try/catch by providing a log-guard
+ try
{
ret = doProvidePackage();
{
resolveSignatureErrorAction( userData.get( "Action", repo::DownloadResolvableReport::ABORT ) );
}
- else if ( userData.haskey( "Action" ) ) // pkgGpgCheck requests the default problem report
+ else if ( userData.haskey( "Action" ) ) // pkgGpgCheck requests the default problem report (wo. details)
{
defaultReportSignatureError( res );
}
case RpmDb::CHK_NOTTRUSTED: // Signature is OK, but key is not trusted
case RpmDb::CHK_ERROR: // File does not exist or can't be opened
default:
- // report problem, throw if to abort, else retry/ignore
- defaultReportSignatureError( res );
+ // report problem (w. details), throw if to abort, else retry/ignore
+ defaultReportSignatureError( res, str::Str() << userData.get<RpmDb::CheckPackageDetail>( "CheckPackageDetail" ) );
break;
}
}
// Take care we unlink the solvfile on exception
ManagedFile guard( base, filesystem::recursive_rmdir );
- std::ostringstream cmd;
- cmd << "rpmdb2solv";
- if ( ! _root.empty() )
- cmd << " -r '" << _root << "'";
- cmd << " -X"; // autogenerate pattern/product/... from -package
- cmd << " -A"; // autogenerate application pseudo packages
- cmd << " -p '" << Pathname::assertprefix( _root, "/etc/products.d" ) << "'";
+ ExternalProgram::Arguments cmd;
+ cmd.push_back( "rpmdb2solv" );
+ if ( ! _root.empty() ) {
+ cmd.push_back( "-r" );
+ cmd.push_back( _root.asString() );
+ }
+ cmd.push_back( "-X" ); // autogenerate pattern/product/... from -package
+ cmd.push_back( "-A" ); // autogenerate application pseudo packages
+ cmd.push_back( "-p" );
+ cmd.push_back( Pathname::assertprefix( _root, "/etc/products.d" ).asString() );
if ( ! oldSolvFile.empty() )
- cmd << " '" << oldSolvFile << "'";
+ cmd.push_back( oldSolvFile.asString() );
- cmd << " > '" << tmpsolv.path() << "'";
+ cmd.push_back( "-o" );
+ cmd.push_back( tmpsolv.path().asString() );
- MIL << "Executing: " << cmd.str() << endl;
- ExternalProgram prog( cmd.str(), ExternalProgram::Stderr_To_Stdout );
+ ExternalProgram prog( cmd, ExternalProgram::Stderr_To_Stdout );
+ std::string errdetail;
- cmd << endl;
for ( std::string output( prog.receiveLine() ); output.length(); output = prog.receiveLine() ) {
WAR << " " << output;
- cmd << " " << output;
+ if ( errdetail.empty() ) {
+ errdetail = prog.command();
+ errdetail += '\n';
+ }
+ errdetail += output;
}
int ret = prog.close();
if ( ret != 0 )
{
Exception ex(str::form("Failed to cache rpm database (%d).", ret));
- ex.remember( cmd.str() );
+ ex.remember( errdetail );
ZYPP_THROW(ex);
}
config("rx_username", "^([" a_zA_Z "0-9!$&'\\(\\)*+=,;~\\._-]|%[a-fA-F0-9]{2})+$");
config("rx_password", "^([" a_zA_Z "0-9!$&'\\(\\)*+=,:;~\\._-]|%[a-fA-F0-9]{2})+$");
- config("rx_pathname", "^([" a_zA_Z "0-9!$&'\\(\\)*+=,:@/~\\._-]|%[a-fA-F0-9]{2})+$");
- config("rx_pathparams", "^([" a_zA_Z "0-9!$&'\\(\\)*+=,:;@/~\\._-]|%[a-fA-F0-9]{2})+$");
+ config("rx_pathname", "^([" a_zA_Z "0-9!$&'\\(\\){}*+=,:@/~\\._-]|%[a-fA-F0-9]{2})+$");
+ config("rx_pathparams", "^([" a_zA_Z "0-9!$&'\\(\\){}*+=,:;@/~\\._-]|%[a-fA-F0-9]{2})+$");
- config("rx_querystr", "^([" a_zA_Z "0-9!$&'\\(\\)*+=,:;@/?~\\._-]|%[a-fA-F0-9]{2})+$");
- config("rx_fragment", "^([" a_zA_Z "0-9!$&'\\(\\)*+=,:;@/?~\\._-]|%[a-fA-F0-9]{2})+$");
+ config("rx_querystr", "^([" a_zA_Z "0-9!$&'\\(\\){}*+=,:;@/?~\\._-]|%[a-fA-F0-9]{2})+$");
+ config("rx_fragment", "^([" a_zA_Z "0-9!$&'\\(\\){}*+=,:;@/?~\\._-]|%[a-fA-F0-9]{2})+$");
}
*
* The UrlBase class implements default behaviour for URL
* manipulations and a base for implementation of scheme-
- * specialized URL's for the Url class.
+ * specialized URLs for the Url class.
*
*/
class UrlBase
* or compatible to).
*
* For example, if your derived class implements special
- * features of LDAP URL's, this method may return "ldap"
+ * features of LDAP URLs, this method may return "ldap"
* and "ldaps" scheme names.
*
* The UrlBase class returns an empty vector, that signals
- * that it is useable with all URL's.
+ * that it is useable with all URLs.
*
* \return A vector with scheme names known by this object.
*/
* Returns the encoded query string component of the URL.
*
* The query string is returned without first "?" (separator)
- * character. Further "?" characters as in e.g. LDAP URL's
+ * character. Further "?" characters as in e.g. LDAP URLs
* remains in the returned string.
*
* \return The encoded query string component of the URL.
std::string skip("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789.~_-");
- std::string more(":/?#[]@!$&'()*+,;=");
+ static const std::string more(URL_SAFE_CHARS); // ":/?#[]@!$&'()*+,;="
size_t beg, pos, len;
std::string out;