Changeset 1031 in ProjectBuilder for devel/rpmbootstrap/bin/rpmbootstrap
- Timestamp:
- May 22, 2010, 8:40:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/rpmbootstrap/bin/rpmbootstrap
r1029 r1031 261 261 } 262 262 pb_log(3,"Mirror $mirror gave answer: ".Dumper($response->dump(maxlength => 0))."\n"); 263 264 # Try to find where the repodata structure is for later usage 265 my $repo = $mirror; 266 my $found = 0; 267 if ($pbupd =~ /yum/) { 268 my $response1; 269 while ($found == 0) { 270 $response1 = $ua->get("$repo/repodata"); 271 if (! $response1->is_success) { 272 $repo = dirname($repo); 273 274 pb_log(2,"REPO analyzed: $repo\n"); 275 # There is a limit to the loop, when / is reached and nothing found 276 my ($scheme, $account, $host, $port, $path) = pb_get_uri($repo); 277 die "Unable to find the repodata structure of the mirror $mirror\nPlease check the URL or warn the dev team.\n" if ($path =~ /^[\/]+$/); 278 279 # / not reached, so looping 280 next; 281 } else { 282 # repodata found $repo is correct 283 $found = 1; 284 last; 285 } 286 } 287 } 263 288 264 289 # Manages architectures specificities … … 433 458 pb_system("sed -i -e 's/^mirrorlist/#mirrorlist/' $i","","quiet"); 434 459 # rather use neutral separators here 435 pb_system("sed -i -e 's|^#baseurl.*\$|baseurl=$ mirror|' $i","","quiet");460 pb_system("sed -i -e 's|^#baseurl.*\$|baseurl=$repo|' $i","","quiet"); 436 461 } 437 462 $minipkglist = "ldconfig yum passwd vim-minimal dhclient authconfig";
Note:
See TracChangeset
for help on using the changeset viewer.