diff options
author | Michael Scherer <misc@mandriva.com> | 2005-12-05 10:21:28 +0000 |
---|---|---|
committer | Michael Scherer <misc@mandriva.com> | 2005-12-05 10:21:28 +0000 |
commit | 81005747795f8bb805f69a1ba43d9098c1edca8a (patch) | |
tree | 620755f999c0346f93b700787336b5e5b65798f7 /rpmbuildupdate | |
parent | 0d278a2441fa980e68a43039c6b752c985b273a1 (diff) | |
download | bootsplash-81005747795f8bb805f69a1ba43d9098c1edca8a.tar bootsplash-81005747795f8bb805f69a1ba43d9098c1edca8a.tar.gz bootsplash-81005747795f8bb805f69a1ba43d9098c1edca8a.tar.bz2 bootsplash-81005747795f8bb805f69a1ba43d9098c1edca8a.tar.xz bootsplash-81005747795f8bb805f69a1ba43d9098c1edca8a.zip |
- use RPM4 instead of Hdlist
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-x | rpmbuildupdate | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate index 8a07217..2ef0e5b 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -16,7 +16,7 @@ # rework configuration option # add debian url ( like gnome or rh ) => cannot be done i think # use more Hdlist ( see Hdlist->build() ) -# replace perl-Hdlist by perl-RPM4 +# see if use force ( for RPM4::Spec ) could help when we buld a spec file from scrath # list of the return code : # 255 => usage @@ -34,7 +34,7 @@ use File::Copy; use Cwd; use File::Spec; use File::Path; -use Hdlist; +use RPM4; my %config; @@ -124,7 +124,7 @@ sub fetch_http { sub fill_global_variable { my ($pkgrpm) = @_; - $top = $config{top} || Hdlist::expand('%_topdir'); + $top = $config{top} || RPM4::expand('%_topdir'); chomp($top); if ($config{log}) { my $basename = basename($pkgrpm); @@ -136,9 +136,9 @@ sub fill_global_variable { $log = ""; } #TODO replace with perl-hdlist - Hdlist::add_macro("_topdir $top"); + RPM4::add_macro("_topdir $top"); $rpm = qq(rpm --define "_topdir $top"); - $config{sourcedir} = Hdlist::expand('%_sourcedir'); + $config{sourcedir} = RPM4::expand('%_sourcedir'); chomp( $config{sourcedir}); #"$top/SOURCES"; } @@ -198,7 +198,7 @@ sub build_from_src { } # TODO log, check return - my ($spec_path) = Hdlist::installsrpm($pkgrpm); + my ($spec_path) = RPM4::installsrpm($pkgrpm); build($spec_path, $name, $version, $release, $newversion); } @@ -207,7 +207,7 @@ sub build { my ($spec_path, $pkg, $version, $release, $newversion) = @_; my ($message, $spec, @url, %specvars); my ($newrelease, $release_prefix) = ($1,$2) if $release =~ /^(.*\d+)(\D*)$/g; - my $hdlist_spec = Hdlist::specnew($spec_path) or die "Unable to parse spec $spec_path\n"; + my $hdlist_spec = RPM4::specnew($spec_path,force => 1) or die "Unable to parse spec $spec_path\n"; if ($newversion) { print "===> Building $pkg $newversion\n"; } else { @@ -287,7 +287,7 @@ sub build { if (/^\%changelog/) { $message =~ s/\%\%VERSION/$newversion/; my @l = getpwuid($<); - my $packager = Hdlist::expand('%packager'); + my $packager = RPM4::expand('%packager'); chomp($packager); # if macro is undefined $packager =~ s/\%packager//g; |