#
SET(LIBZYPP_MAJOR "6")
SET(LIBZYPP_COMPATMINOR "19")
-SET(LIBZYPP_MINOR "27")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_MINOR "28")
+SET(LIBZYPP_PATCH "0")
#
# LAST RELEASED: 6.27.1 (19)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
, updateMessagesNotify ( "single | /usr/lib/zypp/notify-message -p %p" )
, repo_add_probe ( false )
, repo_refresh_delay ( 10 )
+ , repoLabelIsAlias ( false )
, download_use_deltarpm ( true )
, download_use_deltarpm_always ( false )
, download_media_prefer_download( true )
bool repo_add_probe;
unsigned repo_refresh_delay;
+ bool repoLabelIsAlias;
bool download_use_deltarpm;
bool download_use_deltarpm_always;
return _pimpl->repo_refresh_delay;
}
+ bool ZConfig::repoLabelIsAlias() const
+ { return _pimpl->repoLabelIsAlias; }
+
+ void ZConfig::repoLabelIsAlias( bool yesno_r )
+ { _pimpl->repoLabelIsAlias = yesno_r; }
+
bool ZConfig::download_use_deltarpm() const
{ return _pimpl->download_use_deltarpm; }
unsigned repo_refresh_delay() const;
/**
+ * Whether to use repository alias or name in user messages (progress,
+ * exceptions, ...).
+ * True: use alias, false: use name.
+ */
+ bool repoLabelIsAlias() const;
+
+ /**
+ * Whether to use repository alias or name in user messages (progress,
+ * exceptions, ...). Console applications might prefer to use and display
+ * the shorter alias instead of full repository name.
+ *
+ * Default: false; i.e. repo label is 'name'
+ */
+ void repoLabelIsAlias( bool yesno_r );
+
+ /**
* Maximum number of concurrent connections for a single transfer
*/
long download_max_concurrent_connections() const;
*/
#include <iostream>
+#include "zypp/ZConfig.h"
#include "zypp/repo/RepoVariables.h"
#include "zypp/repo/RepoInfoBase.h"
return replacer(_pimpl->name);
}
+ std::string RepoInfoBase::label() const
+ {
+ if ( ZConfig::instance().repoLabelIsAlias() )
+ return alias();
+ return name();
+ }
+
Pathname RepoInfoBase::filepath() const
{ return _pimpl->filepath; }
/**
* \short Repository short label
*
- * Short label or description of the repository, to be used on
- * the user interface.
+ * Short label or description of the repository.
* ie: "SUSE Linux 10.2 updates"
*/
std::string name() const;
/**
+ * \short Label for use in messages for the user interface.
+ *
+ * Returns an alias or name, according to ZConfig::repoLabelIsAlias().
+ */
+ std::string label() const;
+
+ /**
* If enabled is false, then this repository must be ignored as if does
* not exists, except when checking for duplicate alias.
*/