Hello community,

here is the log from the commit of package opi for openSUSE:Factory checked in 
at 2019-06-12 13:16:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opi (Old)
 and      /work/SRC/openSUSE:Factory/.opi.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opi"

Wed Jun 12 13:16:37 2019 rev:6 rq:709064 version:0.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/opi/opi.changes  2019-06-03 18:58:50.796351491 
+0200
+++ /work/SRC/openSUSE:Factory/.opi.new.4811/opi.changes        2019-06-12 
13:16:51.784655369 +0200
@@ -1,0 +2,7 @@
+Tue Jun 11 07:27:45 UTC 2019 - Yunhe Guo <i...@guoyunhe.me>
+
+- Version 0.5.2
+  * Fixed
+    - Trim "NAME" and "VERSION" string
+
+-------------------------------------------------------------------

Old:
----
  opi-0.5.1.tar.gz

New:
----
  opi-0.5.2.tar.gz

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

Other differences:
------------------
++++++ opi.spec ++++++
--- /var/tmp/diff_new_pack.OCx6Dm/_old  2019-06-12 13:16:52.396654727 +0200
+++ /var/tmp/diff_new_pack.OCx6Dm/_new  2019-06-12 13:16:52.396654727 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           opi
-Version:        0.5.1
+Version:        0.5.2
 Release:        0
 Summary:        OBS Package Installer (CLI)
 License:        GPL-3.0

++++++ opi-0.5.1.tar.gz -> opi-0.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-0.5.1/CHANGELOG.md new/opi-0.5.2/CHANGELOG.md
--- old/opi-0.5.1/CHANGELOG.md  2019-06-03 11:10:03.000000000 +0200
+++ new/opi-0.5.2/CHANGELOG.md  2019-06-11 09:24:59.000000000 +0200
@@ -7,6 +7,12 @@
 
 ## [Unreleased]
 
+## [0.5.2]
+
+### Fixed
+
+- Trim "NAME" and "VERSION" string 
[#13](https://github.com/openSUSE-zh/opi/issues/13)
+
 ## [0.5.1]
 
 ### Fixed
@@ -78,7 +84,8 @@
 - Choose package and install
 - Keep or remove repository after installation
 
-[Unreleased]: https://github.com/openSUSE-zh/opi/compare/v0.5.1...HEAD
+[Unreleased]: https://github.com/openSUSE-zh/opi/compare/v0.5.2...HEAD
+[0.5.2]: https://github.com/openSUSE-zh/opi/compare/v0.5.1...v0.5.2
 [0.5.1]: https://github.com/openSUSE-zh/opi/compare/v0.5.0...v0.5.1
 [0.5.0]: https://github.com/openSUSE-zh/opi/compare/v0.4.0...v0.5.0
 [0.4.0]: https://github.com/openSUSE-zh/opi/compare/v0.3.2...v0.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opi-0.5.1/opi new/opi-0.5.2/opi
--- old/opi-0.5.1/opi   2019-06-03 11:10:03.000000000 +0200
+++ new/opi-0.5.2/opi   2019-06-11 09:24:59.000000000 +0200
@@ -117,14 +117,20 @@
 
 =cut
 
+sub trim {
+    my $s = shift;
+    $s =~ s/^\s+|\s+$//g;
+    return $s
+}
+
 sub get_distribution {
     my $prefix = shift;
     my $config = Config::Tiny->read('/etc/os-release');
     my $name = $config->{_}->{NAME};
     my $version = $config->{_}->{VERSION};
-    $name = substr $name, 1, -1; # Remove quotes
+    $name = trim(substr($name, 1, -1)); # Remove quotes and trailing spaces
     if ($version) {
-        $version = substr $version, 1, -1; # Remove quotes
+        $version = trim(substr($version, 1, -1)); # Remove quotes
     }
     if ($name eq 'openSUSE Tumbleweed') {
         $name = 'openSUSE:Factory';
Binary files old/opi-0.5.1/screenshot.png and new/opi-0.5.2/screenshot.png 
differ


Reply via email to