webbuild minor fixes/changes

This commit is contained in:
Silvan Calarco 2019-02-02 11:18:39 +01:00
parent 4a3e61c551
commit dd25ac7678
3 changed files with 8 additions and 2 deletions

View File

@ -16,4 +16,4 @@ if (!$repo || !$arch) {
foreach ($basedirs as $basedir) { foreach ($basedirs as $basedir) {
echo $basedir . $repo . "/RPMS." . $arch . "/" . "\n"; echo $basedir . $repo . "/RPMS." . $arch . "/" . "\n";
} }
?> ?>

View File

@ -78,6 +78,8 @@ function suggestSpecName(url) {
specname="perl-"+specname; specname="perl-"+specname;
} else if (url.search("haskell.org") >= 0) { } else if (url.search("haskell.org") >= 0) {
specname="ghc-"+specname; specname="ghc-"+specname;
} else if (url.search("pypi") >= 0) {
specname="python-"+specname.replace('.','-');
} else if (extension == "gem") { } else if (extension == "gem") {
specname="ruby-"+specname; specname="ruby-"+specname;
} else { } else {
@ -115,7 +117,7 @@ function suggestSpecName(url) {
if (document.getElementById("speccreatetype").options[j].value == "perl") if (document.getElementById("speccreatetype").options[j].value == "perl")
document.getElementById("speccreatetype").options[j].selected=true; document.getElementById("speccreatetype").options[j].selected=true;
}; };
} else if ((specname.search("python-") >= 0) || (specname.substring(0,2) == "py")) { } else if ((specname.search("python-") >= 0) || (specname.substring(0,2) == "py") || (url.search("pypi") >= 0)) {
for (var j=0;j<document.getElementById("speccreatetype").length;j++) { for (var j=0;j<document.getElementById("speccreatetype").length;j++) {
if (document.getElementById("speccreatetype").options[j].value == "python") if (document.getElementById("speccreatetype").options[j].value == "python")
document.getElementById("speccreatetype").options[j].selected=true; document.getElementById("speccreatetype").options[j].selected=true;

View File

@ -211,6 +211,10 @@ function webbuild_status_getvalues() {
xmlhttp.onreadystatechange = function() { xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState != 4) if (xmlhttp.readyState != 4)
return; return;
if (xmlhttp.responseXML == undefined) {
console.log("RESPONSE ERROR: check URL " + url);
return;
}
var xmldoc = xmlhttp.responseXML.documentElement; var xmldoc = xmlhttp.responseXML.documentElement;
if (xmldoc == undefined) { if (xmldoc == undefined) {
return; return;