Line
Link Here
|
0 |
-- /usr/sbin/ufed |
0 |
++ /usr/sbin/ufed |
Lines 179-184
Link Here
|
179 |
close $makeconf; |
179 |
close $makeconf; |
180 |
} |
180 |
} |
181 |
|
181 |
|
|
|
182 |
my $sourcing = 0; |
182 |
eval { |
183 |
eval { |
183 |
# USE comment start/end (start/end of newline character at the end, specifically) |
184 |
# USE comment start/end (start/end of newline character at the end, specifically) |
184 |
# default to end of make.conf, to handle make.confs without #USE= |
185 |
# default to end of make.conf, to handle make.confs without #USE= |
Lines 200-207
Link Here
|
200 |
/\G$IDENT/gc or die; |
200 |
/\G$IDENT/gc or die; |
201 |
my $name = $1; |
201 |
my $name = $1; |
202 |
/\G$BLANK/gc; |
202 |
/\G$BLANK/gc; |
|
|
203 |
if($name ne 'source') { |
203 |
/\G$ASSIG/gc or die; |
204 |
/\G$ASSIG/gc or die; |
204 |
/\G$BLANK/gc; |
205 |
/\G$BLANK/gc; |
|
|
206 |
} else { |
207 |
$sourcing = 1; |
208 |
} |
205 |
die if pos == length; |
209 |
die if pos == length; |
206 |
my $valstart = pos; |
210 |
my $valstart = pos; |
207 |
/\G(?:$BNUQV|$SQVAL|$BNDQV)+/gc or die; |
211 |
/\G(?:$BNUQV|$SQVAL|$BNDQV)+/gc or die; |
Lines 295-300
Link Here
|
295 |
}; |
300 |
}; |
296 |
die "Parse error when writing make.conf - did you modify it while ufed was running?\n" if $@; |
301 |
die "Parse error when writing make.conf - did you modify it while ufed was running?\n" if $@; |
297 |
|
302 |
|
|
|
303 |
print STDERR <<EOF if $sourcing; |
304 |
Warning: source command found in /etc/make.conf. Flags may |
305 |
be saved incorrectly if the sourced file modifies them. |
306 |
EOF |
298 |
{ |
307 |
{ |
299 |
open my $makeconf, '>', '/etc/make.conf' or die "Couldn't open /etc/make.conf\n"; |
308 |
open my $makeconf, '>', '/etc/make.conf' or die "Couldn't open /etc/make.conf\n"; |
300 |
print $makeconf $_; |
309 |
print $makeconf $_; |
301 |
-- /usr/lib/ufed/Portage.pm |
310 |
++ /usr/lib/ufed/Portage.pm |
Lines 250-257
Link Here
|
250 |
/\G$IDENT/gc or die; |
250 |
/\G$IDENT/gc or die; |
251 |
my $name = $1; |
251 |
my $name = $1; |
252 |
/\G$BLANK/gc; |
252 |
/\G$BLANK/gc; |
|
|
253 |
if($name ne 'source') { |
253 |
/\G$ASSIG/gc or die; |
254 |
/\G$ASSIG/gc or die; |
254 |
/\G$BLANK/gc; |
255 |
/\G$BLANK/gc; |
|
|
256 |
} |
255 |
die if pos == length; |
257 |
die if pos == length; |
256 |
my $value = ''; |
258 |
my $value = ''; |
257 |
for(;;) { |
259 |
for(;;) { |
Lines 275-281
Link Here
|
275 |
last |
277 |
last |
276 |
} |
278 |
} |
277 |
} |
279 |
} |
|
|
280 |
if($name eq 'source') { |
281 |
open my $f, '<', $value or die; |
282 |
my $pos = pos; |
283 |
substr($_, pos, 0) = do { |
284 |
local $/; |
285 |
my $text = <$f>; |
286 |
die if not defined $text; |
287 |
$text; |
288 |
}; |
289 |
pos = $pos; |
290 |
close $f or die; |
291 |
} else { |
278 |
$env{$name} = $value; |
292 |
$env{$name} = $value; |
|
|
293 |
} |
279 |
} |
294 |
} |
280 |
}; |
295 |
}; |
281 |
die "Parse error in $fname\n" if $@; |
296 |
die "Parse error in $fname\n" if $@; |