From: Zac Medico Date: Tue, 2 Mar 2010 20:34:07 +0000 (-0000) Subject: Make dep_getkey() recommend cpv_getkey() if given a cpv. (trunk r15380) X-Git-Tag: v2.1.8~115 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=53e4843128571825ff9140248a5ac3e73ff760aa;p=portage.git Make dep_getkey() recommend cpv_getkey() if given a cpv. (trunk r15380) svn path=/main/branches/2.1.7/; revision=15607 --- 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") % \