"only update same major version"

This commit is contained in:
Ralf Becker 2010-03-05 16:22:10 +00:00
parent c97400f881
commit c1c5095d52

View File

@ -119,7 +119,7 @@ function do_obs()
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($config['obs'])) as $path)
{
if (basename(dirname($path)) != '.osc' &&
preg_match('/\/('.preg_quote($config['packagename']).'[a-z-]*)-[0-9.-]+(\.tar\.(gz|bz2))$/',$path,$matches) &&
preg_match('/\/('.preg_quote($config['packagename']).'[a-z-]*)-'.preg_quote($config['version']).'\.[0-9]+(\.tar\.(gz|bz2))$/',$path,$matches) &&
file_exists($new_name=$config['sourcedir'].'/'.$matches[1].'-'.$config['version'].'.'.$config['packaging'].$matches[2]))
{
if (basename($path) != basename($new_name))