Hello community,

here is the log from the commit of package yast2-metapackage-handler for 
openSUSE:Factory checked in at 2020-01-30 09:40:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-metapackage-handler (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-metapackage-handler.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-metapackage-handler"

Thu Jan 30 09:40:11 2020 rev:52 rq:766789 version:4.1.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/yast2-metapackage-handler/yast2-metapackage-handler.changes
      2019-02-28 21:48:31.277393965 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-metapackage-handler.new.26092/yast2-metapackage-handler.changes
   2020-01-30 09:41:15.337485443 +0100
@@ -1,0 +2,15 @@
+Fri Jan 24 10:02:03 UTC 2020 - Steffen Winterfeldt <[email protected]>
+
+- remove obsolete patch 103.diff
+- remove obsolete patch SLE.diff
+
+-------------------------------------------------------------------
+Fri Nov 15 10:38:42 UTC 2019 - Steffen Winterfeldt <[email protected]>
+
+- rewrite YMP file parsing (bsc#1138638)
+- fix YMP schema definitions
+- add YMP examples
+- remove perl dependency
+- 4.1.1
+
+-------------------------------------------------------------------

Old:
----
  103.diff
  SLE.diff
  yast2-metapackage-handler-4.1.0.tar.bz2

New:
----
  yast2-metapackage-handler-4.1.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-metapackage-handler.spec ++++++
--- /var/tmp/diff_new_pack.nEHj4H/_old  2020-01-30 09:41:15.929485760 +0100
+++ /var/tmp/diff_new_pack.nEHj4H/_new  2020-01-30 09:41:15.929485760 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-metapackage-handler
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,122 +12,67 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           yast2-metapackage-handler
-Version:        4.1.0
+Version:        4.1.1
 Release:        0
+Summary:        YaST2 - Easy Installation of Add-on RPMs using Metapackages
+License:        GPL-2.0-or-later
+Group:          System/YaST
+Url:            https://github.com/yast/yast-metapackage-handler
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        %{name}-%{version}.tar.bz2
 
 # should be required by devtools
-BuildRequires:  perl-XML-Writer
 BuildRequires:  pkgconfig
 # y2tool
 BuildRequires:  yast2-devtools >= 3.1.10
 # ycpc
-BuildRequires:  yast2-core
-# we have a Perl part
-BuildRequires:  perl-XML-XPath
 BuildRequires:  yast2
+BuildRequires:  yast2-core
 BuildRequires:  yast2-country-data
 BuildRequires:  yast2-packager
-BuildRequires:  yast2-perl-bindings
 BuildRequires:  yast2-transfer
 # desktop files
 BuildRequires:  update-desktop-files
+BuildRequires:  rubygem(%rb_default_ruby_abi:yast-rake)
 
-Patch0:         SLE.diff
-Patch1:         103.diff
-
-Requires:       perl-XML-XPath
 Requires:       yast2
 Requires:       yast2-packager
-Requires:       yast2-perl-bindings
 Requires:       yast2-transfer
 # Language
 Requires:       yast2-country-data
 # needed at runtime for invoking root mode
 Requires:       /usr/bin/xdg-su
-
-BuildArch:      noarch
-
 Requires:       yast2-ruby-bindings >= 1.0.0
 
-Summary:        YaST2 - Easy Installation of Add-on RPMs using Metapackages
-License:        GPL-2.0-or-later
-Group:          System/YaST
+BuildArch:      noarch
 
 %description
 With this technology users can install packages and add repositories
 with a simple click on a link in a website.
 
 %prep
-%setup -n %{name}-%{version}
-
-%if %suse_version <= 1020
-%patch0
-%endif
-
-%if %suse_version <= 1030
-%patch1
-%endif
+%setup -q
 
 %build
-%yast_build
 
 %install
 %yast_install
 
-%if %suse_version <= 1020
-mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/applnk/.hidden/
-mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/text/
-chmod -R 0755 $RPM_BUILD_ROOT/opt/kde3
-install -m 0644 src/kdeymp.desktop \
-       $RPM_BUILD_ROOT/opt/kde3/share/applnk/.hidden/
-install -m 0644 src/x-suse-ymp.desktop \
-       $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/text/
-%endif
-%suse_update_desktop_file yast2-metapackage-handler 
-%suse_update_desktop_file yast2-metapackage-handler-ymu
-
-%post
-# #330352, SuSEconfig.desktop-file-utils only calls
-# update-desktop-database
-if test -x usr/bin/update-mime-database ; then
-  usr/bin/update-mime-database usr/share/mime >/dev/null
-fi
-
-%postun
-if test -x usr/bin/update-mime-database ; then
-  usr/bin/update-mime-database usr/share/mime >/dev/null
-fi
+%suse_update_desktop_file org.opensuse.yast.MetapackageHandler
 
 %files
-%defattr(-,root,root)
 %doc %{yast_docdir}
-/sbin/OneClickInstallUI
-/sbin/OneClickInstallUrlHandler
-/sbin/OneClickInstallCLI
-/sbin/OCICLI
-%{_sbindir}/OneClickInstallUI
-%{_sbindir}/OneClickInstallUrlHandler
-%{_sbindir}/OneClickInstallCLI
-%{_sbindir}/OCICLI
-
-%dir %{yast_clientdir}
-%{yast_clientdir}/*.rb
-%dir %{yast_moduledir}
-%{yast_moduledir}/*.rb
-%{yast_moduledir}/*.pm
 %license COPYING
-%if %suse_version <= 1020
-/opt/kde3
-%endif
-%{_datadir}/mime/packages/*.xml
-%{_datadir}/applications/yast2-metapackage-handler*.desktop
+%{_bindir}/
+%{yast_clientdir}
+%{yast_moduledir}
+%{yast_icondir}
+%{_datadir}/mime/packages/
+%{_datadir}/applications/
 
 %changelog

++++++ yast2-metapackage-handler-4.1.0.tar.bz2 -> 
yast2-metapackage-handler-4.1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/Dockerfile 
new/yast2-metapackage-handler-4.1.1/Dockerfile
--- old/yast2-metapackage-handler-4.1.0/Dockerfile      2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/Dockerfile      2019-11-18 
15:22:22.000000000 +0100
@@ -1,4 +1,4 @@
-FROM yastdevel/ruby
+FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest
 RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
     perl-XML-XPath
 COPY . /usr/src/app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/Makefile.cvs 
new/yast2-metapackage-handler-4.1.1/Makefile.cvs
--- old/yast2-metapackage-handler-4.1.0/Makefile.cvs    2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/Makefile.cvs    1970-01-01 
01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-#
-# Makefile.cvs
-#
-
-LIB = $(shell y2tool get-lib)
-
-PREFIX = /usr
-
-configure: all
-       ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
-
-all:
-       y2tool y2autoconf
-       y2tool y2automake
-       autoreconf --force --install -v
-
-install: configure
-       make
-       make install
-
-reconf: all
-       ./config.status --recheck
-       ./config.status
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/Rakefile 
new/yast2-metapackage-handler-4.1.1/Rakefile
--- old/yast2-metapackage-handler-4.1.0/Rakefile        2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/Rakefile        2019-11-18 
15:22:22.000000000 +0100
@@ -3,4 +3,8 @@
 Yast::Tasks.configuration do |conf|
   #lets ignore license check for now
   conf.skip_license_check << /.*/
+  conf.install_locations["doc/*"] = conf.install_doc_dir
+  conf.install_locations["bin/*"] = 
File.join(Packaging::Configuration::DESTDIR, "/usr/bin/")
+  conf.install_locations["desktop/*"] = 
File.join(Packaging::Configuration::DESTDIR, "/usr/share/applications/")
+  conf.install_locations["mime/*"] = 
File.join(Packaging::Configuration::DESTDIR, "/usr/share/mime/packages/")
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/bin/Makefile.am 
new/yast2-metapackage-handler-4.1.1/bin/Makefile.am
--- old/yast2-metapackage-handler-4.1.0/bin/Makefile.am 2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/bin/Makefile.am 1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-dist_sbin_SCRIPTS = \
-       OneClickInstallUrlHandler \
-       OneClickInstallCLI
-
-install-exec-hook:
-       $(LN_S) -f OneClickInstallUrlHandler 
$(DESTDIR)$(sbindir)/OneClickInstallUI
-       $(LN_S) -f OneClickInstallCLI $(DESTDIR)$(sbindir)/OCICLI
-# backward compatibility with binaries in /sbin
-       mkdir -p $(DESTDIR)/sbin/
-       $(LN_S) -f $(sbindir)/OneClickInstallCLI $(DESTDIR)/sbin/OCICLI
-       $(LN_S) -f $(sbindir)/OneClickInstallCLI 
$(DESTDIR)/sbin/OneClickInstallCLI
-       $(LN_S) -f $(sbindir)/OneClickInstallUrlHandler 
$(DESTDIR)/sbin/OneClickInstallUI
-       $(LN_S) -f $(sbindir)/OneClickInstallUrlHandler 
$(DESTDIR)/sbin/OneClickInstallUrlHandler
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/bin/OneClickInstallUI 
new/yast2-metapackage-handler-4.1.1/bin/OneClickInstallUI
--- old/yast2-metapackage-handler-4.1.0/bin/OneClickInstallUI   2020-01-30 
09:41:15.993485795 +0100
+++ new/yast2-metapackage-handler-4.1.1/bin/OneClickInstallUI   2019-11-18 
15:22:22.000000000 +0100
@@ -1 +1,4 @@
-symbolic link to OneClickInstallUrlHandler
+#!/bin/sh
+# This is just a wrapper to be used by Firefox.
+MODULE=${0##*/}
+/sbin/yast2 $MODULE "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/bin/OneClickInstallUrlHandler 
new/yast2-metapackage-handler-4.1.1/bin/OneClickInstallUrlHandler
--- old/yast2-metapackage-handler-4.1.0/bin/OneClickInstallUrlHandler   
2019-02-27 17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/bin/OneClickInstallUrlHandler   
1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#!/bin/sh
-# This is just a wrapper to be used by Firefox.
-MODULE=${0##*/}
-/sbin/yast2 $MODULE "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/configure.in.in 
new/yast2-metapackage-handler-4.1.1/configure.in.in
--- old/yast2-metapackage-handler-4.1.0/configure.in.in 2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/configure.in.in 1970-01-01 
01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-## YCP module configure.in.in
-
-## Initialize
-@YAST2-INIT-COMMON@
-@YAST2-INIT-YCP@
-
-## some common checks
-@YAST2-CHECKS-COMMON@
-@YAST2-CHECKS-YCP@
-
-## and generate the output...
-@YAST2-OUTPUT@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/desktop/Makefile.am 
new/yast2-metapackage-handler-4.1.1/desktop/Makefile.am
--- old/yast2-metapackage-handler-4.1.0/desktop/Makefile.am     2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/desktop/Makefile.am     1970-01-01 
01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-
-
-old_distro_Data = kdeymp.desktop x-suse-ymp.desktop
-
-# overrides devtools
-desktopdir = $(datadir)/applications
-desktop_DATA = yast2-metapackage-handler.desktop 
yast2-metapackage-handler-ymu.desktop
-
-EXTRA_DIST = $(old_distro_Data) $(desktop_DATA)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/desktop/kdeymp.desktop 
new/yast2-metapackage-handler-4.1.1/desktop/kdeymp.desktop
--- old/yast2-metapackage-handler-4.1.0/desktop/kdeymp.desktop  2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/desktop/kdeymp.desktop  1970-01-01 
01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-[Desktop Entry]
-X-SuSE-YaST-RootOnly=false
-X-SuSE-translate=false
-Exec=/sbin/yast2 MetaPackageHandler %U
-InitialPreference=2
-MimeType=text/x-suse-ymp
-Name=yast2
-StartupNotify=false
-Terminal=false
-Type=Application
-X-KDE-StartupNotify=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/desktop/org.opensuse.yast.MetapackageHandler.desktop
 
new/yast2-metapackage-handler-4.1.1/desktop/org.opensuse.yast.MetapackageHandler.desktop
--- 
old/yast2-metapackage-handler-4.1.0/desktop/org.opensuse.yast.MetapackageHandler.desktop
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-metapackage-handler-4.1.1/desktop/org.opensuse.yast.MetapackageHandler.desktop
    2019-11-18 15:22:22.000000000 +0100
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=YaST 1-Click Install
+GenericName=1-Click Install
+Comment=Install packages without manually adding repositories
+Exec=/usr/bin/OneClickInstallUI %f
+Icon=yast-oneclick
+Terminal=false
+Type=Application
+MimeType=text/x-suse-ymp;text/x-suse-ymu;
+Categories=Settings;System;
+NoDisplay=true
+X-KDE-StartupNotify=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/desktop/x-suse-ymp.desktop 
new/yast2-metapackage-handler-4.1.1/desktop/x-suse-ymp.desktop
--- old/yast2-metapackage-handler-4.1.0/desktop/x-suse-ymp.desktop      
2019-02-27 17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/desktop/x-suse-ymp.desktop      
1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Comment=Yast Meta Package
-Hidden=false
-Icon=YaST
-MimeType=text/x-suse-ymp
-Patterns=*.ymp
-Type=MimeType
-
-X-SuSE-translate=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/desktop/yast2-metapackage-handler-ymu.desktop
 
new/yast2-metapackage-handler-4.1.1/desktop/yast2-metapackage-handler-ymu.desktop
--- 
old/yast2-metapackage-handler-4.1.0/desktop/yast2-metapackage-handler-ymu.desktop
   2019-02-27 17:28:39.000000000 +0100
+++ 
new/yast2-metapackage-handler-4.1.1/desktop/yast2-metapackage-handler-ymu.desktop
   1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-# to ${PREFIX-~/.local}/share/applications
-[Desktop Entry]
-Name=YaST 1-Click Install
-GenericName=YaST 1-Click Install
-Comment=Install packages without manually adding repositories
-Exec=/usr/sbin/OneClickInstallUrlHandler %f
-Terminal=false
-MultipleArgs=false
-Type=Application
-MimeType=text/x-suse-ymu;
-Categories=Settings;System;SystemSetup;
-# thx Beineri
-NoDisplay=true
-X-KDE-StartupNotify=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/desktop/yast2-metapackage-handler.desktop 
new/yast2-metapackage-handler-4.1.1/desktop/yast2-metapackage-handler.desktop
--- 
old/yast2-metapackage-handler-4.1.0/desktop/yast2-metapackage-handler.desktop   
    2019-02-27 17:28:39.000000000 +0100
+++ 
new/yast2-metapackage-handler-4.1.1/desktop/yast2-metapackage-handler.desktop   
    1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-# to ${PREFIX-~/.local}/share/applications
-[Desktop Entry]
-Name=YaST 1-Click Install
-GenericName=YaST 1-Click Install
-Comment=Install packages without manually adding repositories
-Exec=/usr/sbin/OneClickInstallUI %f
-Terminal=false
-MultipleArgs=false
-Type=Application
-MimeType=text/x-suse-ymp;
-Categories=Settings;System;SystemSetup;
-# thx Beineri
-NoDisplay=true
-X-KDE-StartupNotify=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/doc/Makefile.am 
new/yast2-metapackage-handler-4.1.1/doc/Makefile.am
--- old/yast2-metapackage-handler-4.1.0/doc/Makefile.am 2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/doc/Makefile.am 1970-01-01 
01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-doc_DATA = TODO tuxsaver.html tuxsaver.ymp
-
-EXTRA_DIST = $(doc_DATA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/mime/Makefile.am 
new/yast2-metapackage-handler-4.1.1/mime/Makefile.am
--- old/yast2-metapackage-handler-4.1.0/mime/Makefile.am        2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/mime/Makefile.am        1970-01-01 
01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-
-mimedir = $(datadir)/mime/packages
-mime_DATA = yast2-metapackage-handler-mimetypes.xml
-
-EXTRA_DIST = $(mime_DATA)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/package/103.diff 
new/yast2-metapackage-handler-4.1.1/package/103.diff
--- old/yast2-metapackage-handler-4.1.0/package/103.diff        2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/package/103.diff        1970-01-01 
01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-Index: src/OneClickInstallWorkerFunctions.ycp
-===================================================================
---- src/OneClickInstallWorkerFunctions.ycp     (revision 46099)
-+++ src/OneClickInstallWorkerFunctions.ycp     (working copy)
-@@ -148,6 +148,7 @@
-                       print(sformat(_("Marking package %1 for 
installation"),name));
-                       //Prefer packages from repositories specified in the YMP
-                       boolean inYmpRepos = false;
-+                      /*
-                       foreach (integer id, 
(list<integer>)merge(sourceids,deduped_repos), 
-                       {
-                               y2debug("Looking for %1 in %2",name,id);
-@@ -163,6 +164,7 @@
-                       });
-                       if (!inYmpRepos)
-                               y2debug("Didn't find %1 At ALL in any YMP 
repos",name);
-+                      */
-                       //If we didn't find it in the repos specified in the 
YMP try any repo.
-                       if (!inYmpRepos && !Pkg::PkgInstall(name))
-                       {
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/package/SLE.diff 
new/yast2-metapackage-handler-4.1.1/package/SLE.diff
--- old/yast2-metapackage-handler-4.1.0/package/SLE.diff        2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/package/SLE.diff        1970-01-01 
01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-Index: src/OneClickInstallWorkerFunctions.ycp
-===================================================================
---- src/OneClickInstallWorkerFunctions.ycp     (revision 45871)
-+++ src/OneClickInstallWorkerFunctions.ycp     (working copy)
-@@ -102,9 +102,9 @@
-                                               
"alias":OneClickInstall::GetRepositoryName(new_url),
-                                               "base_urls":[new_url]
-                                       ];
--                              integer srcid = Pkg::RepositoryAdd(repoData);
--                              boolean success = Pkg::SourceRefreshNow(srcid);
--                              if (!success)
-+                              integer srcid = Pkg::SourceCreate(new_url,"/");
-+                              //boolean success = 
Pkg::SourceRefreshNow(srcid);
-+                              if (srcid <0)
-                               {
-                                       if (Popup::YesNo (_("An error occurred 
while initializing the software repository.") + "\n"     + _("Details:") + "\n" 
+ Pkg::LastError() + "\n" + _("Try again?")))
-                                       {
-@@ -272,4 +272,4 @@
-               return nil;
-       }
- 
--}
-\ No newline at end of file
-+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/package/yast2-metapackage-handler.changes 
new/yast2-metapackage-handler-4.1.1/package/yast2-metapackage-handler.changes
--- 
old/yast2-metapackage-handler-4.1.0/package/yast2-metapackage-handler.changes   
    2019-02-27 17:28:39.000000000 +0100
+++ 
new/yast2-metapackage-handler-4.1.1/package/yast2-metapackage-handler.changes   
    2019-11-18 15:22:22.000000000 +0100
@@ -1,4 +1,13 @@
 -------------------------------------------------------------------
+Fri Nov 15 10:38:42 UTC 2019 - Steffen Winterfeldt <[email protected]>
+
+- rewrite YMP file parsing (bsc#1138638)
+- fix YMP schema definitions
+- add YMP examples
+- remove perl dependency
+- 4.1.1
+
+-------------------------------------------------------------------
 Tue Feb 26 12:08:42 UTC 2019 - José Iván López González <[email protected]>
 
 - Version bump (bsc#1124009)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/package/yast2-metapackage-handler.spec 
new/yast2-metapackage-handler-4.1.1/package/yast2-metapackage-handler.spec
--- old/yast2-metapackage-handler-4.1.0/package/yast2-metapackage-handler.spec  
2019-02-27 17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/package/yast2-metapackage-handler.spec  
2019-11-18 15:22:22.000000000 +0100
@@ -12,122 +12,67 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           yast2-metapackage-handler
-Version:        4.1.0
+Version:        4.1.1
 Release:        0
+Summary:        YaST2 - Easy Installation of Add-on RPMs using Metapackages
+License:        GPL-2.0-or-later
+Group:          System/YaST
+Url:            https://github.com/yast/yast-metapackage-handler
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        %{name}-%{version}.tar.bz2
 
 # should be required by devtools
-BuildRequires:  perl-XML-Writer
 BuildRequires:  pkgconfig
 # y2tool
 BuildRequires:  yast2-devtools >= 3.1.10
 # ycpc
 BuildRequires:  yast2-core
-# we have a Perl part
-BuildRequires:  perl-XML-XPath
 BuildRequires:  yast2
 BuildRequires:  yast2-country-data
 BuildRequires:  yast2-packager
-BuildRequires:  yast2-perl-bindings
 BuildRequires:  yast2-transfer
 # desktop files
 BuildRequires:  update-desktop-files
+BuildRequires:  rubygem(%rb_default_ruby_abi:yast-rake)
 
-Patch0:         SLE.diff
-Patch1:         103.diff
-
-Requires:       perl-XML-XPath
 Requires:       yast2
 Requires:       yast2-packager
-Requires:       yast2-perl-bindings
 Requires:       yast2-transfer
 # Language
 Requires:       yast2-country-data
 # needed at runtime for invoking root mode
 Requires:       /usr/bin/xdg-su
-
-BuildArch:      noarch
-
 Requires:       yast2-ruby-bindings >= 1.0.0
 
-Summary:        YaST2 - Easy Installation of Add-on RPMs using Metapackages
-License:        GPL-2.0-or-later
-Group:          System/YaST
+BuildArch:      noarch
 
 %description
 With this technology users can install packages and add repositories
 with a simple click on a link in a website.
 
 %prep
-%setup -n %{name}-%{version}
-
-%if %suse_version <= 1020
-%patch0
-%endif
-
-%if %suse_version <= 1030
-%patch1
-%endif
+%setup -q
 
 %build
-%yast_build
 
 %install
 %yast_install
 
-%if %suse_version <= 1020
-mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/applnk/.hidden/
-mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/text/
-chmod -R 0755 $RPM_BUILD_ROOT/opt/kde3
-install -m 0644 src/kdeymp.desktop \
-       $RPM_BUILD_ROOT/opt/kde3/share/applnk/.hidden/
-install -m 0644 src/x-suse-ymp.desktop \
-       $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/text/
-%endif
-%suse_update_desktop_file yast2-metapackage-handler 
-%suse_update_desktop_file yast2-metapackage-handler-ymu
-
-%post
-# #330352, SuSEconfig.desktop-file-utils only calls
-# update-desktop-database
-if test -x usr/bin/update-mime-database ; then
-  usr/bin/update-mime-database usr/share/mime >/dev/null
-fi
-
-%postun
-if test -x usr/bin/update-mime-database ; then
-  usr/bin/update-mime-database usr/share/mime >/dev/null
-fi
+%suse_update_desktop_file org.opensuse.yast.MetapackageHandler
 
 %files
-%defattr(-,root,root)
 %doc %{yast_docdir}
-/sbin/OneClickInstallUI
-/sbin/OneClickInstallUrlHandler
-/sbin/OneClickInstallCLI
-/sbin/OCICLI
-%{_sbindir}/OneClickInstallUI
-%{_sbindir}/OneClickInstallUrlHandler
-%{_sbindir}/OneClickInstallCLI
-%{_sbindir}/OCICLI
-
-%dir %{yast_clientdir}
-%{yast_clientdir}/*.rb
-%dir %{yast_moduledir}
-%{yast_moduledir}/*.rb
-%{yast_moduledir}/*.pm
 %license COPYING
-%if %suse_version <= 1020
-/opt/kde3
-%endif
-%{_datadir}/mime/packages/*.xml
-%{_datadir}/applications/yast2-metapackage-handler*.desktop
+%{_bindir}/
+%{yast_clientdir}
+%{yast_moduledir}
+%{yast_icondir}
+%{_datadir}/mime/packages/
+%{_datadir}/applications/
 
 %changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/schema/README 
new/yast2-metapackage-handler-4.1.1/schema/README
--- old/yast2-metapackage-handler-4.1.0/schema/README   2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/README   1970-01-01 
01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-Schemas for http://en.opensuse.org/Standards/One_Click_Install
-rewritten in Relax NG. 
-
-Conversion:
-
-trang oneclick.rnc oneclick.rng
-trang oneclick.rnc oneclick.xsd
-
-Validation:
-
-xmllint --noout --relaxng oneclick.rng foo.xml
-jing -c oneclick.rnc foo.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/schema/README.md 
new/yast2-metapackage-handler-4.1.1/schema/README.md
--- old/yast2-metapackage-handler-4.1.0/schema/README.md        1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/README.md        2019-11-18 
15:22:22.000000000 +0100
@@ -0,0 +1,25 @@
+## One Click Install Specification
+
+Get an overview 
[here](https://en.opensuse.org/openSUSE:One_Click_Install_Developer).
+XML schema definition is documented 
[here](https://en.opensuse.org/openSUSE:One_Click_Install_specification).
+
+The YMP files look a bit different depending on whether they were created for 
a package or a pattern. Here are two examples:
+
+- [sample_from_package.ymp](sample_from_package.ymp)
+- [sample_from_pattern.ymp](sample_from_pattern.ymp)
+
+### Schema Conversion
+
+```sh
+trang oneclick.rnc oneclick.rng
+trang oneclick.rnc oneclick.xsd
+```
+
+### XML Validation
+
+Use one of these commands:
+
+```sh
+xmllint --noout --relaxng oneclick.rng foo.xml
+jing -c oneclick.rnc foo.xml
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/schema/foo.xml 
new/yast2-metapackage-handler-4.1.1/schema/foo.xml
--- old/yast2-metapackage-handler-4.1.0/schema/foo.xml  2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/foo.xml  1970-01-01 
01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-<?xml version='1.0'?>
-<metapackage xmlns:os="http://opensuse.org/Standards/One_Click_Install"; 
xmlns="http://opensuse.org/Standards/One_Click_Install";>
-       <group distversion="openSUSE Factory">
-               <repositories> 
-                       <repository recommended="true" format="yast">
-                               <name>Main Repository</name>
-                               <summary>This is the main openSUSE 
catalogue</summary>
-                               <summary lang="en_US">This is the main openSUSE 
catalog</summary>
-                               <description>This is the main openSUSE package 
repository containing blah blah blah</description>
-                               <description lang="de">Insert German 
Here</description>
-                               
<url>http://download.opensuse.org/distribution/SL-OSS-factory/inst-source</url>
-                               <url score="5" 
location="ie">http://ftp.heanet.ie/mirrors/ftp.opensuse.org/opensuse/distribution/SL-OSS-factory/inst-source</url>
-                       </repository>
-                       <repository recommended="false">
-                               <name>Some Other Repo</name>
-                               <summary>Blah Blah</summary>
-                               <description>blah blah blah</description>
-                               <url>http://example.com</url>
-                       </repository>
-               </repositories>
-               <products>
-                       <product>
-                               <name>MyFavouritePackage</name>
-                               <summary>This is my favourite package</summary>
-                               <summary lang="en_US">This is my favorite 
package</summary>
-                               <description>Blah blah blah</description>
-                       </product>
-                       <product type="pattern">
-                               <name>SomePattern</name>
-                               <summary>Demo other resolveable</summary>
-                               <description>Blah blah blah</description>
-                       </product>
-               </products>
-       </group>
-       <group distversion="openSUSE 10.2">
-               <repositories>
-                       <repository>
-                               <name>Main Repository</name>
-                               <summary>This is the main openSUSE 
catalogue</summary>
-                               <description>This is the main openSUSE package 
repository containing blah blah blah</description>
-                               
<url>http://ftp.heanet.ie/mirrors/ftp.opensuse.org/opensuse/distribution/10.2/repo/oss/</url>
-                       </repository>
-               </repositories>
-               <products>
-                       <product>
-                               <name>MyFavouritePackage</name>
-                               <summary>This is my favourite package</summary>
-                               <summary lang="en_US">This is my favorite 
package</summary>
-                               <description>Blah blah blah</description>
-                       </product>
-               </products>
-       </group>
-</metapackage>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/schema/oneclick.rnc 
new/yast2-metapackage-handler-4.1.1/schema/oneclick.rnc
--- old/yast2-metapackage-handler-4.1.0/schema/oneclick.rnc     2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/oneclick.rnc     2019-11-18 
15:22:22.000000000 +0100
@@ -1,13 +1,13 @@
 default namespace = "http://opensuse.org/Standards/One_Click_Install";
 
-product = (
+item = (
   element name {string},
   element summary {translateablestring} +,
   element description {translateablestring} +,
-  attribute type {string} ?,               # DEFAULT package
-  attribute recommended {xsd:boolean} ?,    # DEFAULT true
-  attribute architectures {string} ?,      # DEFAULT all
-  attribute action {string} ?              # DEFAULT install
+  attribute type { "package" | "pattern" } ?,  # DEFAULT package
+  attribute recommended {xsd:boolean} ?,       # DEFAULT true
+  attribute architectures {string} ?,          # DEFAULT all
+  attribute action { "install" | "remove" } ?  # DEFAULT install
 )
 
 repository = (
@@ -15,9 +15,9 @@
   element summary {translateablestring} +,
   element description {translateablestring} +,
   element url {mirrorableURL} +,
-  attribute recommended {xsd:boolean} ?,    # DEFAULT true
-  attribute format {string} ?,             # DEFAULT auto
-  attribute producturi {string} ?          # DEFAULT /
+  attribute recommended {xsd:boolean} ?,       # DEFAULT true
+  attribute format {string} ?,                 # DEFAULT auto
+  attribute producturi {string} ?              # DEFAULT /
 )
 
 translateablestring = (
@@ -26,20 +26,24 @@
 )
 
 mirrorableURL = (
-  attribute score {xsd:integer} ?,         # DEFAULT 10
+  attribute score {xsd:integer} ?,             # DEFAULT 10
   attribute location {string} ?,
   string
 )
 
 group = (
+  element name {string} ?,
+  element summary {translateablestring} ?,
+  element description {translateablestring} ?,
+  element remainsubscribed {xsd:boolean} ?,
   element repositories {
     element repository { repository } *
   },
-  element products {
-    element product { product } *
+  element software {
+    element item { item } *
   },
-  attribute recommended {xsd:boolean} ?,    # DEFAULT true
-  attribute distversion {string}
+  attribute recommended {xsd:boolean} ?,       # DEFAULT true
+  attribute distversion {string} ?
 )
 
 start =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/schema/oneclick.rng 
new/yast2-metapackage-handler-4.1.1/schema/oneclick.rng
--- old/yast2-metapackage-handler-4.1.0/schema/oneclick.rng     2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/oneclick.rng     2019-11-18 
15:22:22.000000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <grammar ns="http://opensuse.org/Standards/One_Click_Install"; 
xmlns="http://relaxng.org/ns/structure/1.0"; 
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";>
-  <define name="product">
+  <define name="item">
     <group>
       <element name="name">
         <data type="string" datatypeLibrary=""/>
@@ -17,7 +17,10 @@
       </oneOrMore>
       <optional>
         <attribute name="type">
-          <data type="string" datatypeLibrary=""/>
+          <choice>
+            <value>package</value>
+            <value>pattern</value>
+          </choice>
         </attribute>
       </optional>
       <optional>
@@ -35,7 +38,10 @@
       <optional>
         <!-- DEFAULT all -->
         <attribute name="action">
-          <data type="string" datatypeLibrary=""/>
+          <choice>
+            <value>install</value>
+            <value>remove</value>
+          </choice>
         </attribute>
       </optional>
     </group>
@@ -104,6 +110,26 @@
     <data type="string" datatypeLibrary=""/>
   </define>
   <define name="group">
+    <optional>
+      <element name="name">
+        <data type="string" datatypeLibrary=""/>
+      </element>
+    </optional>
+    <optional>
+      <element name="summary">
+        <ref name="translateablestring"/>
+      </element>
+    </optional>
+    <optional>
+      <element name="description">
+        <ref name="translateablestring"/>
+      </element>
+    </optional>
+    <optional>
+      <element name="remainsubscribed">
+        <data type="boolean"/>
+      </element>
+    </optional>
     <element name="repositories">
       <zeroOrMore>
         <element name="repository">
@@ -111,10 +137,10 @@
         </element>
       </zeroOrMore>
     </element>
-    <element name="products">
+    <element name="software">
       <zeroOrMore>
-        <element name="product">
-          <ref name="product"/>
+        <element name="item">
+          <ref name="item"/>
         </element>
       </zeroOrMore>
     </element>
@@ -123,10 +149,12 @@
         <data type="boolean"/>
       </attribute>
     </optional>
-    <!-- DEFAULT true -->
-    <attribute name="distversion">
-      <data type="string" datatypeLibrary=""/>
-    </attribute>
+    <optional>
+      <!-- DEFAULT true -->
+      <attribute name="distversion">
+        <data type="string" datatypeLibrary=""/>
+      </attribute>
+    </optional>
   </define>
   <start>
     <element name="metapackage">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/schema/oneclick.xsd 
new/yast2-metapackage-handler-4.1.1/schema/oneclick.xsd
--- old/yast2-metapackage-handler-4.1.0/schema/oneclick.xsd     2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/oneclick.xsd     2019-11-18 
15:22:22.000000000 +0100
@@ -1,15 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified" 
targetNamespace="http://opensuse.org/Standards/One_Click_Install"; 
xmlns:o="http://opensuse.org/Standards/One_Click_Install";>
-  <xs:complexType name="product">
+  <xs:complexType name="item">
     <xs:sequence>
       <xs:element ref="o:name"/>
       <xs:element maxOccurs="unbounded" ref="o:summary"/>
       <xs:element maxOccurs="unbounded" ref="o:description"/>
     </xs:sequence>
-    <xs:attribute name="type" type="xs:string"/>
+    <xs:attribute name="type">
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="package"/>
+          <xs:enumeration value="pattern"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
     <xs:attribute name="recommended" type="xs:boolean"/>
     <xs:attribute name="architectures" type="xs:string"/>
-    <xs:attribute name="action" type="xs:string"/>
+    <xs:attribute name="action">
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="install"/>
+          <xs:enumeration value="remove"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
   </xs:complexType>
   <xs:element name="name" type="xs:string"/>
   <xs:element name="summary" type="o:translateablestring"/>
@@ -43,12 +57,17 @@
   </xs:complexType>
   <xs:complexType name="group">
     <xs:sequence>
+      <xs:element minOccurs="0" ref="o:name"/>
+      <xs:element minOccurs="0" ref="o:summary"/>
+      <xs:element minOccurs="0" ref="o:description"/>
+      <xs:element minOccurs="0" ref="o:remainsubscribed"/>
       <xs:element ref="o:repositories"/>
-      <xs:element ref="o:products"/>
+      <xs:element ref="o:software"/>
     </xs:sequence>
     <xs:attribute name="recommended" type="xs:boolean"/>
-    <xs:attribute name="distversion" use="required" type="xs:string"/>
+    <xs:attribute name="distversion" type="xs:string"/>
   </xs:complexType>
+  <xs:element name="remainsubscribed" type="xs:boolean"/>
   <xs:element name="repositories">
     <xs:complexType>
       <xs:sequence>
@@ -57,14 +76,14 @@
     </xs:complexType>
   </xs:element>
   <xs:element name="repository" type="o:repository"/>
-  <xs:element name="products">
+  <xs:element name="software">
     <xs:complexType>
       <xs:sequence>
-        <xs:element minOccurs="0" maxOccurs="unbounded" ref="o:product"/>
+        <xs:element minOccurs="0" maxOccurs="unbounded" ref="o:item"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
-  <xs:element name="product" type="o:product"/>
+  <xs:element name="item" type="o:item"/>
   <xs:element name="metapackage">
     <xs:complexType>
       <xs:sequence>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/schema/sample_from_package.ymp 
new/yast2-metapackage-handler-4.1.1/schema/sample_from_package.ymp
--- old/yast2-metapackage-handler-4.1.0/schema/sample_from_package.ymp  
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/sample_from_package.ymp  
2019-11-18 15:22:22.000000000 +0100
@@ -0,0 +1,82 @@
+<metapackage xmlns:os="http://opensuse.org/Standards/One_Click_Install"; 
xmlns="http://opensuse.org/Standards/One_Click_Install";>
+  <group distversion="openSUSE Tumbleweed">
+    <repositories>
+      <repository recommended="true">
+        <name>home:snwint:ports</name>
+        <summary>The latest package versions for all</summary>
+        <description>
+    Make latest package versions available to other distributions.
+  </description>
+        
<url>http://download.opensuse.org/repositories/home:/snwint:/ports/openSUSE_Factory/</url>
+      </repository>
+      <repository recommended="true">
+        <name>openSUSE:Factory</name>
+        <summary>The next openSUSE distribution</summary>
+        <description>Any user who wishes to have the newest packages that 
include, but are not limited to, the Linux kernel, SAMBA, git, desktops, office 
applications and many other packages, will want Tumbleweed. Tumbleweed appeals 
to Power Users, Software Developers and openSUSE Contributors. If you require 
the latest software stacks and Integrated Development Environment or need a 
stable platform closest to bleeding edge Linux, Tumbleweed is the best choice 
for you.
+
+Staging dashboard is located at: 
https://build.opensuse.org/project/dashboard/openSUSE:Factory
+
+List of known devel projects: 
https://build.opensuse.org/package/view_file/openSUSE:Factory:Staging/dashboard/devel_projects
+
+Have a look at http://en.opensuse.org/Portal:Factory for more 
details.</description>
+        
<url>http://download.opensuse.org/repositories/openSUSE:/Factory/snapshot/</url>
+      </repository>
+      <repository recommended="true">
+        <name>openSUSE:Tumbleweed</name>
+        <summary>Tumbleweed</summary>
+        <description>Tumbleweed is the openSUSE Rolling Release
+
+This OBS Project represents the content of the currently published
+snapshot. The newer repository for next publish can be found in 
openSUSE:Factory standard repository.
+</description>
+        
<url>http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/</url>
+      </repository>
+      <repository recommended="false">
+        <name>openSUSE:Factory</name>
+        <summary>The next openSUSE distribution</summary>
+        <description>Any user who wishes to have the newest packages that 
include, but are not limited to, the Linux kernel, SAMBA, git, desktops, office 
applications and many other packages, will want Tumbleweed. Tumbleweed appeals 
to Power Users, Software Developers and openSUSE Contributors. If you require 
the latest software stacks and Integrated Development Environment or need a 
stable platform closest to bleeding edge Linux, Tumbleweed is the best choice 
for you.
+
+Staging dashboard is located at: 
https://build.opensuse.org/project/dashboard/openSUSE:Factory
+
+List of known devel projects: 
https://build.opensuse.org/package/view_file/openSUSE:Factory:Staging/dashboard/devel_projects
+
+Have a look at http://en.opensuse.org/Portal:Factory for more 
details.</description>
+        
<url>http://download.opensuse.org/repositories/openSUSE:/Factory/ports/</url>
+      </repository>
+    </repositories>
+    <software>
+      <item>
+        <name>mkdud</name>
+        <summary>Create driver update from rpms</summary>
+        <description>Create a driver update from rpms.
+
+Authors:
+--------
+    Steffen Winterfeldt</description>
+      </item>
+    </software>
+  </group>
+  <group distversion="openSUSE Leap 15.1">
+    <repositories>
+      <repository recommended="true">
+        <name>openSUSE:Leap:15.1:Update</name>
+        <summary>Online updates for openSUSE Leap:15.1</summary>
+        <description>This project is releasing the official updates for 
openSUSE Leap:15.1.</description>
+        <url>http://download.opensuse.org/update/leap/15.1/oss/</url>
+      </repository>
+      <repository recommended="false">
+        <name>openSUSE:Leap:15.1</name>
+        <summary>openSUSE Leap 15.1</summary>
+        <description></description>
+        
<url>http://download.opensuse.org/distribution/leap/15.1/repo/oss/</url>
+      </repository>
+    </repositories>
+    <software>
+      <item>
+        <name>mkdud</name>
+        <summary>The mkdud package</summary>
+        <description>The mkdud package</description>
+      </item>
+    </software>
+  </group>
+</metapackage>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/schema/sample_from_pattern.ymp 
new/yast2-metapackage-handler-4.1.1/schema/sample_from_pattern.ymp
--- old/yast2-metapackage-handler-4.1.0/schema/sample_from_pattern.ymp  
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/schema/sample_from_pattern.ymp  
2019-11-18 15:22:22.000000000 +0100
@@ -0,0 +1,71 @@
+<metapackage xmlns:os="http://opensuse.org/Standards/One_Click_Install"; 
xmlns="http://opensuse.org/Standards/One_Click_Install";>
+  <group distversion="openSUSE Tumbleweed">
+    <name>OBS_Server</name>
+    <summary>Open Build Service Server</summary>
+    <description>The Open Build Service is an enviroment to allow
+automated package building. The official server from the openSUSE project
+is reachable at http://build.opensuse.org .
+
+This software stack contains a complete server to be installed on your system.
+It is by default configured to reuse all resources from the instance at the
+openSUSE.org project.
+
+Please read /usr/share/doc/packages/obs-api/README.SETUP after 
installation.</description>
+    <repositories>
+      <repository recommended="true">
+        <name>OBS:Server:Unstable</name>
+        <summary>Developer versions of the Open Build Service Server</summary>
+        <description>These are the developer versions of the tools for the 
Open Build Service project. They are mainly used by the openSUSE instance.
+
+Please use OBS:Server:2.9 for production environments unless told 
otherwise.</description>
+        
<url>http://download.opensuse.org/repositories/OBS:/Server:/Unstable/openSUSE_Factory/</url>
+      </repository>
+      <repository recommended="false">
+        <name>openSUSE:Factory</name>
+        <summary>The next openSUSE distribution</summary>
+        <description>Any user who wishes to have the newest packages that 
include, but are not limited to, the Linux kernel, SAMBA, git, desktops, office 
applications and many other packages, will want Tumbleweed. Tumbleweed appeals 
to Power Users, Software Developers and openSUSE Contributors. If you require 
the latest software stacks and Integrated Development Environment or need a 
stable platform closest to bleeding edge Linux, Tumbleweed is the best choice 
for you.
+
+Staging dashboard is located at: 
https://build.opensuse.org/project/dashboard/openSUSE:Factory
+
+List of known devel projects: 
https://build.opensuse.org/package/view_file/openSUSE:Factory:Staging/dashboard/devel_projects
+
+Have a look at http://en.opensuse.org/Portal:Factory for more 
details.</description>
+        <url>http://download.opensuse.org/tumbleweed/repo/oss/</url>
+      </repository>
+    </repositories>
+    <software>
+      <item>
+        <name>obs-server</name>
+        <summary>The Open Build Service -- Server Component</summary>
+        <description>The Open Build Service (OBS) backend is used to store all 
sources and binaries. It also
+calculates the need for new build jobs and distributes it.</description>
+      </item>
+      <item>
+        <name>obs-worker</name>
+        <summary>The Open Build Service -- Build Host Component</summary>
+        <description>This is the obs build host, to be installed on each 
machine building
+packages in this obs installation.  Install it alongside obs-server to
+run a local playground test installation.</description>
+      </item>
+      <item>
+        <name>obs-api</name>
+        <summary>The Open Build Service -- The API and WEBUI</summary>
+        <description>This is the API server instance, and the web client for 
the
+OBS.</description>
+      </item>
+      <item>
+        <name>obs-signd</name>
+        <summary>The sign daemon</summary>
+        <description>The openSUSE Build Service sign client and daemon.
+
+This daemon can be used to sign anything via gpg, but it speaks with a remote 
server
+to avoid the need to host the private key on the same server.</description>
+      </item>
+      <item>
+        <name>obs-source_service</name>
+        <summary>The obs-source_service package</summary>
+        <description>The obs-source_service package.</description>
+      </item>
+    </software>
+  </group>
+</metapackage>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/src/Makefile.am 
new/yast2-metapackage-handler-4.1.1/src/Makefile.am
--- old/yast2-metapackage-handler-4.1.0/src/Makefile.am 2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/src/Makefile.am 1970-01-01 
01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-# Sources for metapackage
-
-module_DATA = \
-  modules/UserSettings.rb \
-  modules/OneClickInstallWidgets.rb \
-  modules/OneClickInstall.rb \
-  modules/OneClickInstallWorkerResponse.rb \
-  modules/OneClickInstallWorkerFunctions.rb \
-  modules/YPX.pm
-
-client_DATA = \
-  clients/OneClickInstallWorker.rb \
-  clients/OneClickInstallUrlHandler.rb \
-  clients/OneClickInstallCLI.rb \
-  clients/OneClickInstallUI.rb
-
-EXTRA_DIST = $(module_DATA) $(client_DATA)
-
-include $(top_srcdir)/Makefile.am.common
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/src/icons/hicolor/scalable/apps/yast-oneclick.svg
 
new/yast2-metapackage-handler-4.1.1/src/icons/hicolor/scalable/apps/yast-oneclick.svg
--- 
old/yast2-metapackage-handler-4.1.0/src/icons/hicolor/scalable/apps/yast-oneclick.svg
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-metapackage-handler-4.1.1/src/icons/hicolor/scalable/apps/yast-oneclick.svg
       2019-11-18 15:22:22.000000000 +0100
@@ -0,0 +1,23 @@
+<svg xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; width="128px" height="128px">
+<defs>
+<linearGradient id="lg1"> <stop stop-color="#c0bfbc" offset="0" /> <stop 
stop-color="#aeada9" offset="1" />
+</linearGradient>
+<linearGradient id="lg2"> <stop stop-color="#dcdbd8" offset="0" /> <stop 
offset="0.03816106" stop-color="#f6f5f4" /> <stop stop-color="#dcdbd8" 
offset="0.07692308" /> <stop offset="0.92307693" stop-color="#dcdbd8" /> <stop 
offset="0.96153849" stop-color="#f6f5f4" /> <stop stop-color="#dcdbd8" 
offset="1" />
+</linearGradient>
+<linearGradient id="lg3"> <stop stop-color="#f5f4f3" offset="0" /> <stop 
stop-color="#d7d3ce" offset="1" />
+</linearGradient>
+<linearGradient id="lg4"> <stop stop-color="#ffffff" stop-opacity="0" 
offset="0" /> <stop stop-color="#ffffff" offset="1" />
+</linearGradient>
+<linearGradient gradientTransform="translate(0,-257.94489)" xlink:href="#lg4" 
id="lg5" x1="20" y1="279.94489" x2="20" y2="339.94489" 
gradientUnits="userSpaceOnUse" />
+<linearGradient xlink:href="#lg3" id="lg6" x1="40" y1="112" x2="40" y2="116" 
gradientUnits="userSpaceOnUse" />
+<linearGradient gradientTransform="translate(0,-257.94489)" xlink:href="#lg2" 
id="lg7" x1="12" y1="317.94488" x2="116" y2="317.94488" 
gradientUnits="userSpaceOnUse" />
+<linearGradient gradientTransform="translate(0,-257.94489)" xlink:href="#lg1" 
id="lg8" x1="52" y1="369.94489" x2="52" y2="361.94489" 
gradientUnits="userSpaceOnUse" />
+</defs>
+<path fill="url(#lg6)" d="m 44,112 c -2.216,0 -4,1.784 -4,4 h 48 c 0,-2.216 
-1.784,-4 -4,-4 z" />
+<path fill="url(#lg8)" d="m 52,112 1,-12 h 22 l 1,12 z" />
+<rect fill="url(#lg7)" width="104" height="88" x="12" y="16" ry="8" />
+<rect fill="#f6f5f4" width="104" height="88" x="12" y="12" ry="8" />
+<rect fill="#241f31" width="96" height="72" x="16" y="16" ry="4" />
+<path fill="#57e389" d="M 64 28 L 50 42 L 54 46 L 60 40 L 60 62.34375 L 
54.828125 57.171875 A 4.0004 4.0004 0 0 0 51.958984 55.958984 A 4.0004 4.0004 0 
0 0 51.419922 56 L 48 56 L 48 59.423828 A 4.0004 4.0004 0 0 0 49.171875 
62.828125 L 64 77.65625 L 78.828125 62.828125 A 4.0004 4.0004 0 0 0 80 
59.289062 L 80 56 L 76.728516 56 A 4.0004 4.0004 0 0 0 73.171875 57.171875 L 68 
62.34375 L 68 28 L 64 28 z " />
+<rect fill="url(#lg5)" opacity="0.1" width="84" height="60" x="22" y="22" 
ry="0" />
+</svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/src/icons/hicolor/symbolic/apps/yast-oneclick-symbolic.svg
 
new/yast2-metapackage-handler-4.1.1/src/icons/hicolor/symbolic/apps/yast-oneclick-symbolic.svg
--- 
old/yast2-metapackage-handler-4.1.0/src/icons/hicolor/symbolic/apps/yast-oneclick-symbolic.svg
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-metapackage-handler-4.1.1/src/icons/hicolor/symbolic/apps/yast-oneclick-symbolic.svg
      2019-11-18 15:22:22.000000000 +0100
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="16" height="16" viewBox="0 0 16 
16">
+<path d="M 2,0 C 0.892,0 0,0.892 0,2 v 9 c 0,1.108 0.892,2 2,2 h 8 V 11 H 2 V 
2 h 12 v 8 h 2 V 2 C 16,0.892 15.108,0 14,0 Z m 6,3 -2,2 0.00195,0.00195 L 7,5 
C 7.00196,5.5878937 7,6 7,6.5859375 L 6.7070312,6.2929688 C 6.5187601,6.0994361 
6.2700017,6.0000157 6,6 5.0097656,6.0097656 6,6 5,6 v 0.8632812 c 
-0.040332,0.3116587 0.068172,0.6241499 0.2929688,0.84375 L 8,10.414062 
10.707031,7.7070312 C 10.945163,7.4779976 11.05481,7.146133 11,6.8203125 V 6 C 
10,6 11,6 10,6 9.7362287,6.00624 9.4758426,6.1027811 9.2929688,6.2929688 L 
9,6.5859375 V 3 Z m 3,8 v 5 h 5 v -5 z m 1,1 h 1 v 1 h 1 v -1 h 1 v 2 h -1 v 1 
h -1 v -1 h -1 z m -6,2 c -1.108,0 -2,0.892 -2,2 h 6 v -2 z" />
+</svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-metapackage-handler-4.1.0/src/modules/OneClickInstall.rb 
new/yast2-metapackage-handler-4.1.1/src/modules/OneClickInstall.rb
--- old/yast2-metapackage-handler-4.1.0/src/modules/OneClickInstall.rb  
2019-02-27 17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/src/modules/OneClickInstall.rb  
2019-11-18 15:22:22.000000000 +0100
@@ -1,9 +1,12 @@
 # encoding: utf-8
 
 require "yast"
+require "rexml/document"
 
 module Yast
   class OneClickInstallClass < Module
+    include Yast::Logger
+
     def main
       # Module to provide simple API for working with the One Click Install 
metapackages.
       # Enables removal of non-UI logic from UI module.
@@ -14,8 +17,6 @@
       Yast.import "Product"
       Yast.import "Language"
 
-      Yast.import "YPX"
-
       #        repositories =
       #                $[ url =>
       #                        $[
@@ -53,339 +54,151 @@
       @description = ""
     end
 
-    #   *
-    #   * Load the Metapackage from the URL supplied for further processing.
-    #   * Converts from original form into a simple two lists, one of 
repositories, other of software.
-    #   * Uses the Product.ycp to obtain the correct version for our product.
-    #   * Uses the Language.ycp to obtain correct strings for our language.
-    #   *
-    #   * Picks the strings, mirror, and product at evaluation time.
-    #
-    #   * N.B. This must be called before any of the rest of the methods.
-    #   *
-    #   * Internally the following format is used:
-    #   *      repositories =
-    #   *              $[ url =>
-    #   *                      $[
-    #   *                              name,
-    #   *                              summary,
-    #   *                              description,
-    #   *                              recommended
-    #   *                      ]
-    #   *
-    #   *              ]
-    #   *
-    #   *      software =
-    #   *              $[ name =>
-    #   *                      $[
-    #   *                              summary,
-    #   *                              description,
-    #   *                              action,
-    #   *                              type,
-    #   *                              recommended
-    #   *                      ]
-    #   *              ]
-    #   * @param url The file to load the xml from.
-    #  *
-    def Load(url)
-      #Load the XML from file.
-      xml = YPX.Load(url)
-      #Load returns false on error
-      return if xml == false
-
-      #Try and load the name.
-      @name = YPX.SelectValue(
-        xml,
-        Ops.add(
-          Ops.add("/metapackage/group[@distversion='", Product.name),
-          "']/name"
-        )
-      )
-      if @name == ""
-        @name = YPX.SelectValue(
-          xml,
-          "/metapackage/group[not(@distversion)]/name"
-        )
-      end
+    # Load the Metapackage data from the YML file supplied for further 
processing.
+    #
+    # Convert data into two hashes, one for repositories, one for software.
+    # Use the Product.rb to obtain the correct version for our product.
+    # Use the Language.rb to obtain correct strings for our language.
+    #
+    # Pick the strings, mirror, and product at evaluation time.
+    #
+    # Note: This must be called before any of the rest of the methods.
+    #
+    # @param [String] file XML file with meta data.
+    #
+    def Load(file)
+      distversion = Product.name
+      lang = Language.language
 
-      rs = YPX.SelectValue(
-        xml,
-        Ops.add(
-          Ops.add("/metapackage/group[@distversion='", Product.name),
-          "']/remainSubscribed"
-        )
-      )
-      if rs == ""
-        rs = YPX.SelectValue(
-          xml,
-          "/metapackage/group[not(@distversion)]/remainSubscribed"
-        )
-      end
-      if rs == "false"
-        @remainSubscribed = false
-      else
-        @remainSubscribed = true
-      end
+      xml = xml_from_file(file)
 
+      log.info "distversion = #{distversion}, lang = #{lang}"
 
-      #Try and load the summary.
-      @summary = YPX.SelectValue(
-        xml,
-        Ops.add(
-          Ops.add(
-            Ops.add(
-              Ops.add("/metapackage/group[@distversion='", Product.name),
-              "']/summary[@lang='"
-            ),
-            Language.language
-          ),
-          "']"
-        )
-      )
-      if @summary == ""
-        @summary = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add("/metapackage/group[@distversion='", Product.name),
-            "']/summary[not(@lang)]"
-          )
-        )
-      end
-      if @summary == ""
-        @summary = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              "/metapackage/group[not(@distversion)]/summary[@lang='",
-              Language.language
-            ),
-            "']"
-          )
-        )
-      end
-      if @summary == ""
-        @summary = YPX.SelectValue(
-          xml,
-          "/metapackage/group[not(@distversion)]/summary[not(@lang)]"
-        )
-      end
+      group = xpath_element(xml, "/metapackage/group", distversion: 
distversion)
 
-      #Try and load the description.
-      @description = YPX.SelectValue(
-        xml,
-        Ops.add(
-          Ops.add(
-            Ops.add(
-              Ops.add("/metapackage/group[@distversion='", Product.name),
-              "']/description[@lang='"
-            ),
-            Language.language
-          ),
-          "']"
-        )
-      )
-      if @description == ""
-        @description = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add("/metapackage/group[@distversion='", Product.name),
-            "']/description[not(@lang)]"
-          )
-        )
-      end
-      if @description == ""
-        @description = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              "/metapackage/group[not(@distversion)]/description[@lang='",
-              Language.language
-            ),
-            "']"
-          )
-        )
-      end
-      if @description == ""
-        @description = YPX.SelectValue(
-          xml,
-          "/metapackage/group[not(@distversion)]/description[not(@lang)]"
-        )
-      end
+      return if !group
 
-      #Load the repository details into our internal format from xml.
-      #We want to load details for our specific version.
-      _REPO_XPATH = Ops.add(
-        Ops.add("/metapackage/group[@distversion='", Product.name),
-        "']/repositories/repository"
-      )
-      #If that fails, use any.
-      _FALLBACK_REPO_XPATH = 
"/metapackage/group[not(@distversion)]/repositories/repository"
-
-
-      #Select the repository URLs from the XML.
-      repoURLs = YPX.SelectValues(xml, Ops.add(_REPO_XPATH, "/url"))
-      #If we didn't have any try fallback xpath.
-      if Builtins.size(repoURLs) == 0
-        _REPO_XPATH = _FALLBACK_REPO_XPATH
-        repoURLs = YPX.SelectValues(xml, Ops.add(_REPO_XPATH, "/url"))
-      end
-      #Loop through the repo URLs and query the other details from the XML.
-      Builtins.foreach(repoURLs) do |url2|
-        #Construct xpath to query details of this specific repository
-        _THIS_REPO_XPATH = Ops.add(
-          Ops.add(Ops.add(_REPO_XPATH, "[url='"), url2),
-          "']/"
-        )
-        recommended = YPX.SelectValue(
-          xml,
-          Ops.add(_THIS_REPO_XPATH, "@recommended")
-        )
-        #If recommended not specified we default to true.
-        recommended = "true" if recommended != "false"
-        #Get the name in our language
-        name = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              Ops.add(_THIS_REPO_XPATH, "name[@lang='"),
-              Language.language
-            ),
-            "']"
-          )
-        )
-        #If that failed, try without a language
-        if name == ""
-          name = YPX.SelectValue(
-            xml,
-            Ops.add(_THIS_REPO_XPATH, "name[not(@lang)]")
-          )
-        end
-        #Find the summary of this repository, in our language.
-        summary = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              Ops.add(_THIS_REPO_XPATH, "summary[@lang='"),
-              Language.language
-            ),
-            "']"
-          )
-        )
-        #If that failed, try without a language.
-        if summary == ""
-          summary = YPX.SelectValue(
-            xml,
-            Ops.add(_THIS_REPO_XPATH, "summary[not(@lang)]")
-          )
-        end
-        #Find the description of this repository, in our language.
-        description = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              Ops.add(_THIS_REPO_XPATH, "description[@lang='"),
-              Language.language
-            ),
-            "']"
-          )
-        )
-        #If that failed, try without a language.
-        if description == ""
-          description = YPX.SelectValue(
-            xml,
-            Ops.add(_THIS_REPO_XPATH, "description[not(@lang)]")
-          )
-        end
-        #Store this repository details in our list.
-        repoDetails = {
-          "name"        => name,
-          "summary"     => summary,
-          "description" => description,
-          "recommended" => recommended
+      log.info "distversion in YMP = #{group.attributes['distversion']}"
+
+      # pick name, summary, description from group element, if any, else from 
first package
+      @name = xpath_text(group, "name") ||
+              xpath_text(group, "software/item/name") || ""
+
+      @summary = xpath_text(group, "summary", lang: lang) ||
+                 xpath_text(group, "software/item/summary", lang: lang) || ""
+
+      @description = xpath_text(group, "description", lang: lang) ||
+                     xpath_text(group, "software/item/description", lang: 
lang) || ""
+
+      @remainSubscribed = xpath_text(group, "remainsubscribed") != "false"
+
+      log.info "name = #{@name}, remainSubscribed = #{@remainSubscribed}"
+      log.info "summary = #{@summary}"
+      log.info "description = #{@description}"
+
+      repos = xpath_match(group, "repositories/repository")
+
+      repos.each do |repo|
+        recommended = repo.attributes["recommended"] != "false"
+        url = xpath_text(repo, "url") || ""
+        name = xpath_text(repo, "name") || ""
+        summary = xpath_text(repo, "summary", lang: lang) || ""
+        description = xpath_text(repo, "description", lang: lang) || ""
+
+        @repositories[url] = {
+          "name" => name, "summary" => summary, "description" => description,
+          "recommended" => recommended.to_s
         }
-        @repositories = Builtins.add(@repositories, url2, repoDetails)
       end
 
-      #Load package names for this distversion.
-      _SOFTWARE_XPATH = Ops.add(
-        Ops.add("/metapackage/group[@distversion='", Product.name),
-        "']/software/item"
-      )
-      #Incase that isn't specified use any where distversion is not specified.
-      _FALLBACK_SOFTWARE_XPATH = 
"/metapackage/group[not(@distversion)]/software/item"
-      softwareNames = YPX.SelectValues(xml, Ops.add(_SOFTWARE_XPATH, "/name"))
-      #If we didn't have any try fallback xpath.
-      if Builtins.size(softwareNames) == 0
-        _SOFTWARE_XPATH = _FALLBACK_SOFTWARE_XPATH
-        softwareNames = YPX.SelectValues(xml, Ops.add(_SOFTWARE_XPATH, 
"/name"))
-      end
-      Builtins.foreach(softwareNames) do |name|
-        #Construct xpath to query details of this specific software.
-        _THIS_SOFTWARE_XPATH = Ops.add(
-          Ops.add(Ops.add(_SOFTWARE_XPATH, "[name='"), name),
-          "']/"
-        )
-        #Check whether it was recommended.
-        recommended = YPX.SelectValue(
-          xml,
-          Ops.add(_THIS_SOFTWARE_XPATH, "@recommended")
-        )
-        #If recommended not specified we default to true.
-        recommended = "true" if recommended != "false"
-        action = YPX.SelectValue(xml, Ops.add(_THIS_SOFTWARE_XPATH, "@action"))
-        #If action not specified we default to install.
-        action = "install" if action != "remove"
-        type = YPX.SelectValue(xml, Ops.add(_THIS_SOFTWARE_XPATH, "@type"))
-        #If action not specified we default to install.
-        type = "package" if type != "pattern"
-        #Find the summary for this software, preferably in our language.
-        summary = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              Ops.add(_THIS_SOFTWARE_XPATH, "summary[@lang='"),
-              Language.language
-            ),
-            "']"
-          )
-        )
-        if summary == ""
-          summary = YPX.SelectValue(
-            xml,
-            Ops.add(_THIS_SOFTWARE_XPATH, "summary[not(@lang)]")
-          )
-        end
-        #Find the description of this software, preferably in our language.
-        description = YPX.SelectValue(
-          xml,
-          Ops.add(
-            Ops.add(
-              Ops.add(_THIS_SOFTWARE_XPATH, "description[@lang='"),
-              Language.language
-            ),
-            "']"
-          )
-        )
-        if description == ""
-          description = YPX.SelectValue(
-            xml,
-            Ops.add(_THIS_SOFTWARE_XPATH, "description[not(@lang)]")
-          )
-        end
-        #Store these software details in our list.
-        softwareDetails = {
-          "summary"     => summary,
-          "description" => description,
-          "action"      => action,
-          "type"        => type,
-          "recommended" => recommended
+      log.info "repositories = #{@repositories}"
+
+      items = xpath_match(group, "software/item")
+
+      items.each do |item|
+        name = xpath_text(item, "name") || ""
+        summary = xpath_text(item, "summary", lang: lang) || ""
+        description = xpath_text(item, "description", lang: lang) || ""
+        recommended = item.attributes["recommended"] != "false"
+        action = item.attributes["action"] != "remove" ? "install" : "remove"
+        type = item.attributes["type"] != "pattern" ? "package" : "pattern"
+
+        @software[name] = {
+          "summary" => summary, "description" => description, "recommended" => 
recommended.to_s,
+          "action" => action, "type" => type
         }
-        @software = Builtins.add(@software, name, softwareDetails)
       end
 
+      log.info "software = #{@software}"
+
       nil
     end
 
+    # Parse XML file.
+    #
+    # @param [String] file
+    #
+    # @return [REXML::Document] XML data
+    #
+    def xml_from_file(file)
+      return REXML::Document.new(File.read(file))
+    rescue
+      return REXML::Document.new("")
+    end
+
+    # XPath match.
+    #
+    # @param [REXML::Document,REXML::Element] node
+    # @param [String] path
+    #
+    # @return [Array<REXML::Element>] matching elements
+    #
+    def xpath_match(node, path)
+      REXML::XPath.match(node, path)
+    end
+
+    # First matching element.
+    #
+    # This finds the first matching element. If an attribute is specified as
+    # last argument, it tries to find a match that also matches this
+    # attribute.
+    #
+    # If that finds no match, an element without that attribute is looked
+    # for.
+    #
+    # @example Find summary and prefer German translation
+    #    xpath_element(node, "summary", lang: de_DE)
+    #
+    # @param [REXML::Document,REXML::Element] node
+    # @param [String] path
+    # @param [Array<Hash>] attr
+    #
+    # @return [REXML::Element,nil] matching element or nil
+    #
+    def xpath_element(node, path, *attr)
+      return xpath_match(node, path).first if attr.empty?
+
+      key = attr.first.keys.first
+      val = attr.first[key]
+
+      xpath_match(node, "#{path}[@#{key}='#{val}']").first ||
+      xpath_match(node, "#{path}[not(@#{key})]").first
+    end
+
+    # Text field of first matching element.
+    #
+    # @see #xpath_element for a detailed description.
+    #
+    # @param [REXML::Document,REXML::Element] node
+    # @param [String] path
+    # @param [Array<Hash>] attr
+    #
+    # @return [String,nil] text of first matching element or nil
+    #
+    def xpath_text(node, path, *attr)
+      xpath_element(node, path, *attr)&.text
+    end
+
     # <region name="Repositories"> *
 
     # @return a list of the URLs of the repositories currently selected for 
addition.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-metapackage-handler-4.1.0/src/modules/YPX.pm 
new/yast2-metapackage-handler-4.1.1/src/modules/YPX.pm
--- old/yast2-metapackage-handler-4.1.0/src/modules/YPX.pm      2019-02-27 
17:28:39.000000000 +0100
+++ new/yast2-metapackage-handler-4.1.1/src/modules/YPX.pm      1970-01-01 
01:00:00.000000000 +0100
@@ -1,76 +0,0 @@
- #!/usr/bin/perl -w
-
-package YPX;
-
-#use Data::Dumper;
-use XML::XPath;
-use XML::XPath::XMLParser;
-use YaST::YCP;
-
-our %TYPEINFO;
-
-BEGIN { $TYPEINFO{Load} = ["function","any","string"]; }
-sub Load
-{
-       my $xml_result;
-       #try
-       eval
-       {
-               my ($package,$url) = @_;
-               $xml_result = XML::XPath->new(filename => $url);
-       };
-       #catch (Throwable t)
-       if ($@)
-       {
-               return YaST::YCP::Boolean(0);
-       };
-       return $xml_result;
-}
-
-BEGIN { $TYPEINFO{SelectValue} = ["function","string","any","string"]; }
-sub SelectValue
-{
-       my $xml_result;
-       #try
-       eval
-       {
-               my ($package,$xp,$xpath) = @_;
-               $xml_result = $xp->getNodeText($xpath)->value();
-       };
-       #catch (Throwable t)
-       if ($@)
-       {
-               return;
-       };
-       return $xml_result;
-}
-
-BEGIN { $TYPEINFO{SelectValues} = 
["function",["list","string"],"any","string"]; }
-sub SelectValues
-{
-       my $xml_result = [];
-       #try
-       eval
-       {
-               my ($package,$xp,$xpath) = @_;
-               my $nodes = $xp->findnodes($xpath);
-               foreach my $node ($nodes->get_nodelist) {
-                       push(@$xml_result,$node->string_value());
-               }
-       };
-       #catch (Throwable t)
-       if ($@)
-       {
-               return;
-       };
-       return $xml_result;
-}
-
-
-sub GotData
-{
-       my ($package,$data) = @_;
-       print $data;
-}
-1;
-


Reply via email to