Considering how the quick time update process almost fails on every appveyor build run, I think we need to find another location to get the version and url from.
Anyone have any idea...
One of the things that could be done to minimize spam is:
try {
update
} catch {
on forbiden stuff just return nothing.
}
Alternative location would be better. Maybe we could utilize proxy for specific packages.
the problem with that try catch is if there is any other errors, it won't be catched though.
But I think that is perhaps a lesser evil right now.
I've added that try catch for now, but let's keep this open until an alternative location have been found.
You can catch specific errors and rethrow others.
try {1/0} catch { if ($_ -notmatch 'divide by zero') {throw $_} }
try {/0} catch { if ($_ -notmatch 'divide by zero') {throw $_} }
You should probably add some Write-Host in the script when you do this, so we can see that in report.
so in this case it would probably be something like I think:
try { update } catch { if ($_ -notmatch "Access Denied") { throw $_ } }
You should probably add some Write-Host in the script when you do this, so we can see that in report.
Sure, I'll add these later, busy with something else right now
try { update } catch {
if ($_ -notmatch "Access Denied") { throw $_ } }
Write-Host 'Access denied error while checking version ignored, package might have an update'
}
It should be seen in output of updateall report, althoguh I didn't check it.
I wonder if we should perhaps add something similiar for packages using sourceforge, as some of them fail quite often
Not a bad idea, IMO, although we should for start keep the number of such packages low to see how that approach behaves.
馃憤
I'll add a try catch just to a couple of packages using sourceforge for now, and we can see how it works out.
But it should definitelly show up in a report for that package output so we can search for it.
I've added it to the cdrtfe and jubler packages, I don't think we will see any difference until later tonight though.
I implemented changes in AU like this:
Write-Host and it will be seen in reportFor example:
try {
update -ChecksumFor 32
} catch {
if ($_ -match 'meh 123') {
Write-Host meh 123;
'ignore'
} else {throw $_}
}
should give
Path : C:\work\au-packages\eac
Name : eac
Updated : False
Pushed : False
RemoteVersion :
NuspecVersion : 1.3
Result : {ignored
eac - checking updates using au version 2016.12.1.192001
meh 123
}
Error :
NuspecPath : C:\work\au-packages\eac\eac.nuspec
NuspecXml : #document
I updated quicktime package to test this. However the AV run fails entire build:
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 'Quicktime' update script didn't return AUPackage but: char
I honestly do not understand this behavior nor it happens on my system whatever I do, its AV specific. So I will have to test this for longer on my repository that has few packages outdating every now and then so it will take time.
Shell we close this ? As far as I can see the package passes every day.
Plus it now has ignore.
yeah, we can close it now, although it would still be optimal to have an alternative location.