From e73b2ce234ce20b24d22055b4b63758701f963286b65017aaf35b508e6ea41e2 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 26 Feb 2010 14:05:01 +0000 Subject: [PATCH] new version OBS-URL: https://build.opensuse.org/package/show/Base:System/perl-Bootloader?expand=0&rev=15 --- perl-Bootloader-0.5.8.tar.bz2 | 3 --- perl-Bootloader-0.5.9.tar.bz2 | 3 +++ perl-Bootloader.changes | 9 ++++++++ perl-Bootloader.spec | 24 +++++++------------- update-bootloader | 41 ++++++++++------------------------- 5 files changed, 31 insertions(+), 49 deletions(-) delete mode 100644 perl-Bootloader-0.5.8.tar.bz2 create mode 100644 perl-Bootloader-0.5.9.tar.bz2 diff --git a/perl-Bootloader-0.5.8.tar.bz2 b/perl-Bootloader-0.5.8.tar.bz2 deleted file mode 100644 index fb786a8..0000000 --- a/perl-Bootloader-0.5.8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:54c7d09e6d341194fcae3c1d091f41d13c113e28002108c730c9bc0061bd3f79 -size 52503 diff --git a/perl-Bootloader-0.5.9.tar.bz2 b/perl-Bootloader-0.5.9.tar.bz2 new file mode 100644 index 0000000..1b19bd1 --- /dev/null +++ b/perl-Bootloader-0.5.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a547cb8807a3ff3bcf728d906ed8c09dd4ba2dc92d6e95346e6f2331aad1c463 +size 52467 diff --git a/perl-Bootloader.changes b/perl-Bootloader.changes index 2d4e203..9d7793a 100644 --- a/perl-Bootloader.changes +++ b/perl-Bootloader.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Feb 26 14:01:47 UTC 2010 - jreidinger@novell.com + +- don't print outside if mdadm missing (bnc#578003) +- fix splitting of values which now doesn't use that structure + (bnc#566020) +- adapt to new version of getting product description (bnc#583034) +- 0.5.9 + ------------------------------------------------------------------- Sun Jan 3 15:41:34 CET 2010 - jengelh@medozas.de diff --git a/perl-Bootloader.spec b/perl-Bootloader.spec index 2f717ab..86e5a46 100644 --- a/perl-Bootloader.spec +++ b/perl-Bootloader.spec @@ -1,30 +1,22 @@ # -# spec file for package perl-Bootloader (Version 0.5.8) +# spec file for package perl-Bootloader (Version 0.5.9) # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. # -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# 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/ # # norootforbuild - Name: perl-Bootloader -Version: 0.5.8 -Release: 2 +Version: 0.5.9 +Release: 0 Requires: perl-base = %{perl_version} Requires: e2fsprogs Recommends: perl-gettext -AutoReqProv: on +Autoreqprov: on Group: System/Boot License: GNU General Public License (GPL) Summary: Library for Configuring Boot Loaders @@ -97,4 +89,4 @@ sed -i '/ZIPL/D;/PowerLILO/D;/\/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorar /usr/lib/bootloader /boot/boot.readme -%changelog +%changelog -n perl-Bootloader diff --git a/update-bootloader b/update-bootloader index bd6b8cb..b7d8e3c 100644 --- a/update-bootloader +++ b/update-bootloader @@ -111,41 +111,22 @@ allowed together with --add operation =cut # Get product name and version -# FIXME: There is still no guaranteed-to-work solution -# FIXME: as Commandline:: always prints to stderr, which is risky -# FIXME: to get garbage. -# If Commandline:: prints garbage, use /etc/SuSE-release instead +# If zypper is not available or versions is empty, use /etc/SuSE-release instead +# linux is last possible fallback sub GetProduct { my $namever; - - # first try: new zypp-query-pool adopted to our needs - my @product_query = split ('\|', qx{/usr/lib/zypp/zypp-query-pool products \@system}); - my $found = 0; - my $i = 0; - - for ($i = 0; $i <= @product_query; $i++){ - if ($product_query[$i] eq "base"){ - $found = 1; - last; - } - } - - # Determine the bootloader type, because long product names may only - # be used in case of grub my $loader = Bootloader::Tools::GetBootloader(); - # Substitude whitespaces with an underscore - if ($found){ - if ($loader ne "grub") { - $namever = $product_query[$i+1]; - $namever =~ s/\s/_/g; - } - else{ - $namever = $product_query[$i+2]; - } - chomp $namever; + + # first try: use zypper + if ( -f '/usr/bin/zypper' ){ + my $zypper_xml = qx{ZYPP_READONLY_HACK=1 zypper -qx --no-refresh pd -i | grep 'isbase="1"'}; + if ($zypper_xml =~ m/^.*summary="([^"]*)".*shortname="([^"]*)".*$/){ + return $1 if ($1 ne ""); #FIXME add here exceptions if bootloader has problems with long names + return $2 if ($2 ne ""); + } } - return "$namever" if $namever ne '' and $namever !~ /\n/; + # Second try: Is there a usable /etc/SuSE-release? # This should really not be used anymore, as the syntax changed