From abde901ac4e2d5a5645e7ab56d2a2b95d8e732c2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 21 Feb 2005 16:27:49 +0000 Subject: do URPM::add_macro in write_langs(), and require URPM instead of using it (for now it's only used during install) (bugzilla #13796) --- perl-install/lang.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/lang.pm b/perl-install/lang.pm index b7becb3d2..0241c6953 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -4,7 +4,6 @@ use diagnostics; use strict; use common; use log; -use URPM; #- key: lang name (locale name for some (~5) special cases needing #- extra distinctions) @@ -923,7 +922,6 @@ sub utf8_should_be_needed { sub pack_langs { my ($l) = @_; my $s = $l->{all} ? 'all' : join ':', uniq(map { getLANGUAGE($_) } langs($l)); - URPM::add_macro("_install_langs $s"); $s; } @@ -961,6 +959,8 @@ sub write_langs { my ($langs) = @_; my $s = pack_langs($langs); symlink "$::prefix/etc/rpm", "/etc/rpm" if $::prefix; + require URPM; + URPM::add_macro("_install_langs $s"); substInFile { s/%_install_langs.*//; $_ .= "%_install_langs $s\n" if eof && $s } "$::prefix/etc/rpm/macros"; } -- cgit v1.2.1