/[dehs]/trunk/dehs_pg.php
ViewVC logotype

Diff of /trunk/dehs_pg.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 44 by evaso-guest, Fri Aug 3 15:50:04 2007 UTC revision 45 by evaso-guest, Fri Aug 3 22:37:29 2007 UTC
# Line 280  return array("md5"=>$matches[1],"bytes"= Line 280  return array("md5"=>$matches[1],"bytes"=
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;
# Line 507  function up_changes($src_name='%') { Line 523  function up_changes($src_name='%') {
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) {
# Line 542  function uscan_foo($name,$version,$watch Line 559  function uscan_foo($name,$version,$watch
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);

Legend:
Removed from v.44  
changed lines
  Added in v.45

  ViewVC Help
Powered by ViewVC 1.1.5