| 280 |
} |
} |
| 281 |
|
|
| 282 |
function vers_conv($debvers) { |
function vers_conv($debvers) { |
| 283 |
preg_match("/(.+:)?([^-]+)(ds|dsfg|debian)/",$debvers,$matches); |
/* preg_match("/(.+:)?([^-]+)(ds|dsfg|debian)/",$debvers,$matches); |
| 284 |
if (!$matches[3]) { |
if (!$matches[3]) { |
| 285 |
unset($matches); |
unset($matches); |
| 286 |
preg_match("/(.+:)?([^-]+)/",$debvers,$matches); |
preg_match("/(.+:)?([^-]+)/",$debvers,$matches); |
| 287 |
} |
} |
| 288 |
if (substr($matches[2],-1)=='.') $matches[2]=substr($matches[2],0,-1); |
if (substr($matches[2],-1)=='.') $matches[2]=substr($matches[2],0,-1); |
| 289 |
return $matches[2]; |
return $matches[2]; |
| 290 |
|
*/ |
| 291 |
|
// Strip off the epoch |
| 292 |
|
$pos = strpos($debvers, ':'); |
| 293 |
|
if ( $pos !== FALSE) { |
| 294 |
|
$debvers = substr($debvers, $pos+1); |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
// strip off the Debian revision (look from the back of the string) |
| 298 |
|
$pos = strrpos($debvers, '-'); |
| 299 |
|
if ( $pos !== FALSE) { |
| 300 |
|
$debvers = substr($debvers, 0, $pos); |
| 301 |
|
} |
| 302 |
|
|
| 303 |
|
// strip off repacking indicators |
| 304 |
|
$debvers = preg_replace("/[-.+~]?(ds|dfsg|debian)(.*)/i", "", $debvers); |
| 305 |
|
return $debvers; |
| 306 |
} |
} |
| 307 |
function check_db() { |
function check_db() { |
| 308 |
global $dirs,$dbconn; |
global $dirs,$dbconn; |
| 523 |
$tot--; |
$tot--; |
| 524 |
print "Packages Left: " . $tot-- . " Found: $found Not found: $notfound Not Down: $notdown\r"; |
print "Packages Left: " . $tot-- . " Found: $found Not found: $notfound Not Down: $notdown\r"; |
| 525 |
#print "\n Not Downlaoded: $res_array[up_url]\n"; |
#print "\n Not Downlaoded: $res_array[up_url]\n"; |
| 526 |
|
unlink($localfile); |
| 527 |
continue; |
continue; |
| 528 |
} |
} |
| 529 |
foreach($changes_files as $filename) { |
foreach($changes_files as $filename) { |
| 559 |
|
|
| 560 |
fwrite($fw,$watch); |
fwrite($fw,$watch); |
| 561 |
fclose($fw); |
fclose($fw); |
| 562 |
$uscan_res=shell_exec($base . "uscan --dehs --package $name --upstream-version " . vers_conv($version) . " --watchfile $tmpnam 2>/dev/null 2>&1"); |
$uscan_res=shell_exec("uscan --dehs --package $name --upstream-version " . vers_conv($version) . " --watchfile $tmpnam 2>/dev/null 2>&1"); |
| 563 |
unlink($tmpnam); |
unlink($tmpnam); |
| 564 |
$p = xml_parser_create(); |
$p = xml_parser_create(); |
| 565 |
xml_parse_into_struct($p, $uscan_res, $vals, $index); |
xml_parse_into_struct($p, $uscan_res, $vals, $index); |