new version
OBS-URL: https://build.opensuse.org/package/show/Base:System/perl-Bootloader?expand=0&rev=15
This commit is contained in:
parent
6c4e464662
commit
e73b2ce234
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:54c7d09e6d341194fcae3c1d091f41d13c113e28002108c730c9bc0061bd3f79
|
||||
size 52503
|
3
perl-Bootloader-0.5.9.tar.bz2
Normal file
3
perl-Bootloader-0.5.9.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a547cb8807a3ff3bcf728d906ed8c09dd4ba2dc92d6e95346e6f2331aad1c463
|
||||
size 52467
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user