Ignore updates which do not have architecture and build specified
This commit is contained in:
parent
ccfb9c1b3e
commit
251f30406e
21
fetchupd.php
21
fetchupd.php
@ -43,15 +43,7 @@ function uupFetchUpd(
|
||||
$ids['builds'] = array();
|
||||
}
|
||||
|
||||
$ids = $ids['builds'];
|
||||
foreach($ids as $val) {
|
||||
$builds[] = $val['build'];
|
||||
}
|
||||
|
||||
$builds = array_unique($builds);
|
||||
rsort($builds);
|
||||
|
||||
$build = $builds[0];
|
||||
$build = $ids['builds'][0]['build'];
|
||||
unset($builds, $ids);
|
||||
}
|
||||
|
||||
@ -193,9 +185,9 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
||||
}
|
||||
|
||||
preg_match('/ProductReleaseInstalled Name\="(.*?)\..*\.(.*?)" Version\="10\.0\.(.*?)"/', $updateInfo, $info);
|
||||
$foundType = strtolower($info[1]);
|
||||
$foundArch = strtolower($info[2]);
|
||||
$foundBuild = $info[3];
|
||||
$foundType = @strtolower($info[1]);
|
||||
$foundArch = @strtolower($info[2]);
|
||||
$foundBuild = @$info[3];
|
||||
|
||||
$updateTitle = preg_grep('/<Title>.*<\/Title>/', $updateMeta);
|
||||
sort($updateTitle);
|
||||
@ -267,6 +259,11 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
||||
consoleLogger("Update ID: ".$updateString);
|
||||
consoleLogger("--- UPDATE INFORMATION ---");
|
||||
|
||||
if((!$foundBuild) && (!$foundArch)) {
|
||||
consoleLogger('No architecture nor build number specified! What the hell is this?');
|
||||
return array('error' => 'BROKEN_UPDATE');
|
||||
}
|
||||
|
||||
if(preg_match('/Corpnet Required/i', $updateTitle)) {
|
||||
consoleLogger('Skipping corpnet only update...');
|
||||
return array('error' => 'CORPNET_ONLY_UPDATE');
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
function uupApiVersion() {
|
||||
return '1.27.1';
|
||||
return '1.27.2';
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__).'/auths.php';
|
||||
|
@ -108,6 +108,10 @@ function branchFromBuild($build) {
|
||||
$branch = '19h1_release';
|
||||
break;
|
||||
|
||||
case 18363: //18363 is a fake build based on 18362
|
||||
$branch = '19h1_release';
|
||||
break;
|
||||
|
||||
default:
|
||||
$branch = 'rs_prerelease';
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user