Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:GA
virt-v2v
catch_sles12_pkg_not_found.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File catch_sles12_pkg_not_found.patch of Package virt-v2v
The zypper version included with SLES12 reports an error if a specified package is not found. This is different than SLES11, where a message was simply reported. Catch the error with this patch, and ignore it as further attempts will be made to install the package. Index: virt-v2v-0.9.1/lib/Sys/VirtConvert/Converter/Linux.pm =================================================================== --- virt-v2v-0.9.1.orig/lib/Sys/VirtConvert/Converter/Linux.pm +++ virt-v2v-0.9.1/lib/Sys/VirtConvert/Converter/Linux.pm @@ -1837,9 +1837,12 @@ sub _install_any } # Fall back to local config if the above didn't work - $success = _install_config($kernel, $install, $upgrade, - $g, $root, $config) - unless ($success); + if (!$success) { + logmsg WARN, __x('Online install failed, trying local '. + 'virt-v2v repository.'); + $success = _install_config($kernel, $install, $upgrade, + $g, $root, $config); + } }; warn($@) if $@; }); @@ -2011,6 +2014,7 @@ sub _install_zypper my $success = 1; # Error when installing: "No provider of 'pkg' found." + # Error (new in SLES12) when installing: "Package 'pkg' not found." # (Not an) Error when updating: "Package 'pkg' is not available in your # repositories. Cannot reinstall, upgrade, or downgrade." ZYPPER: foreach my $task ( @@ -2043,7 +2047,7 @@ sub _install_zypper if ($@) { # Ignore 'No provider' errors as an install from the virt-v2v # repo will be attempted next. - if ($@ !~ /No provider/) { + if (($@ !~ /No provider/) && ($@ !~ /not found/)) { logmsg WARN, __x('Failed to install packages. '. 'Error was: {error}', error => $@); } @@ -2096,7 +2100,7 @@ sub _install_config \@missing, $g->inspect_get_arch($root), @$user); # We can't proceed if there are any files missing - v2vdie __x('Installation failed because the following '. + v2vdie __x('Local package installation failed because the following '. 'files referenced in the configuration file are '. 'required, but missing: {list}', list => join(' ', @missing)) if scalar(@missing) > 0;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor