From ff3fdfe07c8cd6c095653ad29523121a63c222d9 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Thu, 10 Feb 2011 23:06:26 +0000 Subject: [PATCH] Really make britney2 work with python 2.5 PyDict_Next()'s ppos argument should be a Py_ssize_t, not an int. With this change, britney2 no longer believes that all packages are uninstallable. --- britney.py | 2 +- lib/britney-py.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/britney.py b/britney.py index d377dad..5970d8a 100755 --- a/britney.py +++ b/britney.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.5 # -*- coding: utf-8 -*- # Copyright (C) 2001-2008 Anthony Towns diff --git a/lib/britney-py.c b/lib/britney-py.c index 3a2b915..69de370 100644 --- a/lib/britney-py.c +++ b/lib/britney-py.c @@ -1,6 +1,4 @@ -// XXX Please notify DSA once britney2 moves to Python2.5, so that -// they can uninstall python2.4-dev from ftp-master. -#include +#include #include "dpkg.h" @@ -945,7 +943,7 @@ static PyObject *apt_versioncmp(PyObject *self, PyObject *args) { ******************************************************/ static PyObject *build_system(PyObject *self, PyObject *args) { - int pos = 0; + Py_ssize_t pos = 0; char *arch; PyObject *pkgs, *key, *value, *pyString;