| 185 |
pg_exec($db, "CREATE UNIQUE INDEX idxbis on bin_atsrc (name,bin_name,dist)") or die_status('Error creating index on temp table bin_atsrc'); |
pg_exec($db, "CREATE UNIQUE INDEX idxbis on bin_atsrc (name,bin_name,dist)") or die_status('Error creating index on temp table bin_atsrc'); |
| 186 |
|
|
| 187 |
foreach ($dists as $dist=>$sections) { |
foreach ($dists as $dist=>$sections) { |
| 188 |
|
$pkgs = array(); |
| 189 |
foreach ($sections as $section) { |
foreach ($sections as $section) { |
| 190 |
$filename=$dirs['sources_dir'] . "/$dist/$section/Sources.gz"; |
$filename=$dirs['sources_dir'] . "/$dist/$section/Sources.gz"; |
| 191 |
print "\nI'm parsing $dist/$section => Sources.gz\n"; |
print "\nI'm parsing $dist/$section => Sources.gz\n"; |
| 204 |
$buff1 .= $line; |
$buff1 .= $line; |
| 205 |
} |
} |
| 206 |
if (preg_match($regexp,$buff1,$matches)) { |
if (preg_match($regexp,$buff1,$matches)) { |
| 207 |
|
if (isset($pkgs[$matches[1]])) |
| 208 |
|
continue; |
| 209 |
|
else |
| 210 |
|
$pkgs[$matches[1]] = 1; |
| 211 |
if ($matches[5]) { |
if ($matches[5]) { |
| 212 |
$matches[5]=iconv("ISO-8859-1","UTF-8",$matches[5]); |
$matches[5]=iconv("ISO-8859-1","UTF-8",$matches[5]); |
| 213 |
$matches[5]=pg_escape_string($matches[5]); |
$matches[5]=pg_escape_string($matches[5]); |