Parcourir la source

use %{l_prefix}/bin/rpm as default instead of searching the path. If you want to search the path you can use -R rpm.

Michael van Elst il y a 23 ans
Parent
commit
6ecbb45e4d
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      openpkg-tool/openpkg-build.pl

+ 2 - 2
openpkg-tool/openpkg-build.pl

@@ -142,7 +142,7 @@ sub conditional ($$) {
 
 my($RPM,$RPM_PRIV,$RPM_NPRIV,$CURL,$PROG);
 
-$RPM = $opt_R || $env{''}->{opt}->{'R'} || 'rpm';
+$RPM = $opt_R || $env{''}->{opt}->{'R'} || '@l_prefix@/bin/rpm';
 $RPM = (`which $RPM` =~ m{^(/.*)})[0];
 die "FATAL: cannot locate rpm in path\n" unless $RPM =~ m{^/};
 
@@ -156,7 +156,7 @@ foreach my $env (sort { $a cmp $b } grep { $RPM =~ /^\Q$_\E/ } keys %env) {
 $RPM_PRIV  = ($opt_P ? $opt_P." ".$RPM : $RPM);
 $RPM_NPRIV = ($opt_N ? $opt_N." ".$RPM : $RPM);
 $CURL = $RPM;
-$CURL =~ s/bin\/rpm$/lib\/openpkg\/curl/
+$CURL =~ s/\/bin\/rpm$/\/lib\/openpkg\/curl/
     or die "FATAL: cannot deduce curl path from $RPM\n";
 
 ($PROG) = $0 =~ /(?:.*\/)?(.*)/;