diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2011-03-05 23:46:44 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2011-03-05 23:46:44 +0000 |
commit | 75d70fe34ef8b367435a8b337aeb7df8c0c07945 (patch) | |
tree | 4164aa38d10740538b7c19df49b3b93f2bcae55c | |
parent | Set SUPPORT_PYTHON_ABIS (bug #308299). (diff) | |
download | gentoo-2-75d70fe34ef8b367435a8b337aeb7df8c0c07945.tar.gz gentoo-2-75d70fe34ef8b367435a8b337aeb7df8c0c07945.tar.bz2 gentoo-2-75d70fe34ef8b367435a8b337aeb7df8c0c07945.zip |
Fix md5 deprecation warning (bug #308299).
(Portage version: 2.2.0_alpha26_p6/cvs/Linux x86_64)
-rw-r--r-- | app-arch/ipkg-utils/ChangeLog | 6 | ||||
-rw-r--r-- | app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch | 30 | ||||
-rw-r--r-- | app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild | 3 |
3 files changed, 37 insertions, 2 deletions
diff --git a/app-arch/ipkg-utils/ChangeLog b/app-arch/ipkg-utils/ChangeLog index 04af918740c5..a82ea5f4b60b 100644 --- a/app-arch/ipkg-utils/ChangeLog +++ b/app-arch/ipkg-utils/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-arch/ipkg-utils # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/ipkg-utils/ChangeLog,v 1.16 2011/03/05 23:42:42 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/ipkg-utils/ChangeLog,v 1.17 2011/03/05 23:46:44 arfrever Exp $ + + 05 Mar 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + ipkg-utils-1.7.050831-r1.ebuild, +files/ipkg-utils-1.7.050831-hashlib.patch: + Fix md5 deprecation warning (bug #308299). 05 Mar 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> ipkg-utils-1.7.050831-r1.ebuild: diff --git a/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch b/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch new file mode 100644 index 000000000000..e7cdf2de8c82 --- /dev/null +++ b/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib.patch @@ -0,0 +1,30 @@ +--- ipkg.py ++++ ipkg.py +@@ -36,12 +36,17 @@ + import os + import sys + import glob +-import md5 + import re + import string + import commands + from stat import ST_SIZE + ++try: ++ from hashlib import md5 ++except ImportError: ++ import md5 ++ md5 = md5.new ++ + class Version: + """A class for holding parsed package version information.""" + def __init__(self, epoch, version): +@@ -136,7 +141,7 @@ + + # compute the MD5. + f = open(fn, "r") +- sum = md5.new() ++ sum = md5() + while 1: + data = f.read(1024) + if not data: break diff --git a/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild b/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild index 5a40a361ab77..192841f4375a 100644 --- a/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild +++ b/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild,v 1.3 2011/03/05 23:42:42 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild,v 1.4 2011/03/05 23:46:44 arfrever Exp $ EAPI="3" PYTHON_DEPEND="2" @@ -32,6 +32,7 @@ PYTHON_MODNAME="ipkg.py" src_prepare() { epatch "${FILESDIR}/${PN}-tar_call_fixes.patch" + epatch "${FILESDIR}/${P}-hashlib.patch" sed '/python setup.py build/d' -i Makefile |