ENDFOREACH( loop_var )
ENDMACRO(ADD_TESTS)
+# Macro to set the log group for a list of files
+MACRO( SET_LOGGROUP _group _files )
+ SET_SOURCE_FILES_PROPERTIES( ${_files} COMPILE_FLAGS -DZYPP_BASE_LOGGER_LOGGROUP=\\"${_group}\\" )
+ FOREACH (_currentFile ${ARGN})
+#MESSAGE( STATUS "setting loggroup to \"${_group}\" for ${_currentFile}" )
+ SET_SOURCE_FILES_PROPERTIES( ${_currentFile} COMPILE_FLAGS -DZYPP_BASE_LOGGER_LOGGROUP=\\"${_group}\\" )
+ ENDFOREACH (_currentFile ${ARGN})
+ENDMACRO( SET_LOGGROUP )
+
####################################################################
INCLUDE(CheckSymbolExists)
SET(LIBZYPP_MAJOR "17")
SET(LIBZYPP_COMPATMINOR "22")
SET(LIBZYPP_MINOR "29")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
#
-# LAST RELEASED: 17.29.0 (22)
+# LAST RELEASED: 17.29.1 (22)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS_gpgme_saved ${CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS} )
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
-#if this is built-in, please replace, if it isn't, export into a MacroToBool.cmake of it's own
+#if this is built-in, please replace, if it isn't, export into a MacroToBool.cmake of its own
macro( macro_bool_to_bool FOUND_VAR )
foreach( _current_VAR ${ARGN} )
if ( ${FOUND_VAR} )
\section zypp-pattern-packages_intro Intro
-Since Code12 (SLES-12) we utilize a new method of defining patterns, as opposed to the older XML-based patterns files. A pattern and it's dependencies are now represented by a rpm package and the few pattern specific properties are provided by the package. No extra XML-file is needed.
+Since Code12 (SLES-12) we utilize a new method of defining patterns, as opposed to the older XML-based patterns files. A pattern and its dependencies are now represented by a rpm package and the few pattern specific properties are provided by the package. No extra XML-file is needed.
By convention a patterns-package for a <tt>pattern:FOO</tt> is named <tt>patterns-[*-]FOO</tt> and is must provide <tt>pattern() = FOO</tt>. Usually the patterns-package name has a distribution or product identifier embedded, like in <tt>patterns-sles-Minimal</tt> or <tt>patterns-openSUSE-xfce</tt>.
-The pattens content is expressed by the patterns-packages dependencies to other packages and patterns-packages.
+The patterns content is expressed by the patterns-packages' dependencies to other packages and patterns-packages.
The list of patterns-package provides used for the new pattern autogeneration:
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).
+Variables are e.g. useful 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).
The variable expander also supports shell like definition of default and alternate values.
-------------------------------------------------------------------
+Mon Jan 10 13:02:11 CET 2022 - ma@suse.de
+
+- Fix broken install path for parser compat headers (fixes #372)
+- RepoManager: remember exec errors in exception history
+ (bsc#1193007)
+- version 17.29.1 (22)
+
+-------------------------------------------------------------------
Thu Dec 23 16:01:31 CET 2021 - ma@suse.de
- Use the default zypp.conf settings if no zypp.conf exists
"Project-Id-Version: zypp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-07-26 11:04+0200\n"
-"PO-Revision-Date: 2021-03-07 00:21+0000\n"
-"Last-Translator: Antonio Simón <antonio@trans-mission.com>\n"
+"PO-Revision-Date: 2021-12-30 03:11+0000\n"
+"Last-Translator: Javier Llorente <javier@opensuse.org>\n"
"Language-Team: Spanish <https://l10n.opensuse.org/projects/libzypp/master/es/"
">\n"
"Language: es\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.6.1\n"
+"X-Generator: Weblate 4.9.1\n"
#: zypp/CountryCode.cc:50
msgid "Unknown country: "
#: zypp-core/zyppng/io/forkspawnengine.cc:174
msgid "Unable to create control pipe."
-msgstr ""
+msgstr "No es posible crear una tubería de control."
#: zypp-core/zyppng/io/forkspawnengine.cc:240
#, c-format, boost-format
"Project-Id-Version: libzypp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-07-26 11:04+0200\n"
-"PO-Revision-Date: 2021-08-03 19:11+0000\n"
+"PO-Revision-Date: 2022-01-09 19:12+0000\n"
"Last-Translator: Ferdinand Galko <galko.ferdinand@gmail.com>\n"
"Language-Team: Slovak <https://l10n.opensuse.org/projects/libzypp/master/sk/>"
"\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.7.1\n"
+"X-Generator: Weblate 4.9.1\n"
#: zypp/CountryCode.cc:50
msgid "Unknown country: "
#. :CHE:756:
#: zypp/CountryCode.cc:200
msgid "Cote D'Ivoire"
-msgstr "Pobrežie slonoviny"
+msgstr "Pobrežie Slonoviny"
#. :CIV:384:
#: zypp/CountryCode.cc:201
#. :DMA:212:
#: zypp/CountryCode.cc:216
msgid "Dominican Republic"
-msgstr "Dominikánska Republika"
+msgstr "Dominikánska republika"
#. :DOM:214:
#: zypp/CountryCode.cc:217
#. :LVA:428:
#: zypp/CountryCode.cc:292
msgid "Libya"
-msgstr "Libéria"
+msgstr "Líbya"
#. :LBY:434:
#: zypp/CountryCode.cc:293
#. :MUS:480:
#: zypp/CountryCode.cc:311
msgid "Maldives"
-msgstr "Mali"
+msgstr "Maldivy"
#. :MDV:462:
#: zypp/CountryCode.cc:312
#. :SLV:222:
#: zypp/CountryCode.cc:366
msgid "Syria"
-msgstr "Surinam"
+msgstr "Sýria"
#. :SYR:760:
#: zypp/CountryCode.cc:367
zypp::PublicKey empty_key;
BOOST_REQUIRE( ! empty_key.isValid() );
- BOOST_CHECK_THROW( zypp::PublicKey("nonexistant"), Exception );
+ BOOST_CHECK_THROW( zypp::PublicKey("nonexistent"), Exception );
zypp::PublicKey k2(DATADIR/"susekey.asc");
BOOST_CHECK_EQUAL( k2.id(), "A84EDAE89C800ACA" );
// there seems to be a backporting of how rpm prints the signature check result
// breaking our tests here, instead of checking for exact equality we just require
- // that all elements in the lhs are existant in the rhs instance.
+ // that all elements in the lhs exist in the rhs instance.
//if ( lhs.detail.size() != rhs.detail.size() )
// return false;
res.back().dlTotal = 2148018;
res.back().expectSuccess = true;
res.back().expectedHandlerDownloads = 1;
- //its not really possible to know how many times the downloads will fail, there are
+ //it is not really possible to know how many times the downloads will fail, there are
//5 broken mirrors in the set, but if a working mirror is done before the last broken
- //URL is picked from the dataset not all broken URLs will be used
+ //URL is picked from the dataset, not all broken URLs will be used
res.back().expectedFileDownloads = -1;
res.back().expectedStates = { zyppng::Download::InitialState, zyppng::Download::DlMetaLinkInfo, zyppng::Download::PrepareMulti, zyppng::Download::DlMetalink, zyppng::Download::Finished};
for ( int i = 10 ; i >= 1; i-- ) {
res.back().dlTotal = 2148018;
res.back().expectSuccess = true;
res.back().expectedHandlerDownloads = 1;
- //its not really possible to know how many times the downloads will fail, there are
+ //it is not really possible to know how many times the downloads will fail, there are
//5 broken mirrors in the set, but if a working mirror is done before the last broken
- //URL is picked from the dataset not all broken URLs will be used
+ //URL is picked from the dataset, not all broken URLs will be used
res.back().expectedFileDownloads = -1;
res.back().expectedStates = { zyppng::Download::InitialState, zyppng::Download::DlMetaLinkInfo, zyppng::Download::PrepareMulti, zyppng::Download::DlMetalink, zyppng::Download::Finished};
for ( int i = 10 ; i >= 1; i-- ) {
${zyppng_thread_SRCS}
)
+# Default loggroup for all files
+SET_LOGGROUP( "zypp-core" ${zypp_SRCS} )
+
ADD_LIBRARY( zypp-core STATIC ${zypp_SRCS} ${zypp_HEADERS} )
#we include generated headers, so we need to wait for zypp-protobuf to be ready
add_dependencies( zypp-core zypp-protobuf )
#include <zypp-core/base/Logger.h>
#include <zypp-core/base/LogTools.h>
#include <zypp-core/base/Gettext.h>
-#include <zypp-core/base/String.h>
+#include <zypp-core/base/StringV.h>
#include <zypp-core/base/Exception.h>
using std::endl;
std::string Exception::historyAsString() const
{
- // TranslatorExplanation followed by the list of error messages that lead to this exception
- std::string history( _("History:") );
std::ostringstream ret;
- dumpRange( ret, historyBegin(), historyEnd(),
- "", history+"\n - ", "\n - ", "\n", "" );
+ if ( not _history.empty() ) {
+ ret << _("History:") << endl;
+ for ( const std::string & entry : _history ) {
+ strv::split( entry, "\n", [&ret]( std::string_view line_r, unsigned idx, bool last_r ) -> void {
+ if ( not ( last_r && line_r.empty() ) )
+ ret << (idx==0?" - ":" ") << line_r << endl;
+ });
+ }
+ }
return ret.str();
}
* }
* \endcode
*
- * Print an Exception followed by it's history if available:
+ * Print an Exception, followed by its history, if available:
* \code
* Exception error;
* ERR << error << endl << error.historyAsString();
* \endcode
*
* \todo That's a draft to have a common way of throwing exceptions.
- * Most probabely we'll finally use blocxx exceptions. Here, but not
- * in the remaining code of zypp. If we can we should try to wrap
+ * Most probably, we'll finally use blocxx exceptions here, but not
+ * in the remaining code of zypp. If we can, we should try to wrap
* the blocxx macros and typedef the classes in here.
**/
class Exception : public std::exception
void lock () {
// acquire lock
while ( _atomicLock.test_and_set())
- // reschedule the current thread while we wait, maybe when its our next turn the lock is free again
+ // Reschedule the current thread while we wait. Maybe, when it is our next turn, the lock is free again.
std::this_thread::yield();
}
}
private:
- // we use a lock free atomic flag here so this lock can be safely obtained in a signal handler as well
+ // we use a lock-free atomic flag here, so this lock can be safely obtained in a signal handler as well
std::atomic_flag _atomicLock = ATOMIC_FLAG_INIT;
};
LogThread ()
{
- // Name the thread that started the logger assuming it's main thread.
+ // Name the thread that started the logger, assuming it's the main thread.
zyppng::ThreadData::current().setName(ZYPP_MAIN_THREAD_NAME);
_thread = std::thread( [this] () {
workerMain();
/*
* Ugly hack to prevent the use of LogControlImpl when libzypp is shutting down.
- * Due to the c++ std thread_local static instances are cleaned up before the first global static
+ * Due to the C++ standard, thread_local static instances are cleaned up before the first global static
* destructor is called. So all classes that use logging after that point in time would crash the
- * application because its accessing a variable that has already been destroyed.
+ * application because it is accessing a variable that has already been destroyed.
*/
int &logControlValidFlag() {
// We are using a POD flag that does not have a destructor,
void emergencyShutdown();
/**
- * This will completely disable logging,
- * its supposed to be called in the child process after fork()
- * was called to shut down all logging completely
+ * This will completely disable logging.
+ * It is supposed to be called in the child process after fork()
+ * was called to shut down all logging completely.
*/
static void notifyFork();
/** \defgroup ZYPP_BASE_LOGGER_MACROS ZYPP_BASE_LOGGER_MACROS
* Convenience macros for logging.
*
- * The macros finaly call @ref getStream, providing appropriate arguments,
+ * The macros finally call @ref getStream, providing appropriate arguments,
* to return the log stream.
*
* @code
* \endcode
*
* This is where \ref C_Str can help. Constructible from \c std::string and \c char*,
- * it \e reduces the \c std::string to it's \c char*. At the same time it converts
+ * it \e reduces the \c std::string to its \c char*. At the same, time it converts
* \c (char*)0 into an \c "" string.
*
* \code
return return_r;
}
- /** Parse \c str into a bool if it's a legal \c true or \c false string; else \c indterminate. */
+ /** Parse \c str into a bool if it's a legal \c true or \c false string; else \c indeterminate. */
TriBool strToTriBool( const C_Str & str );
//@}
if ( match.end(0) == 0 && searchfrom == wordstart && searchfrom != line_r.data() ) {
// An empty(!) separator found at wordstart is ignored unless we're at the very beginning.
// If searchfrom == wordstart we just skipped over a not-empty separator. If wordstart is
- // not part of a 2nd not-empty separator, we want the next separator to it's right.
+ // not part of a 2nd not-empty separator, we want the next separator to its right.
// Example: Rx:"b*" Str:"0b2" - at pos 2 Rx matches empty; the previous cycle found 'b' and reported the '0'.
++searchfrom;
} else {
*
* Each separator match found in \a line_r will be enclosed by 2 words being reported.
* Words may be empty if the separator match is located at the beginning or at the end
- * of \a line_r, or it there are consecutive separator match occurrences.
+ * of \a line_r, or if there are consecutive separator match occurrences.
*
* Accepted callbacks: [bool|void]( [std::string_view[, unsigned[, bool]]] )
* (or no callback at all)
*
* - If \a sep_r is not empty, each separator found in \a line_r will be enclosed by 2
* words being reported. Words may be empty if the separator is located at the beginning
- * or the end of \a line_r or it there are consecutive occurrences.
+ * or the end of \a line_r or if there are consecutive occurrences.
*
* - If \a sep_r is unspecified or empty, it splits on whitespace /[BLANK,TAB]+/. In this
* case only the (not empty) words found on the line are reported (trimmed).
SectionSet _dict;
/**
* empty map used to simulate
- * iteration in non existant
+ * iteration in non-existent
* sections
*/
EntrySet _empty_map;
*
* All methods return \c bool, because a progress receiver may
* return \c false to indicate the desire to abort the pending
- * action. The incident is logged, but it's finaly up to the caller
+ * action. The incident is logged, but it's finally up to the caller
* to honor this.
*/
//@{
* it also supports a parent/child relationship where the parent object keeps
* a reference for all its children.
*
- * Generally all objects that want to send or receive signals should derive from Base since it
- * will help on enforcing a correct use of shared_ptr semantics. Generally with signal/slot emission
- * its easy to run into the issue of a object being deleted while it emits a signal. Think about a Socket
+ * Generally, all objects that want to send or receive signals should derive from Base, since it
+ * will help enforcing a correct use of shared_ptr semantics. Generally, with signal/slot emission,
+ * it is easy to run into the issue of an object being deleted while it emits a signal. Think about a Socket
* that emits a \a closed signal. It might be removed from the list of connections and the last reference of the
- * object deleted before the signal returns.
- * In order to prevent this from happening we established a rule of "Always own a reference to the object you use".
- * The connection helpers \ref Base::connect and \ref Base::connectFunc help with enforcing this rule, even asserting
+ * object gets deleted before the signal returns.
+ * In order to prevent this from happening, we established a rule of "Always own a reference to the object you use".
+ * The connection helper's \ref Base::connect and \ref Base::connectFunc help with enforcing this rule, even asserting
* when compiled without NDEBUG defined.
*
* \sa zypp/zyppng/base/signals.h
/*!
* The EventDispatcher class implements the libzypp event loop native backend.
*
- * Libzypp is using a thread local dispatcher, means each thread has its own unique disptacher. Only special case is when
- * we need to work together with a already exisiting event loop, for example in a Qt application. The default implementation however
+ * Libzypp is using a thread local dispatcher, which means each thread has its own unique disptacher. The only special case is when
+ * we need to work together with an already exisiting event loop, for example in a Qt application. The default implementation however
* uses the glib eventloop, just like Qt and GTK, so integrating libzypp here is just a matter of passing the default main context
* to the constructor of \ref EventDispatcher.
*/
* via shared_ptr, e.g. the \ref EventLoop does this for all \ref AbstractEventSource 's that are
* registered to receive events using shared_from_this.
*
- * To have signals in a Object its recommended to subclass the Type from \ref zyppng::Base
+ * To have signals in an Object, it is recommended to subclass the Type from \ref zyppng::Base
* and always have the objects in a \ref std::shared_ptr.
* \ref zyppng::Base provides the \ref zyppng::Base::connect and \ref zyppng::Base::connectFunc
* helpers to connect signals and slots. Connections made with those helpers will make sure the
* Defines a transition between \a Source and \a Target states.
* The EventSource \a ev triggers the transition from Source to Target if the condition \a Cond
* evaluates to true. The operation \a Op is called between exiting the old and entering the new state.
- * It can be used to transfer informations from the old into the new state.
+ * It can be used to transfer information from the old into the new state.
*
* \tparam Source defines the type of the Source state
* \tparam ev takes a member function pointer returning the event trigger signal that is used to trigger the transition to \a Target
void start ( uint64_t timeout );
/*!
- * \brief Stops the timer if its running. The \sa sigExpired signal will not emit until \sa start was called again
+ * \brief Stops the timer if it is running. The \sa sigExpired signal will not emit until \sa start was called again.
*/
void stop ();
*
* void MyClass::doSomething()
* {
- * // its also possible to use the d_func() to access the pointer:
+ * // It is also possible to use the d_func() to access the pointer:
* d_func()->something = 10;
* }
*
#include "private/forkspawnengine_p.h"
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "zypp::exec"
+
namespace zyppng {
status = WEXITSTATUS (status);
if(status)
{
- DBG << "Pid " << _pid << " exited with status " << status << std::endl;
+ WAR << "Pid " << _pid << " exited with status " << status << std::endl;
_execError = zypp::str::form( _("Command exited with status %d."), status );
}
else
else if (WIFSIGNALED (status))
{
status = WTERMSIG (status);
- WAR << "Pid " << _pid << " was killed by signal " << status
- << " (" << strsignal(status);
- if (WCOREDUMP (status))
- {
- WAR << ", core dumped";
+ std::string sigdetail { strsignal(status) };
+ if ( WCOREDUMP(status) ) {
+ sigdetail += "; Core dumped";
+ }
+ if ( status == SIGKILL ) {
+ sigdetail += "; Out of memory?";
}
- WAR << ")" << std::endl;
- _execError = zypp::str::form( _("Command was killed by signal %d (%s)."), status, strsignal(status) );
+ WAR << "Pid " << _pid << " was killed by signal " << status << " (" << sigdetail << ")" << std::endl;
+ _execError = zypp::str::form( _("Command was killed by signal %d (%s)."), status, sigdetail.c_str() );
status+=128;
}
else {
#include <stdlib.h> // setenv
#include <sys/prctl.h> // prctl(), PR_SET_PDEATHSIG
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "zypp::exec"
+
+
zyppng::AbstractDirectSpawnEngine::~AbstractDirectSpawnEngine()
{
if ( AbstractDirectSpawnEngine::isRunning() ) {
int nextBackupFd = lastFdToKeep + 1; //this we will use to count the fds upwards
std::vector<int> safeFds;
for ( auto fd : _mapFds ) {
- // if the fds are bigger than the last one we will map to its safe
+ // If the fds are larger than the last one we will map to, it is safe.
if ( fd > lastFdToKeep ) {
safeFds.push_back( fd );
} else {
_executedCommand.clear();
_args.clear();
- const char * chdirTo = nullptr;
-
if ( !argv || !argv[0] ) {
_execError = _("Invalid spawn arguments given.");
_exitStatus = 128;
return false;
}
- if ( !_chroot.empty() )
- {
- const auto chroot = _chroot.c_str();
- if ( chroot[0] == '\0' )
- {
- _chroot = zypp::Pathname(); // ignore empty _chroot
- }
- else if ( chroot[0] == '/' && chroot[1] == '\0' )
- {
- // If _chroot is '/' do not chroot, but chdir to '/'
- // unless arglist defines another dir.
- chdirTo = "/";
- _chroot = zypp::Pathname();
- }
+ const char * chdirTo = nullptr;
+
+ if ( _chroot == "/" ) {
+ // If _chroot is '/' do not chroot, but chdir to '/'
+ // unless arglist defines another dir.
+ chdirTo = "/";
+ _chroot = zypp::Pathname();
}
if ( !_workingDirectory.empty() )
const char * chdirTo = nullptr;
- if ( !_chroot.empty() ) {
- const auto chroot = _chroot.c_str();
- if ( chroot[0] == '\0' )
- {
- _chroot = zypp::Pathname(); // ignore empty _chroot
- }
- else if ( chroot[0] == '/' && chroot[1] == '\0' )
- {
- // If _chroot is '/' do not chroot, but chdir to '/'
- // unless arglist defines another dir.
- chdirTo = "/";
- _chroot = zypp::Pathname();
- }
+ if ( _chroot == "/" ) {
+ // If _chroot is '/' do not chroot, but chdir to '/'
+ // unless arglist defines another dir.
+ chdirTo = "/";
+ _chroot = zypp::Pathname();
}
if ( !_workingDirectory.empty() )
/*!
\internal
- Process forking engine thats using the traditional fork() approach
+ Process forking engine that's using the traditional fork() approach
*/
class ForkSpawnEngine : public AbstractDirectSpawnEngine
{
/*!
\internal
- Process forking engine thats using g_spawn from glib which can in most cases optimize
+ Process forking engine that's using g_spawn from glib which can in most cases optimize
using posix_spawn.
*/
class GlibSpawnEngine : public AbstractDirectSpawnEngine
#if !defined ( __cpp_lib_void_t )
namespace std {
- //define void_t since its only available starting with C++17 in some compilers
+ //define void_t since it is only available starting with C++17 in some compilers
template<typename... Ts> struct make_void { typedef void type;};
template<typename... Ts> using void_t = typename make_void<Ts...>::type;
}
Pred _pred;
};
- //check if its possible to query the given type for function_traits
+ //check if it is possible to query the given type for function_traits
template <typename T>
using has_func_trait = typename function_traits<T>::return_type;
ng/network/private/downloaderstates/zck_p.h
)
-SET( zypp_curl_ng_network_private_SOURCES
+SET( zypp_curl_ng_network_private_SRCS
ng/network/private/downloaderstates/basicdownloader_p.cc
ng/network/private/downloaderstates/detectmeta_p.cc
ng/network/private/downloaderstates/final_p.cc
INSTALL( FILES ${zypp_curl_parser_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/zypp-curl/parser" )
-ADD_LIBRARY( zypp-curl STATIC
- ${zypp_curl_SRCS} ${zypp_curl_private_HEADERS} ${zypp_curl_HEADERS}
- ${zypp_curl_auth_SRCS} ${zypp_curl_auth_private_HEADERS} ${zypp_curl_auth_HEADERS}
- ${zypp_curl_ng_network_SRCS} ${zypp_curl_ng_network_HEADERS} ${zypp_curl_ng_network_private_HEADERS} ${zypp_curl_ng_network_private_SOURCES}
- ${zypp_curl_parser_SRCS} ${zypp_curl_parser_private_HEADERS} ${zypp_curl_parser_HEADERS}
- ${zypp_curl_proxyinfo_HEADERS} ${zypp_curl_proxyinfo_SRCS}
- )
+SET( zypp_curl_lib_SRCS
+ ${zypp_curl_SRCS}
+ ${zypp_curl_auth_SRCS}
+ ${zypp_curl_ng_network_SRCS}
+ ${zypp_curl_parser_SRCS}
+ ${zypp_curl_proxyinfo_SRCS}
+ ${zypp_curl_ng_network_private_SRCS}
+)
+SET( zypp_curl_lib_HEADERS
+ ${zypp_curl_private_HEADERS} ${zypp_curl_HEADERS}
+ ${zypp_curl_auth_private_HEADERS} ${zypp_curl_auth_HEADERS}
+ ${zypp_curl_ng_network_HEADERS} ${zypp_curl_ng_network_private_HEADERS}
+ ${zypp_curl_parser_private_HEADERS} ${zypp_curl_parser_HEADERS}
+ ${zypp_curl_proxyinfo_HEADERS}
+)
+
+# Default loggroup for all files
+SET_LOGGROUP( "zypp-curl" $${zypp_curl_lib_SRCS} )
+
+ADD_LIBRARY( zypp-curl STATIC ${zypp_curl_lib_SRCS} ${zypp_curl_lib_HEADERS} )
#we include generated headers, so we need to wait for zypp-protobuf to be ready
add_dependencies( zypp-curl zypp-protobuf )
* stage of the lifetime of a Download.
*/
enum State {
- InitialState, //< This is the initial state, its only set before a download starts
+ InitialState, //< This is the initial state. It is only set before a download starts.
DetectMetaLink, //< Metalink downloads are enabled, trying to detect if we get a metalink or not
DlMetaLinkInfo, //< Downloading the metalink description file
PrepareMulti, //< This state is set for async preparations of the multi download, like mirror rating
return nullptr;
};
- // We have a tricky situation if a network request is called when inside a callback, in those cases its
- // not allowed to call curl_multi_remove_handle, we need to tell the callback to fail, so the download
+ // We have a tricky situation if a network request is called when inside a callback. In those cases, it is
+ // not allowed to call curl_multi_remove_handle. We need to tell the callback to fail, so the download
// is cancelled by curl itself. We also need to store the current result for later
auto rmode = std::get_if<NetworkRequestPrivate::running_t>( &req.d_func()->_runningMode );
if ( rmode ) {
/*!
* Emitted when there is a error in the backend the dispatcher can not recover from. All requests are cancelled
- * use \a lastError to get more informations.
+ * use \a lastError to get more information.
*/
SignalProxy<void ( NetworkRequestDispatcher & )> sigError ();
};
blocks = getNextFailedBlocks( myUrl.getScheme() );
if ( !blocks.size() ) {
- // we have not blocks, in theory that should never happen but for safety we error out here, its better than
- // getting stuck
+ // We have no blocks. In theory, that should never happen, but for safety, we error out here. It is better than
+ // getting stuck.
setFailed( NetworkRequestErrorPrivate::customError( NetworkRequestError::InternalError, "Mirror requested after all blocks were downloaded." ) );
return;
}
return 0;
}
- //we always download a range even if its not explicitly requested
+ //we always download a range even if it is not explicitly requested
if ( _requestedRanges.empty() ) {
_requestedRanges.push_back( NetworkRequest::Range() );
}
NetworkRequestError error () const;
/**
- * In some cases curl can provide extended error informations collected at
- * runtime. In those cases its possible to query that information.
+ * In some cases, curl can provide extended error information collected at
+ * runtime. In those cases, it is possible to query that information.
*/
std::string extendedErrorString() const;
INSTALL( FILES ${zypp_media_auth_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/zypp-media/auth" )
-ADD_LIBRARY( zypp-media STATIC
- ${zypp_media_SRCS} ${zypp_media_private_HEADERS} ${zypp_media_HEADERS}
- ${zypp_media_auth_SRCS} ${zypp_media_auth_private_HEADERS} ${zypp_media_auth_HEADERS}
- )
+SET( zypp_media_lib_SRCS
+ ${zypp_media_SRCS}
+ ${zypp_media_auth_SRCS}
+)
+SET( zypp_media_lib_HEADERS
+ ${zypp_media_private_HEADERS} ${zypp_media_HEADERS}
+ ${zypp_media_auth_private_HEADERS} ${zypp_media_auth_HEADERS}
+)
+
+# Default loggroup for all files
+SET_LOGGROUP( "zypp-media" ${zypp_media_lib_SRCS} )
+
+ADD_LIBRARY( zypp-media STATIC ${zypp_media_lib_SRCS} ${zypp_media_lib_HEADERS} )
#we include generated headers, so we need to wait for zypp-protobuf to be ready
add_dependencies( zypp-media zypp-protobuf )
/*!
* Returns the timestamp of the last change to the database this
- * credential is stored in, or 0 if its not known.
+ * credential is stored in, or 0 if it is not known.
*/
time_t lastDatabaseUpdate () const;
void setLastDatabaseUpdate ( time_t time );
string delta = 3;
uint64 expectedFileSize = 4;
string targetPath = 5;
- bool checkExistanceOnly = 6; //< this will NOT download the file but only query the server if its existant
+ bool checkExistanceOnly = 6; //< this will NOT download the file, but only query the server if it exists
bool metalink_enabled = 7; //< should the download try to use metalinks
uint32 headerSize = 8; //< Optional file header size for things like zchunk
Checksum headerChecksum = 9; //< Optional file header checksum
}
// constant updates about the state of the download
-// if total is NOT set, its a "Alive" update only
+// if total is NOT set, it is an "Alive" update only
message DownloadProgress {
uint32 requestId = 1;
string url = 2;
uint32 requestId = 1;
}
-// this message can only be sent when a download is tracked
-// otherwise its silenty ignored without even a return code
-// the expected answer message for this is a DownloadFin with
-// its status code set to cancelled ( if it was not finished before )
+// This message can only be sent when a download is tracked.
+// Otherwise, it is silenty ignored without even a return code.
+// The expected answer message for this is a DownloadFin with
+// its status code set to cancelled (if it was not finished before).
message CancelDownload {
uint32 requestId = 1;
}
## 'repo_gpgcheck = on' same as the default.
##
## 'repo_gpgcheck = off' will silently accept unsigned repos. It will NOT turn off
-## signature checking on the whole, nevertheless it's not a secure setting.
+## signature checking on the whole. Nevertheless, it's not a secure setting.
##
## 'pkg_gpgcheck = on' will enforce the package signature checking and the need
## to confirm unsigned packages for all repos (signed and unsigned).
##
## 'pkg_gpgcheck = off' will silently accept unsigned packages. It will NOT turn off
-## signature checking on the whole, nevertheless it's not a secure setting.
+## signature checking on the whole. Nevertheless, it's not a secure setting.
##
## If 'gpgCheck' is 'off' (not recommended), no checks are performed. You can still
## enable them individually by setting 'repo_gpgcheck' and/or 'pkg_gpgcheck' to 'on'.
##
-## The solvers general attitude when resolving jobs.
+## The solver's general attitude when resolving jobs.
##
## Valid values:
##
## Job - Focus on installing the best version of the requested packages.
-## Add missing dependencies as needed. This is the solvers default.
+## Add missing dependencies as needed. This is the solver's default.
##
## Installed - Focus on applying as little changes to the installed packages
## as needed. Choosing an older version of a package is valid if
-## it's dependencies require less changes to the system.
+## its dependencies require less changes to the system.
##
## Update - Focus on updating requested packages and their dependencies as
## much as possible.
//
// CLASS NAME : Arch::CompatEntry
//
- /** Holds an architecture ID and it's compatible relation.
- * An architecture is compatibleWith, if it's _idBit is set in
- * _compatBits. noarch has ID 0, non builtin archs ID 1 and
- * have to be treated specialy.
+ /** Holds an architecture ID and its compatible relation.
+ * An architecture is compatibleWith, if its _idBit is set in
+ * _compatBits. noarch has ID 0, non-builtin archs have ID 1 and
+ * have to be treated specially.
*/
struct Arch::CompatEntry
{
DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/media
)
-SET ( zypp_core_parser_compat_HEADERS
+SET ( zypp_core_parser_xml_compat_HEADERS
parser/xml/XmlEscape.h
+)
+
+INSTALL( FILES
+ ${zypp_core_parser_xml_compat_HEADERS}
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/xml
+)
+
+
+SET ( zypp_core_parser_compat_HEADERS
parser/IniDict.h
parser/IniParser.h
parser/ParseException.h
INSTALL( FILES
${zypp_core_parser_compat_HEADERS}
- DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser/xml
+ DESTINATION ${INCLUDE_INSTALL_DIR}/zypp/parser
)
IF ( LIBPROXY_FOUND )
${zypp_media_compat_HEADERS}
)
-#
-# Macro to set the log group for a list of files
-#
-MACRO( SET_LOGGROUP _group _files )
- SET_SOURCE_FILES_PROPERTIES( ${_files} COMPILE_FLAGS -DZYPP_BASE_LOGGER_LOGGROUP=\\"${_group}\\" )
- FOREACH (_currentFile ${ARGN})
-#MESSAGE( STATUS "setting loggroup to \"${_group}\" for ${_currentFile}" )
- SET_SOURCE_FILES_PROPERTIES( ${_currentFile} COMPILE_FLAGS -DZYPP_BASE_LOGGER_LOGGROUP=\\"${_group}\\" )
- ENDFOREACH (_currentFile ${ARGN})
-ENDMACRO( SET_LOGGROUP )
-
# Default loggroup for all files
SET_LOGGROUP( "zypp" ${zypp_lib_SRCS} )
# override some defaults
SET_LOGGROUP( "libsolv" ${zypp_sat_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_target_rpm_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_parser_yum2_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_capability_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_ui_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_media_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_parser_xml_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_media_proxyinfo_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_source_yum_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_base_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_solver_detail_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_sat_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_url_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_source_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_parser_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_zypp_detail_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_source_susetags_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_target_modalias_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_target_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_parser_yum_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_pool_SRCS} )
ADD_LIBRARY( zypp-objlib OBJECT ${zypp_lib_SRCS} ${zypp_lib_HEADERS} )
#we include generated headers, so we need to wait for zypp-protobuf to be ready
* For methods returning non-void, define a reasonable return value,
* because this is what you get back in case no receiver is listening.
*
- * That way the sending side does not need to know whether some receiver
- * is listening. And it enables the receiver to return a reasonable value,
- * in case it's got no idea, what else to return.
+ * This way, the sending side does not need to know whether some receiver
+ * is listening, and it enables the receiver to return a reasonable value
+ * in case it has got no idea what else to return.
*
* \code
* struct Foo : public callback::ReportBase
* \endcode
*
* \li \c connect Connect this ReceiveReport (in case some other
- * ReceiveReport is connected, it get disconnected. Remember its
+ * ReceiveReport is connected, it get disconnected. Remember it is
* a Callback light).
* \li \c disconnect Disconnect this ReceiveReport in case it is
- * connected. If not connected nothing happens.
+ * connected. If not connected, nothing happens.
* \li \c connected Test whether this ReceiveReport is currently
* connected.
* \li \c whoIsConnected Return a 'ReceiveReport*' to the currently
*
* \par Passing Userdata via Callbacks
*
- * For typesafe passing of user data via callbacks \see \ref UserData.
+ * For typesafe passing of user data via callbacks, \see \ref UserData.
*
* ReportBase provides a generic \ref callback::ReportBase:report method
* which can be used to communicate by encoding everything in its \a UserData
}
// this method takes all the user pointed indexes, gets them and also tries to
- // download their signature, and verify them. After that, its parses each one
+ // download their signature, and verify them. After that, it parses each one
// to fill the checksum cache.
void Fetcher::Impl::downloadAndReadIndexList( MediaSetAccess &media, const Pathname &dest_dir)
{
/** Creates a new KeyManagerCtx for PGP using a custom homedir/keyring.
*
* \note If you explicitly pass an empty \c Pathname, no homedir/keyring
- * will be set and GPGME will use it's defaults.
+ * will be set and GPGME will use its defaults.
*
* \throws KeyRingException if context can not be created or set up
*/
*
* If \a requested_r is not specified \ref ZConfig::textLocale is assumed.
*
- * If neither \c requested_r nor any of it's \ref fallback locales are available
+ * If neither \c requested_r nor any of its \ref fallback locales are available
* in \a avLocales_r, \ref Locale::noCode is returned.
*/
static Locale bestMatch( const LocaleSet & avLocales_r, Locale requested_r = Locale() );
std::string order() const;
public:
- /** \name Auto pattens (libyzpp-14)
+ /** \name Auto patterns (libyzpp-14)
* Patterns are no longer defined by separate metadate files, but via
* special dependencies provided by a corresponding patterns- package.
- * The pattern itself requires only it's patterns- package, the package
+ * The pattern itself requires only its patterns- package. The package
* contains all further dependencies.
- * This way pattens are no longer pseudo installed objects with a computed
+ * This way, patterns are no longer pseudo-installed objects with a computed
* status, but installed, iff the corresponding patterns- package is
* installed.
*/
{ return resolvable() ? resolvable()->satSolvable() : sat::Solvable::noSolvable; }
/** Return the buddy we share our status object with.
- * A \ref Product e.g. may share it's status with an associated reference \ref Package.
+ * A \ref Product e.g. may share its status with an associated reference \ref Package.
*/
sat::Solvable buddy() const;
{}
/** A usable Predicate must provide a string serialization.
- * As there is no \c operator== for \ref Predicate, we compare it's
- * string representation instead. If you add new predicated, check the
+ * As there is no \c operator== for \ref Predicate, we compare its
+ * string representation instead. If you add new predicate, check the
* deserialization code in \ref deserialize.
*/
template<class TPredicate>
///////////////////////////////////////////////////////////////////
- //\TODO maybe ctor with stream can be usefull
+ //\TODO maybe ctor with stream can be useful
//\TODO let it throw, let it throw, let it throw.
bool PoolQuery::recover( std::istream &str, char delim )
{
/** The product flags */
std::list<std::string> flags() const;
- /** The date when this Product goes out of support as indicated by it's medadata.
+ /** The date when this Product goes out of support as indicated by its medadata.
* Use \ref hasEOfLife if it's important to distinguish whether the value
* is not defined in the metadata, or defined but empty/invalid/TBD.
*/
* \c repo_gpgcheck = \c on same as the default.
*
* \c repo_gpgcheck = \c off will silently accept unsigned repos. It will NOT turn of
- * signature checking on the whole, nevertheless it's not a secure setting.
+ * signature checking on the whole. Nevertheless, it's not a secure setting.
*
* \c pkg_gpgcheck = \c on will enforce the package signature checking and the need
* to confirm unsigned packages for all repos (signed and unsigned).
*
* \c pkg_gpgcheck = \c off will silently accept unsigned packages. It will NOT turn of
- * signature checking on the whole, nevertheless it's not a secure setting.
+ * signature checking on the whole. Nevertheless, it's not a secure setting.
*
* If \c gpgCheck is \c off (not recommneded), no checks are performed. You can still
* enable them individually by setting \c repo_gpgcheck and/or \c pkg_gpgcheck to \c on.
///////////////////////////////////////////////////////////////////
namespace
{
- /** Whether repo is not under RM control and provides it's own methadata paths. */
+ /** Whether repo is not under RM control and provides its own methadata paths. */
inline bool isTmpRepo( const RepoInfo & info_r )
{ return( info_r.filepath().empty() && info_r.usesAutoMethadataPaths() ); }
} // namespace
for ( std::string output( prog.receiveLine() ); output.length(); output = prog.receiveLine() ) {
WAR << " " << output;
- if ( errdetail.empty() ) {
- errdetail = prog.command();
- errdetail += '\n';
- }
errdetail += output;
}
int ret = prog.close();
if ( ret != 0 )
{
- RepoException ex(str::form( _("Failed to cache repo (%d)."), ret ));
- ex.remember( errdetail );
+ RepoException ex(info, str::form( _("Failed to cache repo (%d)."), ret ));
+ ex.addHistory( str::Str() << prog.command() << endl << errdetail << prog.execError() ); // errdetail lines are NL-terminaled!
ZYPP_THROW(ex);
}
repo::ServiceType probeService( const Url &url ) const;
/**
- * Adds new service by it's alias and url
+ * Adds a new service by its alias and URL
*
* \param alias unique identifier of the service
* \param url url to service
* \endcode
* Semantically the value is just a plain string, even
* if OBS often uses the location of the project as
- * unique identifyer.
+ * unique identifier.
*/
ContentIdentifier contentIdentifier() const;
/** Hint whether the Repo may provide updates for a product.
*
* Either the repository claims to update a product via a repository updates
- * tag in it's metadata or a known product lists the repositories ContentIdentifier
- * as required update repo.
+ * tag in its metadata or a known product lists the repositories ContentIdentifier
+ * as a required update repo.
*/
bool isUpdateRepo() const;
- /** Hint whether the Repo may provide updates for a product identified by it's \ref CpeId
+ /** Hint whether the Repo may provide updates for a product identified by its \ref CpeId
*
* Either the repository claims to update a product via a repository updates
- * tag in it's metadata or a known product lists the repositories ContentIdentifier
+ * tag in its metadata or a known product lists the repositories ContentIdentifier
* as required update repo.
*/
bool providesUpdatesFor( const CpeId & cpeid_r ) const;
void clearInfo();
public:
- /** Remove this \ref Repository from it's \ref Pool. */
+ /** Remove this \ref Repository from its \ref Pool. */
void eraseFromPool();
/** Functor calling \ref eraseFromPool. */
IdType id() const { return _id; }
/** libsolv internal priorities.
* Unlike the \ref RepoInfo priority which tries to be YUM conform
- * (H[1-99]L), this one is the solvers internal priority representation.
- * It is type \c int and as one might expect it, the higher the value
+ * (H[1-99]L), this one is the solver's internal priority representation.
+ * It is type \c int and, as one might expect, the higher the value,
* the higher the priority. Subpriority is currently used to express
* media preferences (\see \ref MediaPriority).
*/
//
// CLASS NAME : Repository::EraseFromPool
//
- /** Functor removing \ref Repository from it's \ref Pool.
+ /** Functor removing \ref Repository from its \ref Pool.
*
* E.g. used as dispose function in. \ref AutoDispose
* to provide a convenient and exception safe temporary
* 3 sat::pool(){0repos|2solv}
* \endcode
* Leaving the block without calling <tt>tmprepo.resetDispose();</tt>
- * before, will automatically remove the \ref Repo from it's \ref Pool.
+ * before, will automatically remove the \ref Repo from its \ref Pool.
*/
struct Repository::EraseFromPool
{
* up and down.
*
* If you look at a functor, you'll see that it contains both, the function
- * to call (it's <tt>operator()</tt> ) and the data you'd otherwise pass as
+ * to call (its <tt>operator()</tt>) and the data you'd otherwise pass as
* <tt>void * data</tt>. That's nice and safe.
*
* \todo migrate to namespace filter and enhance to support Solvables as well.
/// of pseudo installed items (like Patches) is computed (roughly whether
/// their dependencies are broken or satisfied) and remembered.
///
- /// Comparing the items established state against it's current state
+ /// Comparing the item's established state against its current state
/// tells how the current transaction would influence the item (break
/// or repair a Patch).
///
public:
/** \name BitField range definitions.
*
- * \note Enlarge FieldType if more bit's needed. It's not yet
+ * \note Enlarge FieldType if more bits are needed. It's not yet
* checked by the compiler.
*/
//@{
typedef bit::Range<FieldType,TransactDetailField::end, 1> LicenceConfirmedField;
typedef bit::Range<FieldType,LicenceConfirmedField::end, 4> WeakField;
typedef bit::Range<FieldType,WeakField::end, 1> UserLockQueryField; // internal
- // enlarge FieldType if more bit's needed. It's not yet
+ // enlarge FieldType if more bits are needed. It's not yet
// checked by the compiler.
//@}
public:
sat::Transaction getTransaction();
/**
- * Define the resolvers general attitude when resolving jobs.
+ * Define the resolver's general attitude when resolving jobs.
* \see \ref ResolverFocus
*/
void setFocus( ResolverFocus focus_r );
* will be generated for them. Source packages requested via e.g. \ref addRequire will
* always be solved.
* \NOTE Be carefull. The older the source package is, the stranger may be the
- * result of solving it's build dependencies.
+ * result of solving its build dependencies.
*/
void setSolveSrcPackages( bool yesno_r );
void setDefaultSolveSrcPackages();
bool solveSrcPackages() const;
/**
- * Cleanup when deleting packages. Whether the solver should per default
+ * Cleanup when deleting packages. Whether the solver should, per default,
* try to remove packages exclusively required by the ones it's asked to delete.
*/
void setCleandepsOnRemove( bool yesno_r );
///////////////////////////////////////////////////////////////////
namespace zypp
{
- /** The resolvers general attitude. */
+ /** The resolver's general attitude. */
enum class ResolverFocus
{
Default = 0 ///< Request the standard behavior (as defined in zypp.conf or 'Job')
///////////////////////////////////////////////////////////////////
namespace zypp
{
- /** The resolvers dependency namespaces */
+ /** The resolver's dependency namespaces */
enum class ResolverNamespace : std::uint8_t
{
language = 1<<0, ///< language support
_vendorMatch.clear();
}
- /** Helper mapping a vendor string to it's eqivalence class ID.
+ /** Helper mapping a vendor string to its eqivalence class ID.
*
* \li Return the vendor strings eqivalence class ID stored in _vendorMatch.
* \li If not found, assign and return the eqivalence class ID of the lowercased string.
DownloadMode commit_downloadMode() const;
/** \name Signature checking (repodata and packages)
- * If \ref gpgcheck is \c on (the default) we will either check the signature
+ * If \ref gpgcheck is \c on (the default), we will either check the signature
* of repo metadata (packages are secured via checksum in the metadata), or the
- * signature of an rpm package to install if it's repo metadata are not signed
+ * signature of an rpm package to install if its repo metadata is not signed
* or not checked. If \ref gpgcheck is \c off, no checks are performed.
*
* The default behavior can be altered by explicitly setting \ref repo_gpgcheck and/or
Pathname vendorPath() const;
/**
- * The resolvers general attitude when resolving jobs.
+ * The resolver's general attitude when resolving jobs.
*/
ResolverFocus solver_focus() const;
void attemptToModify( bool yesno_r );
/**
- * \c True if the commit was executed in one big rpm transaction, this can be used to figure out
- * when its required to show more information about which packages failed during the transaction
- * because otherwise those informations might get lost in the backlog.
+ * \c True if the commit was executed in one big rpm transaction. This can be used to figure out
+ * when it is required to show more information about which packages failed during the transaction,
+ * because otherwise, that information might get lost in the backlog.
*/
bool singleTransactionMode() const;
void setSingleTransactionMode( bool yesno_r );
SE = 0x3,
};
- /** Convert a hex digit (case insensitive) into it's (4bit) integral value.
+ /** Convert a hex digit (case insensitive) into its (4bit) integral value.
* \throws std::invalid_argument if char
*/
inline std::uint8_t hexDigit( char ch_r )
* \li \ref True and \ref False. No supprise, they always return
* \c true or \c false.
* \li \ref Not\<TCondition\>. TCondition is a functor, and
- * it's result is inverted.
+ * its result is inverted.
* \li \ref Chain\<TACondition,TBCondition\>. \c TACondition and \c TBCondition
* are functors, and Chain evaluates <tt>TACondition && TBCondition</tt>.
*
//////////////////////////////////////////////////////
// In case we need a tmpfile, credentials will remove
- // it in it's destructor after the mout call below.
+ // it in its destructor after the mout call below.
filesystem::TmpPath credentials;
if ( !username.empty() || !password.empty() )
{
* server like FTP. After calling disconnect() the media object still is
* valid and files are present.
*
- * After calling disconnect() it's not possible to call provideFile() or
+ * After calling disconnect(), it's not possible to call provideFile() or
* provideDir() anymore.
*
* \throws MediaException
* server like FTP. After calling disconnect() the media object still is
* valid and files are present.
*
- * After calling disconnect() it's not possible to call provideFile() or
+ * After calling disconnect(), it's not possible to call provideFile() or
* provideDir() anymore.
*
* \throws MediaException
* to a server like FTP. After calling disconnect() the media
* object (attach point) is still valid and files are present.
*
- * But after calling disconnect() it's not possible to call
+ * But after calling disconnect(), it's not possible to call
* fetch more data using the provideFile() or provideDir()
* functions anymore.
*
/*!
* Checks if the given file in proc is part of our root
- * or not. If the file was unlinked IGNORE is returned to signal
- * that its better to check the next file.
+ * or not. If the file was unlinked, IGNORE is returned to signal
+ * that it is better to check the next file.
*/
Type in_our_root( const Pathname &path ) const {
return contloop;
});
- // if res is still IGNORE we did not find a explicit answer. So to be safe we assume its running on the host
+ // If res is still IGNORE, we did not find a explicit answer. So, to be safe, we assume it is running on the host.
if ( res == IGNORE )
return false; // can't tell for sure, lets assume host
store_r = _ttext;
}
- /** finaly */
+ /** finally */
void done( const xml::Node & _node )
{
_pdata._edition = Edition( _version, _release );
{
if ( reader_r->depth() == 0 )
{
- // on the verry first level we skip any initial whitespace and comments...
+ // on the very first level we skip any initial whitespace and comments...
do {
// advance to next node
if ( ! reader_r.nextNode() )
* \relates parse_def_assign::Builder
*
* This function allows convenient contruction of a \ref parse_def_assign::Consumer
- * to be passed as \ref Node conssumer to \ref ParseDef. Simply list each attributes
- * name together with the variable it's value should be assigned to. If the attribute
- * name is omitted, the nodes text value gets assigned.
+ * to be passed as \ref Node conssumer to \ref ParseDef. Simply list each attribute's
+ * name together with the variable its value should be assigned to. If the attribute
+ * name is omitted, the node's text value gets assigned.
*
* Target variables can be of any type tsupported by \ref Assigner.
* Basically all types constructible from \c char*, or where a
private:
/** Watch sat pools serial number. */
SerialNumberWatcher _watcher;
- /** Watch sat pools Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate it's PoolItems! */
+ /** Watch sat pools Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate its PoolItems! */
SerialNumberWatcher _watcherIDs;
mutable ContainerT _store;
mutable DefaultIntegral<bool,true> _storeDirty;
}
}
- /** Provide a MediaSetAccess for \c url with label and verifyer adjusted.
+ /** Provide a MediaSetAccess for \c url with label and verifier adjusted.
*
* As the same url (e.g. \c 'dvd:///' ) might be used for multiple repos
- * we must always adjust the repo specific data (label,verifyer).
+ * we must always adjust the repo specific data (label,verifier).
*
* \todo This mixture of media and repos specific data is fragile.
*/
}
}
- SUSEMediaVerifier lverifyer { mediafile };
- if ( lverifyer ) {
- DBG << "Verifyer for repo '" << repo.alias() << "':" << lverifyer << endl;
- for ( media::MediaNr i = 1; i <= lverifyer.totalMedia(); ++i ) {
- media::MediaVerifierRef verifier( new repo::SUSEMediaVerifier( lverifyer, i ) );
+ SUSEMediaVerifier lverifier { mediafile };
+ if ( lverifier ) {
+ DBG << "Verifier for repo '" << repo.alias() << "':" << lverifier << endl;
+ for ( media::MediaNr i = 1; i <= lverifier.totalMedia(); ++i ) {
+ media::MediaVerifierRef verifier( new repo::SUSEMediaVerifier( lverifier, i ) );
media->setVerifier( i, verifier);
}
_verifier[media] = repo;
}
else {
- WAR << "Invalid verifier for repo '" << repo.alias() << "' in '" << repo.metadataPath() << "': " << lverifyer << endl;
+ WAR << "Invalid verifier for repo '" << repo.alias() << "' in '" << repo.metadataPath() << "': " << lverifier << endl;
}
}
else
///
/// This type of verifier however is convenience to tell in advance if the
/// wrong media is inserted. Errors when retrieving the data are logged,
- /// but won't let any verification fail. If the medium happens to be right
- /// everything is fine, if it's wrong download time will tell.
+ /// but won't let any verification fail. If the medium happens to be right,
+ /// everything is fine. If it's wrong, download time will tell.
///
class SUSEMediaVerifier::Impl
{
*
* \note Unfortunately the underlying libsolv dataiterator as returned
* by \ref subBegin and \ref subFind loses some context when being created.
- * Thus it's not possible to invoke \ref subBegin and \ref subFind on an
+ * Thus, it's not possible to invoke \ref subBegin and \ref subFind on an
* iterator that was previously returned by one of those methods. The result
- * will be an \c end iterator. For the same reason it is not possible for an
+ * will be an \c end iterator. For the same reason, it is not possible for an
* iterator to leave the sub-structure again.
*
* \code
public:
/**
* C-tor taking over ownership of the passed \c detail::CDataiterator
- * and doing it's first iteration (::dataiterator_step)
+ * and doing its first iteration (::dataiterator_step)
*/
iterator( detail::DIWrap & dip_r );
/** Housekeeping data serial number. */
const SerialNumber & serial() const;
- /** Serial number changing whenever resusePoolIDs==true was used. ResPool must also invalidate it's PoolItems! */
+ /** Serial number changing whenever resusePoolIDs==true was used. ResPool must also invalidate its PoolItems! */
const SerialNumber & serialIDs() const;
/** Update housekeeping data if necessary (e.g. whatprovides). */
public:
/** The identifier.
* This is the solvables \ref name, \b except for packages and
- * source packes, prefixed by it's \ref kind.
+ * source packes, prefixed by its \ref kind.
*/
IdString ident()const;
* packages should not be installed.
*
* - PTFs usually contain special features or fixes which are not yet released as
- * an official patch upadate. Installing a PTF will prevent it's packages from being
+ * an official patch upadate. Installing a PTF will prevent its packages from being
* updated until you decide to remove the PTF and follow the official releases again.
*/
//@{
/** Parse and add spec from a string (`IDENT` or provides:CAPABILITY`). */
void parse( const C_Str & spec_r );
- /** Parse file \a istr_r and add it's specs (one per line, #-comments). */
+ /** Parse file \a istr_r and add its specs (one per line, #-comments). */
void parseFrom( const InputStream & istr_r );
/** Parse and add specs from iterator range. */
// NOTE: the explicit ::repo_free above asserts all solvables are memset(0)!
if ( !_pool->urepos )
{
- _serialIDs.setDirty(); // Indicate resusePoolIDs - ResPool must also invalidate it's PoolItems
+ _serialIDs.setDirty(); // Indicate resusePoolIDs - ResPool must also invalidate its PoolItems
::pool_freeallrepos( _pool, /*resusePoolIDs*/true );
}
}
const SerialNumber & serial() const
{ return _serial; }
- /** Serial number changing whenever resusePoolIDs==true was used. ResPool must also invalidate it's PoolItems! */
+ /** Serial number changing whenever resusePoolIDs==true was used. ResPool must also invalidate its PoolItems! */
const SerialNumber & serialIDs() const
{ return _serialIDs; }
CPool * _pool;
/** Serial number - changes with each Pool content change. */
SerialNumber _serial;
- /** Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate it's PoolItems! */
+ /** Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate its PoolItems! */
SerialNumber _serialIDs;
/** Watch serial number. */
SerialNumberWatcher _watcher;
PoolItemList _result_items_to_install;
PoolItemList _result_items_to_remove;
public:
- ResolverFocus _focus; // The resolvers general attitude
+ ResolverFocus _focus; // The resolver's general attitude
bool _fixsystem:1; // repair errors in rpm dependency graph
bool _allowdowngrade:1; // allow one to downgrade installed solvable
if ( script.isFile() )
{
- // Assert it's set executable, unify by md5sum.
+ // Assert it's set as executable, unify by md5sum.
filesystem::addmod( script.path(), 0500 );
unifytag = filesystem::md5sum( script.path() );
}
// Send notification once upon calling rpm
NotifyAttemptToModify attemptToModify( result_r );
- // let zypper know we executed in one big transaction so in case of failures it can show extended error informations
+ // let zypper know we executed in one big transaction so in case of failures it can show extended error information
result_r.setSingleTransactionMode( true );
// bsc#1181328: Some systemd tools require /proc to be mounted
};
auto prog = zyppng::Process::create();
- // we set up a pipe to communicate with the process, its too dangerous to use stdout since librpm
+ // we set up a pipe to communicate with the process, it is too dangerous to use stdout since librpm
// might print to it.
auto messagePipe = zyppng::Pipe::create();
if ( !messagePipe )
ZYPP_THROW( rpm::RpmTransactionFailedException( sstr.str() ) );
} else {
- ZYPP_THROW( rpm::RpmTransactionFailedException("RPM failed with a unexpected error, check the logs for more informations.") );
+ ZYPP_THROW( rpm::RpmTransactionFailedException("RPM failed with a unexpected error, check the logs for more information.") );
}
break;
}
ZYPP_THROW( rpm::RpmInitException( rpm().root(), rpm().dbPath() ) );
break;
case zypprpm::FailedToReadPackage:
- ZYPP_THROW( rpm::RpmSubprocessException("zypp-rpm was unable to read a package, check the logs for more informations.") );
+ ZYPP_THROW( rpm::RpmSubprocessException("zypp-rpm was unable to read a package, check the logs for more information.") );
break;
case zypprpm::FailedToAddStepToTransaction:
- ZYPP_THROW( rpm::RpmSubprocessException("zypp-rpm failed to build the transaction, check the logs for more informations.") );
+ ZYPP_THROW( rpm::RpmSubprocessException("zypp-rpm failed to build the transaction, check the logs for more information.") );
break;
case zypprpm::RpmOrderFailed:
- ZYPP_THROW( rpm::RpmSubprocessException("zypp-rpm failed to order the transaction, check the logs for more informations.") );
+ ZYPP_THROW( rpm::RpmSubprocessException("zypp-rpm failed to order the transaction, check the logs for more information.") );
break;
}
std::string tarmsg;
- // TODO: its probably possible to start tar with -v and watch it adding
+ // TODO: it is probably possible to start tar with -v and watch it adding
// files to report progress
for (std::string output = tar.receiveLine(); output.length() ;output = tar.receiveLine())
{
* an empty Pathname is given the default (\c/) is used.
*
* Calling initDatabase a second time with different arguments will return
- * an error but leave the database in it's original state.
+ * an error but leave the database in its original state.
*
* If the database already exists and \c doRebuild_r is true,
* \ref rebuildDatabase is called.
*/
void syncTrustedKeys( SyncTrustedKeyBits mode_r = SYNC_BOTH );
/**
- * iterates through zypp keyring and import all non existant keys
+ * iterates through zypp keyring and import all non-existent keys
* into rpm keyring
*/
void importZyppKeyRingTrustedKeys();
};
/** Detailed rpm signature check log messages
- * A single multiline message if \ref CHK_OK. Otherwise each message line
- * together with it's \ref CheckPackageResult.
+ * A single multiline message if \ref CHK_OK. Otherwise, each message line
+ * together with its \ref CheckPackageResult.
*/
struct CheckPackageDetail : std::vector<std::pair<CheckPackageResult,std::string>>
{};
/** Get the \ref Selctable */
static Ptr get( const pool::ByIdent & ident_r );
- /** Get the \ref Selctable by it's \c sat-identifyer. */
+ /** Get the \ref Selctable by its \c sat-identifier. */
static Ptr get( IdString ident_r )
{ return get( pool::ByIdent( ident_r ) ); }
public:
/** The identifier.
* This is the solvables \ref name, \b except for packages and
- * source packes, prefixed by it's \ref kind.
+ * source packes, prefixed by its \ref kind.
* \see \ref sat::Solvable.
*/
IdString ident() const;
/** UI status
* Status values calculated by \ref Selectable.
- * \note The \ref Status enum, and it's use within \ref Selectabe
- * is tightly related to the Y2UI. It might be not verry usefull
+ * \note The \ref Status enum, and its use within \ref Selectabe
+ * is tightly related to the Y2UI. It might be not very useful
* outside the Y2UI.
*
* \todo make it an EnumerationClass
void MediaNetwork::getDir(const zypp::filesystem::Pathname &dirname, bool recurse_r) const
{
- //we could make this download concurrently, but its not used anywhere in the code, so why bother
+ //we could make this download concurrently, but it is not used anywhere in the code, so why bother
zypp::filesystem::DirContent content;
getDirInfo( content, dirname, /*dots*/false );