Hello community,

here is the log from the commit of package yast2-pkg-bindings for 
openSUSE:Factory checked in at 2020-07-15 11:17:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pkg-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-pkg-bindings"

Wed Jul 15 11:17:09 2020 rev:210 rq:820680 version:4.2.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pkg-bindings/yast2-pkg-bindings.changes    
2020-03-01 21:27:14.536462415 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-pkg-bindings.new.3060/yast2-pkg-bindings.changes
  2020-07-15 11:19:11.997250937 +0200
@@ -1,0 +2,6 @@
+Fri Jul 10 09:24:53 CEST 2020 - [email protected]
+
+- Extensions to handle raw repository name (bsc#1172477)
+- 4.2.8
+
+-------------------------------------------------------------------

Old:
----
  yast2-pkg-bindings-4.2.7.tar.bz2

New:
----
  yast2-pkg-bindings-4.2.8.tar.bz2

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

Other differences:
------------------
++++++ yast2-pkg-bindings-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.YTuAHB/_old  2020-07-15 11:19:17.169256056 +0200
+++ /var/tmp/diff_new_pack.YTuAHB/_new  2020-07-15 11:19:17.173256060 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings-devel-doc
-Version:        4.2.7
+Version:        4.2.8
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-pkg-bindings-%{version}.tar.bz2

++++++ yast2-pkg-bindings.spec ++++++
--- /var/tmp/diff_new_pack.YTuAHB/_old  2020-07-15 11:19:17.193256079 +0200
+++ /var/tmp/diff_new_pack.YTuAHB/_new  2020-07-15 11:19:17.193256079 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings
-Version:        4.2.7
+Version:        4.2.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-pkg-bindings-4.2.7.tar.bz2 -> yast2-pkg-bindings-4.2.8.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/.travis.yml 
new/yast2-pkg-bindings-4.2.8/.travis.yml
--- old/yast2-pkg-bindings-4.2.7/.travis.yml    2020-02-26 10:10:21.000000000 
+0100
+++ new/yast2-pkg-bindings-4.2.8/.travis.yml    2020-07-13 13:17:22.000000000 
+0200
@@ -9,7 +9,7 @@
   # the "yast-travis-cpp" script is included in the base yastdevel/cpp image
   # see https://github.com/yast/docker-yast-cpp/blob/master/yast-travis-cpp
   # run additional smoke tests to check the basic functionality
-  - docker run -it yast-pkg-bindings-image bash -c "yast-travis-cpp && 
./smoke_test_prepare.sh && ./smoke_test_run.rb"
+  - docker run -it --privileged yast-pkg-bindings-image bash -c 
"yast-travis-cpp && ./smoke_test_prepare.sh && ./smoke_test_run.rb"
 
 after_success:
   - ./.surge.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/CONTRIBUTING.md 
new/yast2-pkg-bindings-4.2.8/CONTRIBUTING.md
--- old/yast2-pkg-bindings-4.2.7/CONTRIBUTING.md        2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/CONTRIBUTING.md        1970-01-01 
01:00:00.000000000 +0100
@@ -1,89 +0,0 @@
-YaST Contribution Guidelines
-============================
-
-YaST is an open source project and as such it welcomes all kinds of
-contributions. If you decide to contribute, please follow these guidelines to
-ensure the process is effective and pleasant both for you and the YaST 
maintainers.
-
-There are two main forms of contribution: reporting bugs and performing code
-changes.
-
-Bug Reports
------------
-
-If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
-or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
-registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
-if you don't have an account yet.)
-
-When creating a bug report, please follow our [bug reporting
-guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
-
-We can't guarantee that every bug will be fixed, but we'll try.
-
-Code Changes
-------------
-
-We welcome all kinds of code contributions, from simple bug fixes to 
significant
-refactorings and implementation of new features. However, before making any
-non-trivial contribution, get in touch with us first — this can prevent wasted
-effort on both sides. Also, have a look at our [development
-documentation](http://en.opensuse.org/openSUSE:YaST_development).
-
-To send us your code change, use GitHub pull requests. The workflow is as
-follows:
-
-  1. Fork the project.
-
-  2. Create a topic branch based on `master`.
-
-  3. Implement your change, including tests (if possible). Make sure you adhere
-     to the [Ruby style
-     guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
-
-  4. Update the package version (in `packages/*.spec`, usually by
-     `rake version:bump`) and add a new entry to the `package/*.changes` file
-     (by `osc vc package`).  
-     For bigger changes or changes which need longer discussion it is advised 
to
-     add this as a separate last commit so it can be easily updated when 
another
-     change is merged in the meantime.
-
-  5. Make sure your change didn't break anything by building the RPM package
-     (`rake osc:build`). The build process includes running the full testsuite.
-
-  6. Publish the branch and create a pull request.
-
-  7. YaST developers will review your change and possibly point out issues.
-     Adapt the code under their guidance until they are all resolved.
-
-  8. Finally, the pull request will get merged or rejected.
-
-See also [GitHub's guide on
-contributing](https://help.github.com/articles/fork-a-repo).
-
-If you want to do multiple unrelated changes, use separate branches and pull
-requests.
-
-### Commits
-
-Each commit in the pull request should do only one thing, which is clearly
-described by its commit message. Especially avoid mixing formatting changes and
-functional changes into one commit. When writing commit messages, adhere to
-[widely used
-conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
-
-If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
-you mention it in the commit message for cross-reference. Use format like
-bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
-autolinking](https://help.github.com/articles/github-flavored-markdown#references)
-and [openSUSE abbreviation
-reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations).
-
-Additional Information
-----------------------
-
-If you have any question, feel free to ask at the [development mailing
-list](http://lists.opensuse.org/yast-devel/) or at the
-[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode.
-We'll do our best to provide a timely and accurate answer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-4.2.7/package/yast2-pkg-bindings-devel-doc.spec 
new/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings-devel-doc.spec
--- old/yast2-pkg-bindings-4.2.7/package/yast2-pkg-bindings-devel-doc.spec      
2020-02-26 10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings-devel-doc.spec      
2020-07-13 13:17:22.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-pkg-bindings-devel-doc
-Version:        4.2.7
+Version:        4.2.8
 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.2.7/package/yast2-pkg-bindings.changes 
new/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.changes
--- old/yast2-pkg-bindings-4.2.7/package/yast2-pkg-bindings.changes     
2020-02-26 10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.changes     
2020-07-13 13:17:22.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Jul 10 09:24:53 CEST 2020 - [email protected]
+
+- Extensions to handle raw repository name (bsc#1172477)
+- 4.2.8
+
+-------------------------------------------------------------------
 Wed Feb 26 08:50:50 UTC 2020 - Josef Reidinger <[email protected]>
 
 - Fix SourceRestore when some service is defined (bsc#1163081)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-pkg-bindings-4.2.7/package/yast2-pkg-bindings.spec 
new/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.spec
--- old/yast2-pkg-bindings-4.2.7/package/yast2-pkg-bindings.spec        
2020-02-26 10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/package/yast2-pkg-bindings.spec        
2020-07-13 13:17:22.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-pkg-bindings
-Version:        4.2.7
+Version:        4.2.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -53,7 +53,6 @@
 
 rm -rf %{buildroot}/%{yast_plugindir}/libpy2Pkg.la
 
-
 %files
 %defattr(-,root,root)
 %{yast_plugindir}/libpy2Pkg.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/smoke_test_run.rb 
new/yast2-pkg-bindings-4.2.8/smoke_test_run.rb
--- old/yast2-pkg-bindings-4.2.7/smoke_test_run.rb      2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/smoke_test_run.rb      2020-07-13 
13:17:22.000000000 +0200
@@ -79,6 +79,24 @@
 raise "No package found!" if packages.empty?
 puts "OK (found #{packages.size} packages)"
 
+# make sure a name without variables stays the same
+puts "Checking Pkg.ExpandedName..."
+name = "YaST"
+expanded_name = Yast::Pkg.ExpandedName(name)
+if name != expanded_name
+  raise "Unexpected result: #{expanded_name.inspect}, expected #{name.inspect}"
+end
+puts "OK"
+
+# make sure a name with variables does not stay the same
+puts "Checking Pkg.ExpandedName..."
+name = "YaST $releasever"
+expanded_name = Yast::Pkg.ExpandedName(name)
+if name == expanded_name
+  raise "Unexpected result: #{expanded_name.inspect} is not expanded"
+end
+puts "OK"
+
 # make sure no URL part is lost by Pkg.ExpandedUrl call (bsc#1067007)
 puts "Checking Pkg.ExpandedUrl..."
 url = "https://user:[email protected]/path?opt=value";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/src/PkgFunctions.cc 
new/yast2-pkg-bindings-4.2.8/src/PkgFunctions.cc
--- old/yast2-pkg-bindings-4.2.7/src/PkgFunctions.cc    2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/src/PkgFunctions.cc    2020-07-13 
13:17:22.000000000 +0200
@@ -19,7 +19,6 @@
  */
 
 /*
-   File:       $Id$
    Author:     Ladislav Slezák <[email protected]>
    Summary:     Functions related to error handling
    Namespace:   Pkg
@@ -507,6 +506,22 @@
     return new_target;
 }
 
+
+YCPValue
+PkgFunctions::ExpandedName(const YCPString& name) const
+{
+    if (name.isNull())
+    {
+       y2error("name is nil");
+       return YCPVoid();
+    }
+
+    zypp::RepoVariablesReplacedString replaced_name;
+    replaced_name.raw() = name->value();
+    return YCPString(replaced_name.transformed());
+}
+
+
 /**
  * @builtin ExpandedUrl
  * @short expands the repo variables in the given zypper URL
@@ -521,11 +536,12 @@
     }
 
     zypp::RepoVariablesReplacedUrl replacedUrl;
-    replacedUrl.raw() = zypp::Url(url->asString()->value());
+    replacedUrl.raw() = zypp::Url(url->value());
     // return full URL including the password if present
     return YCPString(replacedUrl.transformed().asCompleteString());
 }
 
+
 /**
  * @builtin CompareVersions
  * @short compares rpm version strings ([epoch:]version[-release])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/src/PkgFunctions.h 
new/yast2-pkg-bindings-4.2.8/src/PkgFunctions.h
--- old/yast2-pkg-bindings-4.2.7/src/PkgFunctions.h     2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/src/PkgFunctions.h     2020-07-13 
13:17:22.000000000 +0200
@@ -19,7 +19,6 @@
  */
 
 /*
-   File:       $Id$
    Author:     Ladislav Slezák <[email protected]>
    Summary:     Handles Pkg::function (list_of_arguments) calls
    Namespace:   Pkg
@@ -304,6 +303,8 @@
        /* TYPEINFO: boolean() */
        YCPValue Connect ();
        /* TYPEINFO: string(string)*/
+       YCPValue ExpandedName(const YCPString&) const;
+       /* TYPEINFO: string(string)*/
        YCPValue ExpandedUrl (const YCPString&);
 
        // callbacks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/src/Source_Create.cc 
new/yast2-pkg-bindings-4.2.8/src/Source_Create.cc
--- old/yast2-pkg-bindings-4.2.7/src/Source_Create.cc   2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/src/Source_Create.cc   2020-07-13 
13:17:22.000000000 +0200
@@ -19,7 +19,6 @@
  */
 
 /*
-   File:       $Id$
    Author:     Ladislav Slezák <[email protected]>
    Summary:     Functions related to repository registration
    Namespace:   Pkg
@@ -320,8 +319,8 @@
  * metadata is not downloaded, use Pkg::SourceRefreshNow() for that. The 
metadata is also loaded
  * automatically when loading the repository content (Pkg::SourceLoad())
  *
- * @param map map with repository parameters: $[ "enabled" : boolean, 
"autorefresh" : boolean, "name" : string,
- *   "alias" : string, "base_urls" : list<string>, "check_alias" : boolean, 
"priority" : integer, "prod_dir" : string, "type" : string ] 
+ * @param map map with repository parameters: $[ "enabled" : boolean, 
"autorefresh" : boolean, "raw_name" : string, "name" : string,
+ *   "alias" : string, "base_urls" : list<string>, "check_alias" : boolean, 
"priority" : integer, "prod_dir" : string, "type" : string ]
  * @return integer Repository ID or nil on error
  **/
 YCPValue PkgFunctions::RepositoryAdd(const YCPMap &params)
@@ -443,8 +442,12 @@
     repo.setAlias(alias);
 
 
-    // check name parameter
-    if (!params->value( YCPString("name") ).isNull() && 
params->value(YCPString("name"))->isString())
+    // check raw_name and name parameter
+    if (!params->value( YCPString("raw_name") ).isNull() && 
params->value(YCPString("raw_name"))->isString())
+    {
+       repo.setName(params->value(YCPString("raw_name"))->asString()->value());
+    }
+    else if (!params->value( YCPString("name") ).isNull() && 
params->value(YCPString("name"))->isString())
     {
        repo.setName(params->value(YCPString("name"))->asString()->value());
     }
@@ -532,6 +535,7 @@
   return SourceCreateEx (media, pd, true, YCPString(""));
 }
 
+
 /**
  * @builtin SourceCreateType
  * @short Create source of required type
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/src/Source_Get.cc 
new/yast2-pkg-bindings-4.2.8/src/Source_Get.cc
--- old/yast2-pkg-bindings-4.2.7/src/Source_Get.cc      2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/src/Source_Get.cc      2020-07-13 
13:17:22.000000000 +0200
@@ -19,7 +19,6 @@
  */
 
 /*
-   File:       $Id$
    Author:     Ladislav Slezák <[email protected]>
    Summary:     Functions for reading repository properties
    Namespace:   Pkg
@@ -113,6 +112,7 @@
  * "raw_url"   : YCPString (without password, but see SourceRawURL, raw URL 
without variable replacement),
  * "alias"     : YCPString,
  * "name"      : YCPString,
+ * "raw_name"  : YCPString (raw name without variable replacement),
  * "service"   : YCPString, (service to which the repo belongs, empty if there 
is no service assigned)
  * "keeppackages" : YCPBoolean,
  * "is_update_repo" : YCPBoolean, (true if this is an update repo - this 
requires loaded objects in pool otherwise the flag is not returned! The value 
is stored in repo metadata, not in .repo file!)
@@ -148,7 +148,9 @@
     }
 
     data->add( YCPString("alias"),             
YCPString(repo->repoInfo().alias()));
+
     data->add( YCPString("name"),              
YCPString(repo->repoInfo().name()));
+    data->add( YCPString("raw_name"),          
YCPString(repo->repoInfo().rawName()));
 
     YCPList base_urls;
     for( zypp::RepoInfo::urls_const_iterator it = 
repo->repoInfo().baseUrlsBegin(); it != repo->repoInfo().baseUrlsEnd(); ++it)
@@ -400,6 +402,7 @@
  * "enabled"   : YCPBoolean,
  * "autorefresh": YCPBoolean,
  * "name"      : YCPString,
+ * "raw_name"  : YCPString,
  * "service"   : YCPString,
  * "keeppackages" : YCPBoolean,
  * ];
@@ -424,6 +427,7 @@
            // Note: autorefresh() is tribool
            src_map->add(YCPString("autorefresh"), 
YCPBoolean((*it)->repoInfo().autorefresh()));
            src_map->add(YCPString("name"), 
YCPString((*it)->repoInfo().name()));
+           src_map->add(YCPString("raw_name"), 
YCPString((*it)->repoInfo().rawName()));
            src_map->add(YCPString("priority"), 
YCPInteger((*it)->repoInfo().priority()));
            src_map->add(YCPString("service"), 
YCPString((*it)->repoInfo().service()));
            src_map->add(YCPString("keeppackages"), 
YCPBoolean((*it)->repoInfo().keepPackages()));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/src/Source_Set.cc 
new/yast2-pkg-bindings-4.2.8/src/Source_Set.cc
--- old/yast2-pkg-bindings-4.2.7/src/Source_Set.cc      2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/src/Source_Set.cc      2020-07-13 
13:17:22.000000000 +0200
@@ -19,7 +19,6 @@
  */
 
 /*
-   File:       $Id$
    Author:     Ladislav Slezák <[email protected]>
    Summary:     Functions for changing properties of a repository 
    Namespace:   Pkg
@@ -226,11 +225,19 @@
        repo->repoInfo().setAutorefresh( autorefresh );
     }
 
-    if( !descr->value(YCPString("name")).isNull() && 
descr->value(YCPString("name"))->isString())
+    if( !descr->value(YCPString("raw_name")).isNull() && 
descr->value(YCPString("raw_name"))->isString())
     {
        // rename the source
-        y2debug("set name: %s", 
descr->value(YCPString("name"))->asString()->value().c_str());
-       
repo->repoInfo().setName(descr->value(YCPString("name"))->asString()->value());
+       string raw_name = 
descr->value(YCPString("raw_name"))->asString()->value();
+       y2debug("set name: %s", raw_name.c_str());
+       repo->repoInfo().setName(raw_name);
+    }
+    else if( !descr->value(YCPString("name")).isNull() && 
descr->value(YCPString("name"))->isString())
+    {
+       // rename the source
+       string name = descr->value(YCPString("name"))->asString()->value();
+       y2debug("set name: %s", name.c_str());
+       repo->repoInfo().setName(name);
     }
 
     if( !descr->value(YCPString("priority")).isNull() && 
descr->value(YCPString("priority"))->isInteger())
@@ -238,8 +245,8 @@
        unsigned int priority = 
descr->value(YCPString("priority"))->asInteger()->value();
 
        // set the priority
-       repo->repoInfo().setPriority(priority);
        y2debug("set priority: %d", priority);
+       repo->repoInfo().setPriority(priority);
     }
 
     if(!descr->value(YCPString("keeppackages")).isNull() && 
descr->value(YCPString("keeppackages"))->isBoolean())
@@ -423,5 +430,3 @@
 
     return YCPBoolean(success);
 }
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/testsuite/Makefile.am 
new/yast2-pkg-bindings-4.2.8/testsuite/Makefile.am
--- old/yast2-pkg-bindings-4.2.7/testsuite/Makefile.am  2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/testsuite/Makefile.am  1970-01-01 
01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-#
-# Makefile.am for .../agent-pkg-bindings/testsuite
-#
-AUTOMAKE_OPTIONS = dejagnu
-
-clean-local:
-       rm -f tmp.err.* tmp.out.* site.exp site.bak
-
-EXTRA_DIST = README
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-pkg-bindings-4.2.7/testsuite/README 
new/yast2-pkg-bindings-4.2.8/testsuite/README
--- old/yast2-pkg-bindings-4.2.7/testsuite/README       2020-02-26 
10:10:21.000000000 +0100
+++ new/yast2-pkg-bindings-4.2.8/testsuite/README       1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-Testsuite for agent-pkg-bindings.


Reply via email to