trying to figure out hoe i group os's and stuff
[glcas.git] / plugins / repo.php
index c85ff12..fea1c4f 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 $URL_HANDLERS["*"] = "GLCASRepo";
 
+
 class GLCASRepo {
        function __construct($config)
        {
@@ -18,7 +19,7 @@ class GLCASRepo {
                echo "for the repo, i am the repo $url";
        }
        
-       function getRepoDetailsYum($url)
+       function getRepoDetailsYum($url, $ismirrorlist=false)
        {
                $actionurl = $url."/repodata/repomd.xml";
                
@@ -26,9 +27,16 @@ class GLCASRepo {
                
                $ld = file_get_contents($actionurl);
                
+               // so here we try and get what this repository provides (os, version, arch), for yum this
+               // should come straight off the url... i.e. centos/6.0/os/x86_64/ (centos, 6.0, base os, 64bit arch)
+               
                if(!$ld) return false;
                
-               return $ld;
+               $glt["OS"] = "Fedora";
+               $glt["version"] = "15";
+               $glt["arch"] = "x86_64";
+               
+               return $glt;
        }
        
        private $config;