X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=plugins%2Frepo.php;h=27ae54c82786fd4cce3849db37d945166b29b9d0;hp=54f35576f54406b614458f90b3797b60edc041c9;hb=671e643949bab1c87d175bfc98ff086deb9c44ff;hpb=5e260ebc1ad6b785b3ef47599c7a9202ccb12b8b diff --git a/plugins/repo.php b/plugins/repo.php index 54f3557..27ae54c 100644 --- a/plugins/repo.php +++ b/plugins/repo.php @@ -754,6 +754,39 @@ class GLCASRepo { } else return false; } + + function getRepoDetailsApt($url) + { + $action1 = $url."/dists"; + + // we just want to make sure it exists really + error_log("in repo details apt for $url"); + if(!glcas_isRemoteDir($action1)) { + //echo "I cant find any valid APT dists's at $url
"; + return false; + } + + // ok, now scan for ubuntu dists as + $kos = getKnownOSList(); + + $repos = 0; + $existing_repo["isrepo"] = true; + foreach($kos["apt"] as $key => $val) { + //echo "
$key, $val
"; + //echo "now check, $action1/$key"; + if(glcas_isRemoteDir($action1."/$key")) { + $existing_repos["knownrepo"][$repos] = $key; + $repos++; + //echo "Found Distro $val
"; + } + } + $existing_repos["nrepos"] = $repos; + $existing_repos["distros"] = "Ubuntu, Debian"; + + + return $existing_repos; + + } function getRepoDetailsYum($url, $ismirrorlist=false) {