fedora-infra / pkgdb2

Updated version of the Package Database
https://admin.fedoraproject.org/pkgdb/
GNU General Public License v2.0
23 stars 26 forks source link

API for querying if a package is allowed to be retired #397

Closed tkdchen closed 7 years ago

tkdchen commented 8 years ago

An issue was reported to fedpkg for the retire command. That suggests a way for fedpkg to determine if package on specific branch can be retired before actually retire it in dist-git.

I find the /api/package/retire/, but it actually reports a package cannot be retried after a real retire operation. From fedpkg point of view, this may not be a good way. That is, fedpkg just needs to know whether a package on specific branch can be retired and do not retire it actually.

Is such an API already available? If no, this issue will be a request for this new API.

Thanks.

pypingou commented 8 years ago

https://admin.fedoraproject.org/pkgdb/api/#list_collections allows to get information about collection, the info returned looks like:

{
  "collections": [
    {
      "allow_retire": true,
      "branchname": "master",
      "date_created": "2014-05-14 12:36:15",
      "date_updated": "2016-07-26 13:49:20",
      "dist_tag": ".fc26",
      "koji_name": "rawhide",
      "name": "Fedora",
      "status": "Under Development",
      "version": "devel"
    },
...

See "allow_retire": true, in there. You can then filter by collection Under Development all the time since the others are not allowing retirement (for Fedora, for EPEL they always do allow retirement).

pypingou commented 8 years ago

Was my answer satisfactory for your needs?

pypingou commented 7 years ago

I'm closing to close this ticket assuming it did answer your question.

If it did not, please reopen :)

tkdchen commented 7 years ago

@pypingou Thanks for your reply.

pypingou commented 7 years ago

Sure thing :)