[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#347624: DEHS: Error with a valid watch file



The problem of this bugs is in ext_watch() (a dehs function) that seem
doesn't catch watch file in some cases. This function try extract the
watch file from the diff.gz of the package name submitted. 
The function is quite simple and seems that doesn't work for package
that already have a watch file in the original upstream tar.gz. 
I'm quite busy in this days if anybody could send a little patch i could
apply to svn and the catch it on the running dehs alioth version. 
Here is the little function:

function ext_watch ($file,$pkg,$version){
        if (!file_exists($file)) return "";
        $zp=gzopen($file,"r") or die("Fail to open $file");
        while (!gzeof($zp)) {
                $line = gzgets ($zp,4096);
        if (preg_match("/\+\+\+\s.+\/debian\/watch/",$line)) {
                    $line = gzgets ($zp,4096);
                        preg_match ("/.+\+\d+\,(\d+)\s/",$line,
$watch_lenght);
                        for ($i = 1; $i <= $watch_lenght[1]; $i++)     
			{
                                $line=gzgets ($zp,4096);
                                $watch .=substr($line,1);
                        }		
                break;
            }
        }
	if ($watch!=null) return $watch;
	else return NULL;
}



Reply to: