Hello community, here is the log from the commit of package opi for openSUSE:Factory checked in at 2020-05-16 22:28:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opi (Old) and /work/SRC/openSUSE:Factory/.opi.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opi" Sat May 16 22:28:14 2020 rev:12 rq:806021 version:0.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/opi/opi.changes 2020-04-04 12:26:18.963982783 +0200 +++ /work/SRC/openSUSE:Factory/.opi.new.2738/opi.changes 2020-05-16 22:28:22.417524246 +0200 @@ -1,0 +2,7 @@ +Sat May 16 12:16:13 UTC 2020 - Yunhe Guo <i...@guoyunhe.me> + +- Version 0.8.2 + * Fixed + - Ghost process on XML parsing failure + +------------------------------------------------------------------- Old: ---- opi-0.8.1.tar.gz New: ---- opi-0.8.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opi.spec ++++++ --- /var/tmp/diff_new_pack.Zv4z2W/_old 2020-05-16 22:28:23.721526922 +0200 +++ /var/tmp/diff_new_pack.Zv4z2W/_new 2020-05-16 22:28:23.725526931 +0200 @@ -17,7 +17,7 @@ Name: opi -Version: 0.8.1 +Version: 0.8.2 Release: 0 Summary: OBS Package Installer (CLI) License: GPL-3.0-only ++++++ opi-0.8.1.tar.gz -> opi-0.8.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-0.8.1/CHANGELOG.md new/opi-0.8.2/CHANGELOG.md --- old/opi-0.8.1/CHANGELOG.md 2020-04-03 09:55:36.000000000 +0200 +++ new/opi-0.8.2/CHANGELOG.md 2020-05-16 14:11:48.000000000 +0200 @@ -7,6 +7,12 @@ ## [Unreleased] +## [0.8.2] - 2020-05-16 + +### Fixed + +- Ghost process on XML parsing failure [#27](https://github.com/openSUSE-zh/opi/pulls/27) + ## [0.8.1] - 2020-04-03 ### Fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-0.8.1/opi new/opi-0.8.2/opi --- old/opi-0.8.1/opi 2020-04-03 09:55:36.000000000 +0200 +++ new/opi-0.8.2/opi 2020-05-16 14:11:48.000000000 +0200 @@ -60,28 +60,10 @@ # # Search packages # -my @obs; -my @pmbs; -my $pid = fork(); -die if not defined $pid; -if (not $pid) { - # child process prints spinner - print 'Searching'; - for (;;) { - print '.'; - system 'sleep 1'; - } -} -else { - # kill child process when pressing ctrl + c - $SIG{'INT'} = sub { kill 'KILL', $pid; exit; }; - # parent process do request - @obs = search_published_binary('openSUSE', $obs_apiroot, @ARGV); - @pmbs = search_published_binary('Packman', $pmbs_apiroot, @ARGV); - # kill child process to stop spinner - kill 'KILL', $pid; - print "\n"; -} +print "Searching...\n"; + +my @obs = search_published_binary('openSUSE', $obs_apiroot, @ARGV); +my @pmbs = search_published_binary('Packman', $pmbs_apiroot, @ARGV); my @bins = sort_binaries(@obs, @pmbs); my @binary_names = get_binary_names(@bins); @@ -323,10 +305,13 @@ my $resp = $ua->request($req); if ($resp->is_success) { my $message = $resp->decoded_content; + my @collection = (); - my $dom = XML::LibXML->load_xml(string => $message); + if ($message =~ /^\s*$/) { + return @collection; + } - my @collection = (); + my $dom = XML::LibXML->load_xml(string => $message); my $arch = get_architecture();