Hello community,
here is the log from the commit of package yast2-pkg-bindings for openSUSE:Factory checked in at 2014-06-26 08:00:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes 2014-06-01 18:56:00.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new/yast2-pkg-bindings.changes 2014-06-26 08:00:07.000000000 +0200
@@ -1,0 +2,22 @@
+Tue Jun 10 09:40:33 UTC 2014 - lslezak@suse.cz
+
+- fixed ServiceRefresh to not add duplicated repositories (that
+ confuses package installation progress during installation)
+ (bnc#865037)
+- 3.1.15
+
+-------------------------------------------------------------------
+Thu Jun 5 18:37:51 UTC 2014 - lslezak@suse.cz
+
+- added Pkg::TargetInitializeOptions(), allows overriding the
+ target distribution autodetection (bnc#881320)
+- 3.1.14
+
+-------------------------------------------------------------------
+Wed Jun 4 07:15:20 UTC 2014 - lslezak@suse.cz
+
+- do not log false warning message about missing base product
+ when it is actually found (bnc#876677#c14)
+- 3.1.13
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-3.1.12.tar.bz2
New:
----
yast2-pkg-bindings-3.1.15.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.hbWLDD/_old 2014-06-26 08:00:09.000000000 +0200
+++ /var/tmp/diff_new_pack.hbWLDD/_new 2014-06-26 08:00:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 3.1.12
+Version: 3.1.15
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-pkg-bindings-%{version}.tar.bz2
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.hbWLDD/_old 2014-06-26 08:00:09.000000000 +0200
+++ /var/tmp/diff_new_pack.hbWLDD/_new 2014-06-26 08:00:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 3.1.12
+Version: 3.1.15
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-pkg-bindings-3.1.12.tar.bz2 -> yast2-pkg-bindings-3.1.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/package/yast2-pkg-bindings-devel-doc.spec new/yast2-pkg-bindings-3.1.15/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-3.1.12/package/yast2-pkg-bindings-devel-doc.spec 2014-05-27 15:36:47.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/package/yast2-pkg-bindings-devel-doc.spec 2014-06-10 14:36:32.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-pkg-bindings-devel-doc
-Version: 3.1.12
+Version: 3.1.15
Release: 0
License: GPL-2.0
Group: Documentation/HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/package/yast2-pkg-bindings.changes new/yast2-pkg-bindings-3.1.15/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-3.1.12/package/yast2-pkg-bindings.changes 2014-05-27 15:36:47.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/package/yast2-pkg-bindings.changes 2014-06-10 14:36:32.000000000 +0200
@@ -1,4 +1,26 @@
-------------------------------------------------------------------
+Tue Jun 10 09:40:33 UTC 2014 - lslezak@suse.cz
+
+- fixed ServiceRefresh to not add duplicated repositories (that
+ confuses package installation progress during installation)
+ (bnc#865037)
+- 3.1.15
+
+-------------------------------------------------------------------
+Thu Jun 5 18:37:51 UTC 2014 - lslezak@suse.cz
+
+- added Pkg::TargetInitializeOptions(), allows overriding the
+ target distribution autodetection (bnc#881320)
+- 3.1.14
+
+-------------------------------------------------------------------
+Wed Jun 4 07:15:20 UTC 2014 - lslezak@suse.cz
+
+- do not log false warning message about missing base product
+ when it is actually found (bnc#876677#c14)
+- 3.1.13
+
+-------------------------------------------------------------------
Tue May 27 13:18:29 UTC 2014 - lslezak@suse.cz
- move package cache to target system (copy RPMs to /mnt instead of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/package/yast2-pkg-bindings.spec new/yast2-pkg-bindings-3.1.15/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-3.1.12/package/yast2-pkg-bindings.spec 2014-05-27 15:36:47.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/package/yast2-pkg-bindings.spec 2014-06-10 14:36:32.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 3.1.12
+Version: 3.1.15
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/src/PkgFunctions.cc new/yast2-pkg-bindings-3.1.15/src/PkgFunctions.cc
--- old/yast2-pkg-bindings-3.1.12/src/PkgFunctions.cc 2014-05-27 15:36:47.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/src/PkgFunctions.cc 2014-06-06 13:01:31.000000000 +0200
@@ -44,7 +44,7 @@
#include
// textdomain
-#include
+#include
/*
Textdomain "pkg-bindings"
*/
@@ -295,7 +295,7 @@
const char* dmode;
zypp::DownloadMode dm = zconfig.commit_downloadMode();
-
+
if (dm == zypp::DownloadDefault) dmode = "default";
else if (dm == zypp::DownloadInAdvance) dmode = "download_in_advance";
else if (dm == zypp::DownloadAsNeeded) dmode = "download_as_needed";
@@ -348,7 +348,7 @@
rpm_flags->add(YCPString("-U"));
ret->add(YCPString("rpm_install_flags"), rpm_flags);
-
+
ret->add(YCPString("history_log_file"), YCPString(zconfig.historyLogFile().asString()));
ret->add(YCPString("credentials_global_dir"), YCPString(zconfig.credentialsGlobalDir().asString()));
@@ -428,17 +428,28 @@
return YCPBoolean(true);
}
-bool PkgFunctions::RepoManagerUpdateTarget(const std::string& root)
+bool PkgFunctions::RepoManagerUpdateTarget(const std::string& root, const YCPMap& options)
{
bool new_target = _target_root != root;
// a repository manager is present and the target has been changed
- if (repo_manager && new_target)
+ // or there are options to set
+ if ((repo_manager && new_target) || options.size() > 0)
{
- y2milestone("Updating RepoManager target from %s to %s", _target_root.c_str(), root.c_str());
+ y2milestone("Updating RepoManager (target changed from %s to %s)", _target_root.c_str(), root.c_str());
+
+ zypp::RepoManagerOptions repo_manager_options(root);
+
+ y2debug("repomanager options size: %zd", options.size());
+ if(!options->value(YCPString("target_distro")).isNull() && options->value(YCPString("target_distro"))->isString())
+ {
+ // override the target distribution autodetection
+ y2milestone("Using target_distro: %s", options->value(YCPString("target_distro"))->asString()->value().c_str());
+ repo_manager_options.servicesTargetDistro = options->value(YCPString("target_distro"))->asString()->value();
+ }
// repository manager options cannot be replaced, a new repository manager is needed
- zypp::RepoManager* new_repo_manager = new zypp::RepoManager(zypp::RepoManagerOptions(root));
+ zypp::RepoManager* new_repo_manager = new zypp::RepoManager(repo_manager_options);
// register the known repositories
if (repos.empty() && service_manager.empty())
@@ -455,7 +466,7 @@
}
// replace the old repository manager
- delete repo_manager;
+ if (repo_manager) delete repo_manager;
repo_manager = new_repo_manager;
}
@@ -482,9 +493,9 @@
return new_target;
}
-bool PkgFunctions::SetTarget(const std::string &root)
+bool PkgFunctions::SetTarget(const std::string &root, const YCPMap& options)
{
- bool new_target = RepoManagerUpdateTarget(root);
+ bool new_target = RepoManagerUpdateTarget(root, options);
_target_root = root;
return new_target;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/src/PkgFunctions.h new/yast2-pkg-bindings-3.1.15/src/PkgFunctions.h
--- old/yast2-pkg-bindings-3.1.12/src/PkgFunctions.h 2014-05-27 15:36:47.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/src/PkgFunctions.h 2014-06-06 13:01:31.000000000 +0200
@@ -31,10 +31,11 @@
#include <string>
#include <vector>
+#include
+
class YCPBoolean;
class YCPValue;
class YCPList;
-class YCPMap;
class YCPSymbol;
class YCPString;
class YCPInteger;
@@ -127,10 +128,10 @@
// helper for updating repository manager after changing the target root
// return true if the target root has been changed
- bool RepoManagerUpdateTarget(const std::string& root);
+ bool RepoManagerUpdateTarget(const std::string& root, const YCPMap& options = YCPMap());
// set new target directory
- bool SetTarget(const std::string &root);
+ bool SetTarget(const std::string &root, const YCPMap& options = YCPMap());
// configured or default download area
zypp::Pathname download_area_path();
@@ -555,6 +556,8 @@
YCPValue TargetRebuildInit(const YCPString& root);
/* TYPEINFO: boolean(string)*/
YCPValue TargetInitialize (const YCPString& root);
+ /* TYPEINFO: boolean(string, map)*/
+ YCPValue TargetInitializeOptions (const YCPString& root, const YCPMap& options);
/* TYPEINFO: boolean()*/
YCPValue TargetLoad ();
/* TYPEINFO: boolean()*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/src/Service.cc new/yast2-pkg-bindings-3.1.15/src/Service.cc
--- old/yast2-pkg-bindings-3.1.12/src/Service.cc 2014-05-27 15:36:48.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/src/Service.cc 2014-06-10 14:36:32.000000000 +0200
@@ -414,7 +414,8 @@
it != reps.end(); ++it)
{
y2debug("Checking repo '%s' from service '%s'", it->alias().c_str(), it->service().c_str());
- if (it->service() == alias_str && !logFindAlias(it->alias()))
+ // skip repositories from other services or already loaded repositories
+ if (it->service() != alias_str || logFindAlias(it->alias()) > 0)
continue;
y2milestone("Service added a new repository: %s", it->alias().c_str());
@@ -423,7 +424,7 @@
if (it->enabled())
{
- y2milestone("Refreshing service: %s", it->alias().c_str());
+ y2milestone("Refreshing repository: %s", it->alias().c_str());
// refresh the last added repository
SourceRefreshNow(repos.size() - 1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/src/Source_Create.cc new/yast2-pkg-bindings-3.1.15/src/Source_Create.cc
--- old/yast2-pkg-bindings-3.1.12/src/Source_Create.cc 2014-05-27 15:36:48.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/src/Source_Create.cc 2014-06-10 14:36:32.000000000 +0200
@@ -906,6 +906,8 @@
product->arch(),
alias
);
+
+ return;
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-3.1.12/src/Target_Load.cc new/yast2-pkg-bindings-3.1.15/src/Target_Load.cc
--- old/yast2-pkg-bindings-3.1.12/src/Target_Load.cc 2014-05-20 08:46:25.000000000 +0200
+++ new/yast2-pkg-bindings-3.1.15/src/Target_Load.cc 2014-06-06 13:01:31.000000000 +0200
@@ -91,7 +91,7 @@
y2error("TargetInit has failed: %s", excpt.msg().c_str() );
return YCPError(excpt.msg().c_str(), YCPBoolean(false));
}
-
+
// locks are optional, might not be present on the target
zypp::Pathname lock_file(_target_root + zypp::ZConfig::instance().locksFile());
try
@@ -106,7 +106,7 @@
}
pkgprogress.Done();
-
+
return YCPBoolean(true);
}
@@ -147,12 +147,29 @@
YCPValue
PkgFunctions::TargetInitialize (const YCPString& root)
{
+ return TargetInitializeOptions(root, YCPMap());
+}
+
+/** ------------------------
+ *
+ * @builtin TargetInitializeOptions
+ * @short Initialize Target, read the keys, set the repomanager options
+ * @param string root Root Directory
+ * @param map options for RepoManager
+ * supproted keys:
+ * "target_distro": <string> - override the target distribution autodetection,
+ * example values: "sle-11-x86_84", "sle-12-x86_84"
+ * @return boolean
+ */
+YCPValue
+PkgFunctions::TargetInitializeOptions (const YCPString& root, const YCPMap& options)
+{
const std::string r = root->value();
try
{
zypp_ptr()->initializeTarget(r);
- SetTarget(r);
+ SetTarget(r, options);
}
catch (zypp::Exception & excpt)
{
@@ -160,7 +177,7 @@
y2error("TargetInit has failed: %s", excpt.msg().c_str() );
return YCPError(excpt.msg().c_str(), YCPBoolean(false));
}
-
+
return YCPBoolean(true);
}
@@ -199,7 +216,7 @@
}
pkgprogress.Done();
-
+
return YCPBoolean(true);
}
@@ -216,7 +233,7 @@
try
{
zypp_ptr()->finishTarget();
-
+
zypp::Pathname lock_file(_target_root + zypp::ZConfig::instance().locksFile());
zypp::Locks::instance().save(lock_file);
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org