autoupdate fails to download latest release (1.71) due to default release blacklist

- removed the default version blacklist regex from init (for future versions)

!!!  left existing update  blacklist setting untouched !!! 
(existing installation wanting autoupdate for 1.71 need to change blacklist in ConfigUpdate_p.html)

- moved old blacklist patch to migration.java
pull/1/head
reger 11 years ago
parent 7c7fbb9818
commit 46016fa153

@ -130,7 +130,7 @@ update.cycle = 168
# a version number blacklist can restrict automatic or guided updates to a specific # a version number blacklist can restrict automatic or guided updates to a specific
# range of version numbers. The restriction is done with a blacklist (standard regexpr) # range of version numbers. The restriction is done with a blacklist (standard regexpr)
# It is recommended to set this list to low developer version numbers # It is recommended to set this list to low developer version numbers
update.blacklist = ...[123] update.blacklist =
# a update can also restricted with a concept property, which can decide if an # a update can also restricted with a concept property, which can decide if an
# update is only valid if it either is a main release or any release including new development releases # update is only valid if it either is a main release or any release including new development releases
# Valid keywords are 'main' and 'any' # Valid keywords are 'main' and 'any'

@ -277,6 +277,12 @@ public class migration {
sb.setConfig("crawler.http.acceptLanguage", sb.getConfig("crawler.acceptLanguage","en-us,en;q=0.5")); sb.setConfig("crawler.http.acceptLanguage", sb.getConfig("crawler.acceptLanguage","en-us,en;q=0.5"));
sb.setConfig("crawler.http.acceptCharset", sb.getConfig("crawler.acceptCharset","ISO-8859-1,utf-8;q=0.7,*;q=0.7")); sb.setConfig("crawler.http.acceptCharset", sb.getConfig("crawler.acceptCharset","ISO-8859-1,utf-8;q=0.7,*;q=0.7"));
} }
// patch the blacklist because of a release strategy change from 0.7 and up
if ((value = sb.getConfig("update.blacklist","")).equals("....[123]")) {
value = ""; // no default (remove prev. setting "...[123]" as it hits "1.71" release, added 2014-04-13)
sb.setConfig("update.blacklist", value);
}
} }
/** /**

@ -132,12 +132,7 @@ public final class yacyRelease extends yacyVersion {
final yacyRelease latestmain = (releases.main.isEmpty()) ? null : releases.main.last(); final yacyRelease latestmain = (releases.main.isEmpty()) ? null : releases.main.last();
final yacyRelease latestdev = (releases.dev.isEmpty()) ? null : releases.dev.last(); final yacyRelease latestdev = (releases.dev.isEmpty()) ? null : releases.dev.last();
final String concept = sb.getConfig("update.concept", "any"); final String concept = sb.getConfig("update.concept", "any");
String blacklist = sb.getConfig("update.blacklist", "...[123]"); String blacklist = sb.getConfig("update.blacklist", "");
if (blacklist.equals("....[123]")) {
// patch the blacklist because of a release strategy change from 0.7 and up
blacklist = "...[123]";
sb.setConfig("update.blacklist", blacklist);
}
if ((manual) || (concept.equals("any"))) { if ((manual) || (concept.equals("any"))) {
// return a dev-release or a main-release // return a dev-release or a main-release
@ -151,7 +146,7 @@ public final class yacyRelease extends yacyVersion {
" is not more recent than installed release " + thisVersion().getName()); " is not more recent than installed release " + thisVersion().getName());
return null; return null;
} }
return latestdev; return latestdev;
} }
if (latestmain != null) { if (latestmain != null) {
// consider a main release // consider a main release

Loading…
Cancel
Save