#define WORKAROUNDRPMPWDBUG
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "librpmDb"
+
namespace zypp
{
namespace zypp_readonly_hack
ZYPP_THROW(RpmInvalidRootException(root_r, dbPath_r));
}
+ if ( dbPath_r == "/var/lib/rpm"
+ && ! PathInfo( root_r/"/var/lib/rpm" ).isExist()
+ && PathInfo( root_r/"/usr/lib/sysimage/rpm" ).isDir() )
+ {
+ WAR << "Rpm package was deleted? Injecting missing rpmdb compat symlink." << endl;
+ filesystem::symlink( "../../usr/lib/sysimage/rpm", root_r/"/var/lib/rpm" );
+ }
+
MIL << "Calling initDatabase: " << stringPath( root_r, dbPath_r )
<< ( doRebuild_r ? " (rebuilddb)" : "" )
<< ( quickinit ? " (quickinit)" : "" ) << endl;
if ( ! missingKeys.empty() )
callback::SendReport<KeyRingReport>()->reportNonImportedKeys(missingKeys);
}
- catch (Exception &e)
+ catch ( const Exception & excpt )
{
- ERR << "Could not import keys into zypp keyring" << endl;
+ ZYPP_CAUGHT( excpt );
+ ERR << "Could not import keys into zypp keyring: " << endl;
}
}
rpmQVKArguments_s qva;
memset( &qva, 0, sizeof(rpmQVKArguments_s) );
+#ifdef HAVE_NO_RPMTSSETVFYFLAGS
+ // Legacy: In rpm >= 4.15 qva_flags symbols don't exist
+ // and qva_flags is not used in signature checking at all.
qva.qva_flags = (VERIFY_DIGEST|VERIFY_SIGNATURE);
-
+#else
+ ::rpmtsSetVfyFlags( ts, RPMVSF_DEFAULT );
+#endif
RpmlogCapture vresult;
LocaleGuard guard( LC_ALL, "C" ); // bsc#1076415: rpm log output is localized, but we need to parse it :(
int res = ::rpmVerifySignatures( &qva, ts, fd, path_r.basename().c_str() );