SET(LIBZYPP_MAJOR "17")
SET(LIBZYPP_COMPATMINOR "22")
SET(LIBZYPP_MINOR "28")
-SET(LIBZYPP_PATCH "6")
+SET(LIBZYPP_PATCH "7")
#
-# LAST RELEASED: 17.28.6 (22)
+# LAST RELEASED: 17.28.7 (22)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
\section zypp-repovars-intro Repository Variables
-Within a \c .repo or \c .serivce file, the name and URLs are subject to variable substitution.
+Within a \c .repo or \c .service file, the name and URLs are subject to variable substitution.
Variables are e.g. usefull for related repositories like packman (<tt>http://ftp.gwdg.de/pub/linux/packman/suse/$releasever</tt>), which shall always fit the installed distribution, even after a distribution upgrade. To help performing a distribution upgrade, the value of \c $releasever can be overwritten in zypper using the \c --releasever global option. This way you can easily switch all repositories using \c $releasever to the new version (provided the server layouts did not change and new repos are already available).
-------------------------------------------------------------------
+Thu Nov 4 15:16:29 CET 2021 - ma@suse.de
+
+- Check log writer before accessing it (fixes #355, bsc#1192337)
+- Save locks: Update an existing locks changed comment string.
+- Allow uname-r format in purge kernels keepspec (fixes
+ openSUSE/zypper#418)
+- version 17.28.7 (22)
+
+-------------------------------------------------------------------
Mon Oct 18 12:02:57 CEST 2021 - ma@suse.de
- Zypper should keep cached files if transaction is aborted
//{ "kernel-default-base-5.7.8-3.1.1.1.x86_64" },
}
},
+ // same test set as before, but this time the user took the uname-r kernel output
+ // we should ignore the -flavor in the end and just use the edition part
+ TestSample {
+ TESTS_SRC_DIR"/zypp/data/PurgeKernels/kernel-base",
+ "5.7.8-3-default",
+ Arch("x86_64"),
+ "running, 5.7.8-2.1.1-default",
+ {
+ { "kernel-default-base-5.7.8-1.1.1.1.x86_64" },
+ { "kernel-default-base-5.8.8-2.1.1.1.x86_64" },
+ //{ "kernel-default-base-5.7.8-2.1.1.1.x86_64" },
+ //{ "kernel-default-base-5.7.8-3.1.1.1.x86_64" },
+ }
+ },
TestSample {
TESTS_SRC_DIR"/zypp/data/PurgeKernels/flavour",
"1-3-rt",
// if we are in the same thread as the Log worker we can directly push our messages out, no need to use the socket
if ( std::this_thread::get_id() == LogThread::instance().threadId() ) {
auto writer = LogThread::instance().getLineWriter();
- writer->writeOut( msg );
+ if ( writer )
+ writer->writeOut( msg );
return;
}
bool Locks::Impl::mergeList(callback::SendReport<SavingLocksReport>& report)
{
MIL << "merge list old: " << locks().size()
- << " to add: " << toAdd.size() << "to remove: " << toRemove.size() << endl;
+ << " to add: " << toAdd.size() << " to remove: " << toRemove.size() << endl;
for_(it,toRemove.begin(),toRemove.end())
{
std::set<sat::Solvable> s(it->begin(),it->end());
if (!report->progress())
return false;
- MANIPlocks().insert( toAdd.begin(), toAdd.end() );
+ for ( const auto & q : toAdd ) {
+ const auto & [i,b] { MANIPlocks().insert( q ) };
+ if ( not b && i->comment() != q.comment() )
+ i->setComment( q.comment() ); // update comment if query already exists
+ }
toAdd.clear();
toRemove.clear();
/** Kinds to search */
Kinds _kinds;
- /** comments */
- std::string _comment;
+ /** Optional comment string for serialization. */
+ mutable std::string _comment;
//@}
public:
&& _attrs.size() == 1
&& _attrs.begin()->first == sat::SolvAttr::name ) )
{
+ // ma: Intentionally a different _comment is not considered.
return ( _strings == rhs._strings
&& _attrs == rhs._attrs
&& _uncompiledPredicated == rhs._uncompiledPredicated
void PoolQuery::addKind(const ResKind & kind)
{ _pimpl->_kinds.insert(kind); }
+ void PoolQuery::setComment(const std::string & comment) const
+ { _pimpl->_comment = comment; }
+#if LEGACY(1722)
void PoolQuery::setComment(const std::string & comment)
{ _pimpl->_comment = comment; }
+#endif
void PoolQuery::addString(const std::string & value)
{ _pimpl->_strings.insert(value); }
str << "complex: "<< it->serialize() << delim;
}
- str << PoolQueryAttr::commentAttr.asString() << ": "
- << comment() << delim ;
+ if ( const std::string & c { comment() }; not c.empty() )
+ str << PoolQueryAttr::commentAttr.asString() << ": " << c << delim ;
//separating delim - protection
str << delim;
* only the specified repo will be returned (multiple repos will be ORed).
*/
void addRepo(const std::string &repoalias);
- void setComment(const std::string & comment);
+ /** Set an optional comment string describing the purpose of the query.
+ * Stored and retrieved when serializing the query. E.g. as lock.
+ */
+ void setComment(const std::string & comment) const;
+#if LEGACY(1722)
+ void setComment(const std::string & comment);
+#endif
/** Installed status filter setters. */
//@{
} else {
str::smatch what;
if ( !str::regex_match( word, what, specRegex ) ) {
- _keepSpecificEditions.insert( Edition(word) );
+ // Allow uname_r version numbers by cutting off any postfix that comes after a second dash, including the second dash.
+ // Github-Issue openSUSE/zypper#418
+ std::string_view edition(word);
+ const auto firstDash = word.find_first_of ('-');
+ if ( firstDash != std::string::npos ) {
+ const auto secondDash = word.find_first_of ('-', firstDash+1 );
+ if ( secondDash != std::string::npos ) {
+ WAR << "Ignoring possible flavor postfix:'"<< word.substr (secondDash) <<"' in keep spec: " << word << std::endl;
+ edition = std::string_view( word.c_str (), secondDash );
+ }
+ }
+ _keepSpecificEditions.insert( Edition(IdString(edition)) );
continue;
}
for ( Capability prov : solv.provides() ) {
if ( prov.detail().name() == solv.name() && _keepSpecificEditions.count( prov.detail().ed() ) ) {
markAsKeep( solv );
+ break;
}
}
});