Bug 1002694 - pkgdb-cli orphan --retire toggles retirement state
pkgdb-cli orphan --retire toggles retirement state
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: packagedb-cli (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pierre-YvesChibon
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-29 13:51 EDT by Till Maas
Modified: 2013-11-27 16:23 EST (History)
2 users (show)

See Also:
Fixed In Version: packagedb-cli-1.6.0-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-18 09:05:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
remove duplicate code in retire codepath (2.25 KB, patch)
2013-09-05 16:22 EDT, Till Maas
no flags Details | Diff
Adjustments to make retire work as expected (1.75 KB, patch)
2013-09-07 04:35 EDT, Till Maas
no flags Details | Diff

  None (edit)
Description Till Maas 2013-08-29 13:51:27 EDT
Description of problem:
pkgdb-cli orphan --retire toggles the retirement state instead of ensuring that the package will be retired. This will cause unexpected behaviour if a cvsadmin used "fedpkg retire" on a branch that has been retired in packagedb but does not contain a dead.package file. Please change the command to never unretire a package, e.g. by checking whether a packge is already retired before trying to retire it.
Comment 1 Pierre-YvesChibon 2013-09-05 06:20:11 EDT
This should be fixed in git, I would be most grateful if you could test it :)
Comment 2 Till Maas 2013-09-05 16:22:15 EDT
Created attachment 794498 [details]
remove duplicate code in retire codepath

I applied the attached patch to remove the duplicate code from packagedb that confuses me.

If I understand the code correcty, it checks whether the branch the package should be retired in is in _get_active_branches(packagename, 1). This is the result for easymock3, which is currently retired in f20 (deprecated, statuscode 20) and orphaned in devel (statuscode 14), however "devel" is not in the result but f20 is:

In [1]: _get_active_branches("easymock3", 1)
Out[1]: [u'f18', u'f20', u'f19']

Also the package is approved in f19 (statuscode 3), so the check does not make sense. Instead of spending too much time in debugging/enhancing this, I want to try if it is possible to adapt packagedb to allow to sanely retire packages directly:
https://github.com/fedora-infra/packagedb/issues/12
Comment 3 Pierre-YvesChibon 2013-09-06 01:39:02 EDT
Hi Till,

Thanks for the patch, it's applied and pushed in git.

I see now that I was checking the status of the collection rather than the status of the package. Should be fixed in git now.

>>> _get_active_branches("easymock3", 20)
[u'f18', u'f19', u'devel']
Comment 4 Till Maas 2013-09-07 04:35:52 EDT
Created attachment 795085 [details]
Adjustments to make retire work as expected

With this patch retirement seems to work as expected with the current git.
Comment 5 Fedora Update System 2013-09-07 05:20:15 EDT
packagedb-cli-1.6.0-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.el5
Comment 6 Fedora Update System 2013-09-07 05:20:41 EDT
packagedb-cli-1.6.0-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.fc19
Comment 7 Fedora Update System 2013-09-07 05:21:03 EDT
packagedb-cli-1.6.0-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.fc18
Comment 8 Fedora Update System 2013-09-07 05:21:30 EDT
packagedb-cli-1.6.0-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.fc20
Comment 9 Fedora Update System 2013-09-07 05:21:52 EDT
packagedb-cli-1.6.0-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/packagedb-cli-1.6.0-1.el6
Comment 10 Fedora Update System 2013-09-07 13:04:30 EDT
Package packagedb-cli-1.6.0-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing packagedb-cli-1.6.0-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-16044/packagedb-cli-1.6.0-1.fc20
then log in and leave karma (feedback).
Comment 11 Fedora Update System 2013-09-18 09:05:03 EDT
packagedb-cli-1.6.0-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2013-09-18 09:08:38 EDT
packagedb-cli-1.6.0-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2013-09-22 19:49:09 EDT
packagedb-cli-1.6.0-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2013-11-27 16:19:47 EST
packagedb-cli-1.6.0-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2013-11-27 16:23:37 EST
packagedb-cli-1.6.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.