Hello community,
here is the log from the commit of package yast2-pkg-bindings for openSUSE:Factory checked in at 2019-07-31 14:16:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pkg-bindings"
Wed Jul 31 14:16:45 2019 rev:205 rq:706661 version:4.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes 2019-03-12 09:50:53.407568256 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.4126/yast2-pkg-bindings.changes 2019-07-31 14:16:48.114712540 +0200
@@ -1,0 +2,7 @@
+Thu May 23 07:09:08 UTC 2019 - Ladislav Slezák
+
+- Added Pkg.Resolvables() and Pkg.AnyResolvable() calls
+ (related to bsc#1132650)
+- 4.2.0
+
+-------------------------------------------------------------------
Old:
----
yast2-pkg-bindings-4.1.2.tar.bz2
New:
----
yast2-pkg-bindings-4.2.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.zEM52b/_old 2019-07-31 14:16:48.746712368 +0200
+++ /var/tmp/diff_new_pack.zEM52b/_new 2019-07-31 14:16:48.750712367 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings-devel-doc
-Version: 4.1.2
+Version: 4.2.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-pkg-bindings-%{version}.tar.bz2
++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.zEM52b/_old 2019-07-31 14:16:48.770712361 +0200
+++ /var/tmp/diff_new_pack.zEM52b/_new 2019-07-31 14:16:48.770712361 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 4.1.2
+Version: 4.2.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-pkg-bindings-4.1.2.tar.bz2 -> yast2-pkg-bindings-4.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.1.2/Dockerfile new/yast2-pkg-bindings-4.2.0/Dockerfile
--- old/yast2-pkg-bindings-4.1.2/Dockerfile 2019-03-08 13:05:55.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.0/Dockerfile 2019-05-27 09:27:48.000000000 +0200
@@ -1,4 +1,4 @@
-FROM yastdevel/cpp
+FROM registry.opensuse.org/yast/head/containers/yast-cpp:latest
RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
libzypp-devel yast2-ruby-bindings iproute2
COPY . /usr/src/app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.1.2/package/yast2-pkg-bindings-devel-doc.spec new/yast2-pkg-bindings-4.2.0/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-4.1.2/package/yast2-pkg-bindings-devel-doc.spec 2019-03-08 13:05:55.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.0/package/yast2-pkg-bindings-devel-doc.spec 2019-05-27 09:27:48.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-pkg-bindings-devel-doc
-Version: 4.1.2
+Version: 4.2.0
Release: 0
License: GPL-2.0-only
Group: Documentation/HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.1.2/package/yast2-pkg-bindings.changes new/yast2-pkg-bindings-4.2.0/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-4.1.2/package/yast2-pkg-bindings.changes 2019-03-08 13:05:55.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.0/package/yast2-pkg-bindings.changes 2019-05-27 09:27:48.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu May 23 07:09:08 UTC 2019 - Ladislav Slezák
+
+- Added Pkg.Resolvables() and Pkg.AnyResolvable() calls
+ (related to bsc#1132650)
+- 4.2.0
+
+-------------------------------------------------------------------
Fri Mar 8 11:44:51 UTC 2019 - mvidner@suse.com
- zypp::TriBool now needs an explicit cast to bool (bsc#1128364)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.1.2/package/yast2-pkg-bindings.spec new/yast2-pkg-bindings-4.2.0/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-4.1.2/package/yast2-pkg-bindings.spec 2019-03-08 13:05:55.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.0/package/yast2-pkg-bindings.spec 2019-05-27 09:27:48.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pkg-bindings
-Version: 4.1.2
+Version: 4.2.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.1.2/smoke_test_run.rb new/yast2-pkg-bindings-4.2.0/smoke_test_run.rb
--- old/yast2-pkg-bindings-4.1.2/smoke_test_run.rb 2019-03-08 13:05:55.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.0/smoke_test_run.rb 2019-05-27 09:27:48.000000000 +0200
@@ -16,7 +16,7 @@
# to y2log without affecting the return value :-(
def check_y2log
y2log = File.read(log_file).split("\n")
-
+
# keep only errors and higher
y2log.select! { |l| l =~ /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} <[3-5]>/ }
@@ -28,7 +28,7 @@
# ignore "Can't openfile '/var/lib/zypp/LastDistributionFlavor' for writing"
# (when running as non-root)
y2log.reject! { |l| l =~ /\/var\/lib\/zypp\/LastDistributionFlavor/ }
-
+
if !y2log.empty?
puts "Found errors in #{log_file}:"
puts y2log
@@ -80,5 +80,31 @@
end
puts "OK"
+# Check all packages - this expects at least one package is available/installed
+puts "Checking Pkg.Resolvabless..."
+resolvables = Yast::Pkg.Resolvables({kind: :package}, [])
+raise "Pkg.Resolvables failed!" unless resolvables
+raise "No package found!" if resolvables.empty?
+# compare with the old Pkg.ResolvableProperties call
+raise "Different number of packages found!" if packages.size != resolvables.size
+puts "OK (found #{resolvables.size} packages)"
+
+patterns = Yast::Pkg.Resolvables({kind: :pattern}, [:name])
+raise "Pkg.Resolvables failed!" unless patterns
+raise "No pattern found!" if patterns.empty?
+raise "Pattern devel_yast not found" unless patterns.include?("name" => "devel_yast")
+puts "OK (found #{patterns.size} patterns)"
+
+installed_products = Yast::Pkg.Resolvables({kind: :product, status: :installed}, [:name, :display_name])
+available_products = Yast::Pkg.Resolvables({kind: :product, status: :available}, [:name, :display_name])
+selected_products = Yast::Pkg.Resolvables({kind: :product, status: :selected}, [:name, :display_name])
+raise "Pkg.Resolvables failed!" unless patterns
+raise "No installed product found!" if installed_products.empty?
+raise "No available product found!" if available_products.empty?
+raise "A selected product found, nothing should be selected now!" unless selected_products.empty?
+puts "Found #{installed_products.size} installed products: #{installed_products.map{|p| p["display_name"]}}"
+puts "Found #{available_products.size} available products: #{available_products.map{|p| p["display_name"]}}"
+puts "OK"
+
# scan y2log for errors
check_y2log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pkg-bindings-4.1.2/src/PkgFunctions.h new/yast2-pkg-bindings-4.2.0/src/PkgFunctions.h
--- old/yast2-pkg-bindings-4.1.2/src/PkgFunctions.h 2019-03-08 13:05:55.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.0/src/PkgFunctions.h 2019-05-27 09:27:48.000000000 +0200
@@ -215,7 +215,7 @@
bool CreateBaseProductSymlink();
- YCPMap Resolvable2YCPMap(const zypp::PoolItem &item, const std::string &req_kind, bool dependencies);
+ YCPMap Resolvable2YCPMap(const zypp::PoolItem &item, bool all, bool deps, const YCPList &attrs);
// CommitPolicy used for commit
zypp::ZYppCommitPolicy *commit_policy;
@@ -766,6 +766,11 @@
/* TYPEINFO: boolean(symbol,symbol)*/
YCPValue IsAnyResolvable(const YCPSymbol& kind_r, const YCPSymbol& status);
+ /* TYPEINFO: list