diff --git a/perl-Bootloader-0.6.4.tar.bz2 b/perl-Bootloader-0.6.4.tar.bz2 deleted file mode 100644 index 0a2f5e5..0000000 --- a/perl-Bootloader-0.6.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:843ae762da6b0a05c2f9c94ec91bb835a4cdbed40d72465eb950c9376f4227c0 -size 153132 diff --git a/perl-Bootloader-0.6.5.tar.bz2 b/perl-Bootloader-0.6.5.tar.bz2 new file mode 100644 index 0000000..1f27757 --- /dev/null +++ b/perl-Bootloader-0.6.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b3aac82d1ae0343a591c935ba19b75f70cfa0909e1abd20048a78fe60d6d075 +size 153289 diff --git a/perl-Bootloader.changes b/perl-Bootloader.changes index 7044134..6eb4cb6 100644 --- a/perl-Bootloader.changes +++ b/perl-Bootloader.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 29 16:20:02 CEST 2012 - snwint@suse.de + +- mchang: fix error caused by grub.cfg missing (bnc#769350) +- make dependency on Pod::Usage optional (bnc#760464) +- 0.6.5 + ------------------------------------------------------------------- Mon Jun 4 15:40:15 CEST 2012 - mchang@suse.com diff --git a/perl-Bootloader.spec b/perl-Bootloader.spec index a284df4..da18ba0 100644 --- a/perl-Bootloader.spec +++ b/perl-Bootloader.spec @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.6.4 +Version: 0.6.5 Release: 0 Requires: perl-base = %{perl_version} Requires: e2fsprogs diff --git a/update-bootloader b/update-bootloader index 93e64aa..7a05663 100644 --- a/update-bootloader +++ b/update-bootloader @@ -2,12 +2,20 @@ use POSIX; use Getopt::Long; -use Pod::Usage; use Bootloader::Tools; use Bootloader::Path; use Bootloader::MBRTools; use strict; +# keep Pod::Usage optional (bnc #760464) +eval "use Pod::Usage"; + +if(!exists $::{pod2usage}) { + sub pod2usage { + die "usage: update-bootloader [operation] [options]\n"; + } +} + my %oper; my ($opt_default, $opt_force, $opt_force_default, $opt_help, $opt_man, $opt_previous, $opt_xen) = (0,0,0,0,0,0,0); @@ -184,13 +192,13 @@ GetOptions (\%oper, pod2usage(1) if $opt_help; pod2usage(-exitstatus => 0, -verbose => 2) if $opt_man; -pod2usage("Specify exactly one operation, either 'add', 'remove' or 'refresh'") +die("Specify exactly one operation, either 'add', 'remove' or 'refresh'\n") unless scalar keys(%oper) == 1; -pod2usage("Option 'default' is only allowed for operation 'add'") +die("Option 'default' is only allowed for operation 'add'\n") if ($opt_default and not defined $oper{add}); -pod2usage("Option 'force-default' is only allowed for operation 'add'") +die("Option 'force-default' is only allowed for operation 'add'\n") if ($opt_force_default and not defined $oper{add}); if (defined $oper{"examinembr"}) { @@ -379,10 +387,10 @@ if (defined $oper{add}) { if (defined $oper{add}) { open (LOG, ">>$logname"); print LOG ("update-bootloader: now executing operation add\n"); - print LOG ("update-bootloader: changed opt name is $opt_name \n"); + print LOG ("update-bootloader: changed opt name is $opt_name\n"); close LOG; - pod2usage("Please specify name and kernel image for new section") + die("Please specify name and kernel image for new section\n") unless $opt_name and $opt_image; my @params = ( @@ -391,7 +399,7 @@ if (defined $oper{add}) { ); if (CountSections(@params) != 0) { if (not $opt_force) { - pod2usage("There are already sections with image '$opt_image'"); + die("There are already sections with image '$opt_image'\n"); } open (LOG, ">>$logname"); print LOG ("update-bootloader: section already exist. Skip add.\n"); @@ -496,7 +504,7 @@ if (defined $oper{remove}) { print LOG ("update-bootloader: found $num sections, no opt_force: not removing\n"); close LOG; - pod2usage("There is more than one section with image '$opt_image'"); + die("There is more than one section with image '$opt_image'\n"); } else { open (LOG, ">>$logname"); print LOG ("update-bootloader: calling Tools::RemoveSections\n");