diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-19 09:43:36 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-19 09:43:36 +0000 |
commit | 2c9b760f23bef66492e13c87844462b9e5e7733c (patch) | |
tree | 58833cc4e147a0986d0f2800d39e8c5ff69d7455 | |
parent | 0f89a14b8e0c9d512a71bb93a821d9d1709f4f57 (diff) | |
download | portage-2c9b760f23bef66492e13c87844462b9e5e7733c.tar.gz portage-2c9b760f23bef66492e13c87844462b9e5e7733c.tar.bz2 portage-2c9b760f23bef66492e13c87844462b9e5e7733c.zip |
Make dep_getkey() recommend cpv_getkey() if given a cpv.
svn path=/main/trunk/; revision=15380
-rw-r--r-- | pym/portage/dep.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py index fe3f04f59..47da7cedb 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -937,9 +937,14 @@ def dep_getkey(mydep): return Atom(mydep).cp except InvalidAtom: try: - return Atom('=' + mydep).cp + atom = Atom('=' + mydep) except InvalidAtom: pass + else: + warnings.warn(_("invalid input to %s: '%s', use %s instead") % \ + ('portage.dep.dep_getkey()', mydep, 'portage.cpv_getkey()'), + DeprecationWarning) + return atom.cp # Fall back to legacy code for backward compatibility. warnings.warn(_("%s is deprecated, use %s instead") % \ |