<div dir="ltr">Hello All,<br><br>I would like to write a method which will check to see if a repository exists and enable it. My current scenario is that I want to install a specific software package from a repo that is in my repo list but currently disabled. Currently, the way PackageKit enables repositories is by REPO_ID. The method &quot;pk_client_repo_enable()&quot; takes a string value which is checked against the REPO_ID&#39;s of existing repo&#39;s and (in Fedora 9 with YUM) if it matches, it sets the &quot;enabled&quot; flag of the corresponding repo to &quot;1&quot;. This poses a problem for me since I want to ensure that the REPO_URL of the repository record on the system matches the URL of the repository data I am checking against, not just the REPO_ID.<br>
<br>For example, in the possible occurence that the REPO_ID of a repository is not the &quot;standard&quot; REPO_ID name (i.e., if I changed the default fedora REPO_ID from &quot;fedora&quot; to &quot;fedora9&quot;), an attempt to call the method &quot;pk_client_repo_enable()&quot; using the REPO_ID=&quot;fedora&quot; will fail with the error &quot;Error: repo-not-found : Error getting repository data for fedora, repository not found&quot;. Although arbitrary changing of the REPO_ID is not likely to happen often, it is possible. <br>
<br>I would like to know if this has been considered at all and/or if a workaround exists. Is it currently possible to verify a repository exists based upon the URL instead of the REPO_ID? If not, would a function such as &quot;pk_client_repo_exists()&quot; using URL matching be useful? Or, maybe adding &quot;repo_url&quot; as a variable returned by &quot;pk_client_repo_list()&quot; through the &quot;repo-detail&quot; callback signal would be better?<br>
<br>Please comment and advise on how I may possibly solve this problem.<br><br>Thank you all for your comments.<br><br>P.S. I am currently working on Fedora 9 with the 0.2.X stable branch.<br><br>Dorian<br><br><br></div>