rpms/yum-arch/F-11 yum-arch-python26.patch, 1.1, 1.2 yum-arch.spec, 1.5, 1.6

Remi Collet remi at fedoraproject.org
Sat Sep 26 14:12:37 UTC 2009


Author: remi

Update of /cvs/extras/rpms/yum-arch/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25850

Modified Files:
	yum-arch-python26.patch yum-arch.spec 
Log Message:
fix python 2.6 warnings (#521869)

yum-arch-python26.patch:
 rpmUtils/oldUtils.py |    5 ++++-
 yum/__init__.py      |    2 +-
 yum/depsolve.py      |    2 +-
 yum/pgpmsg.py        |    9 +++++++--
 yum/repos.py         |    8 ++++----
 5 files changed, 17 insertions(+), 9 deletions(-)

Index: yum-arch-python26.patch
===================================================================
RCS file: /cvs/extras/rpms/yum-arch/F-11/yum-arch-python26.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- yum-arch-python26.patch	16 May 2009 19:06:40 -0000	1.1
+++ yum-arch-python26.patch	26 Sep 2009 14:12:34 -0000	1.2
@@ -52,3 +52,42 @@ diff -up yum-2.2.2/yum/repos.py.p26 yum-
          
          for repo in myrepos:
              if not hasattr(repo, 'cacheHandler'):
+--- yum-2.2.2/rpmUtils/oldUtils.py.orig	2009-05-16 20:10:54.000000000 +0100
++++ yum-2.2.2/rpmUtils/oldUtils.py	2009-09-08 15:19:47.494521706 +0100
+@@ -151,7 +151,10 @@
+     def _write_gzip_header(self):
+         self.fileobj.write('\037\213')             # magic header
+         self.fileobj.write('\010')                 # compression method
+-        fname = self.filename[:-3]
++        if self.name[-3:] != ".gz":
++            fname = self.name
++        else:
++            fname = self.name[:-3]
+         flags = 0
+         if fname:
+             flags = FNAME
+--- yum-2.2.2/yum/pgpmsg.py.orig	2009-05-16 20:10:54.000000000 +0100
++++ yum-2.2.2/yum/pgpmsg.py		2009-09-08 15:31:53.921273337 +0100
+@@ -13,7 +13,12 @@
+ ##You should have received a copy of the GNU General Public License
+ ##along with this program; if not, write to the Free Software
+ ##Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+-import string, struct, time, cStringIO, base64, types, sha
++import string, struct, time, cStringIO, base64, types
++try:
++    from hashlib import sha1 as sha
++except:
++    from sha import new as sha
++
+ 
+ debug = None
+ 
+@@ -385,7 +390,7 @@
+             #XXX do the v3 fingerprint here
+         
+         elif self.version == 4:
+-            s = sha.new()
++            s = sha()
+             s.update(self.pkttag)
+             s.update(struct.pack(">H", pkt_len))
+             s.update(msg[idx_save:idx_save+pkt_len])


Index: yum-arch.spec
===================================================================
RCS file: /cvs/extras/rpms/yum-arch/F-11/yum-arch.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- yum-arch.spec	16 May 2009 19:06:40 -0000	1.5
+++ yum-arch.spec	26 Sep 2009 14:12:35 -0000	1.6
@@ -1,10 +1,11 @@
 Summary:  Extract headers from rpm in a old yum repository
 Name:     yum-arch
 Version:  2.2.2
-Release:  6%{?dist}
+Release:  8%{?dist}
 License:  GPLv2+
 Group:    System Environment/Base
 Source0:  http://linux.duke.edu/projects/yum/download/2.2/yum-%{version}.tar.gz
+
 Patch1:   yum-arch-folder.patch
 Patch2:   yum-arch-python26.patch
 
@@ -52,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/%{name}*
 
 %changelog
+* Sat Sep 26 2009 Remi Collet <Fedora at FamilleCollet.com> - 2.2.2-8
+- fix python 2.6 warnings (#521869)
+
 * Sat May 16 2009 Remi Collet <Fedora at FamilleCollet.com> - 2.2.2-6
 - fix python 2.6 issue
 




More information about the fedora-extras-commits mailing list