[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Any way to tweak build apt-listchanges for testing [Partial Results]



I have some partial success to report.
On Wed, Oct 08, 2003 at 11:23:00PM -0700, Ross Boylan wrote:
> apt-listchanges is one of my favorite utilities.  Thanks to all the
> developers.
> 
> This leads to my dilemma. I want it, but I don't have it.  I'm
> wondering if I could tweak the build process a bit and get it working.
> 
> Background
> 
> I recently updated apt to current testing (this was to fix a bug in
> aptitude), and this knocked out apt-listchanges.  I really would like
> to get it back.  It needs python 2.3, and that just won't migrate down
> (I was watching the clock tick down on it, but I see now it's held up
> because of build problems on various architectures.  I'm getting the
> feeling the long wait will continue).
> 
> My system is basically testing level, though with lots of packages
> less than current because of dependency issues.
> 
> I have python2.3 (2.2.106-2beta2) on my system.  It's just the python
> package itself is not at 2.3 (unless the needed 2.3 features were not
> present in the earlier releases?).
> 
> 
> Plan
> 
> So I'm wondering if there's a way to get a working apt-listchanges on
> my system with my current software.  I'm thinking of doing this
> (building from source): 
> 1) edit the control file to depend on python2.3 instead of python (>= 2.3).
> 2) maybe I need to update-alternatives to make 2.3 my default python?
> or edit /usr/bin/python -> /usr/bin/python2.3 in the opening #! of all
> the python files for apt-listchanges
> 3) build it and use it.
> 
> Nuts: I just noticed python-apt got zapped too; I guess I need to
> solve that for apt-listchanges to work.  Maybe a similar strategy for
> it? 
> 
> As you can see, my basic thought is that since I have python 2.3, I
> should be able to work around these problems.
> 
> Does this seem like a do-able strategy?  Or just asking for trouble?
> Any tips?
> 
> Thanks.
> 
> P.S. If you could cc me it would be great, as I'm not a subscriber to
> this list.  I will be checking it, though.
> 

I installed python2.3-dev in testing and applied the attached patches
(to the unstable sources) to try to get apt-listchanges and python-apt
to use python2.3 rather than python (>=2.3), since the latter is
unavailable in testing.  The build script for python-apt already
references python2.3 explicitly, so I made only  one change to that
package source.

I built the two packages and dpkg -i'd them.  When I tried to run apt
I got the following:

Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 35, in ?
    import apt_listchanges
  File "/usr/lib/python2.3/site-packages/apt_listchanges.py", line 9, in ?
    import email.Message
  File "/usr/lib/python2.3/email/Message.py", line 17, in ?
    from email import Charset
  File "/usr/lib/python2.3/email/Charset.py", line 6, in ?
    import email.base64MIME
  File "/usr/lib/python2.3/email/base64MIME.py", line 31, in ?
    from email._compat22 import _floordiv
ImportError: No module named _compat22
Preconfiguring packages ...

The python email package changes rapidly; I suspect what's happened is
that the the version in the testing python2.3  differs from that
in unstable.

There were also some compiler warnings that may indicate similar drift
at the C level (for python-apt).  I don't know if they're significant:
-------------------------------------------
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/sourcelist.cc -o build/temp.linux-i686-2.3/python/sourcelist.o
python/sourcelist.cc: In function `PyObject* PkgSourceListFindIndex(PyObject*, 
   PyObject*)':
python/sourcelist.cc:30: warning: unused variable `PkgSourceListStruct&Struct'
python/sourcelist.cc: In function `PyObject* GetPkgSourceList(PyObject*, 
   PyObject*)':
python/sourcelist.cc:76: warning: `PyObject*Owner' might be used uninitialized 
   in this function
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/apt_pkgmodule.cc -o build/temp.linux-i686-2.3/python/apt_pkgmodule.o
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/pkgsrcrecords.cc -o build/temp.linux-i686-2.3/python/pkgsrcrecords.o
python/pkgsrcrecords.cc: In function `PyObject* GetPkgSrcRecords(PyObject*, 
   PyObject*)':
python/pkgsrcrecords.cc:111: warning: `PyObject*Owner' might be used 
   uninitialized in this function
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/string.cc -o build/temp.linux-i686-2.3/python/string.o
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/configuration.cc -o build/temp.linux-i686-2.3/python/configuration.o
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/tag.cc -o build/temp.linux-i686-2.3/python/tag.o
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/cache.cc -o build/temp.linux-i686-2.3/python/cache.o
creating build/lib.linux-i686-2.3
gcc -pthread -shared build/temp.linux-i686-2.3/python/apt_pkgmodule.o build/temp.linux-i686-2.3/python/configuration.o build/temp.linux-i686-2.3/python/generic.o build/temp.linux-i686-2.3/python/tag.o build/temp.linux-i686-2.3/python/string.o build/temp.linux-i686-2.3/python/cache.o build/temp.linux-i686-2.3/python/pkgrecords.o build/temp.linux-i686-2.3/python/pkgsrcrecords.o build/temp.linux-i686-2.3/python/sourcelist.o -lapt-pkg -o build/lib.linux-i686-2.3/apt_pkg.so
building 'apt_inst' extension
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/apt_instmodule.cc -o build/temp.linux-i686-2.3/python/apt_instmodule.o
gcc -pthread -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -I/usr/include/python2.3 -c python/tar.cc -o build/temp.linux-i686-2.3/python/tar.o
python/tar.cc: In member function `virtual bool 
   ProcessTar::DoItem(pkgDirStream::Item&, int&)':
python/tar.cc:45: warning: `const char*Type' might be used uninitialized in 
   this function
---------------------------------------------------

I'm cc'ing debian-python in hopes someone there might shed some light
on this.

I also see on python-devel references to python2.3 coming through on
Wed, so I might just wait for it.  The problem, at the moment, is that
even if python2.3 does migrate I'll have a huge (100 packages
currently) upgrade without the benefit of apt-listchanges, before a
working one gets reinstalled :(
diff -Naurx '*~' apt-listchanges-2.42/apt-listchanges apt-listchanges-2.42rb/apt-listchanges
--- apt-listchanges-2.42/apt-listchanges	2003-08-16 21:53:47.000000000 -0700
+++ apt-listchanges-2.42rb/apt-listchanges	2003-10-13 23:09:19.000000000 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2.3
 
 #
 #      apt-listchanges - Show changelog entries between the installed versions
diff -Naurx '*~' apt-listchanges-2.42/debian/control apt-listchanges-2.42rb/debian/control
--- apt-listchanges-2.42/debian/control	2003-08-15 18:41:23.000000000 -0700
+++ apt-listchanges-2.42rb/debian/control	2003-10-13 23:10:28.000000000 -0700
@@ -7,7 +7,7 @@
 
 Package: apt-listchanges
 Architecture: all
-Depends: python (>= 2.3), apt (>= 0.5.3), python-apt, debconf, ucf
+Depends: python2.3, apt (>= 0.5.3), python-apt, debconf, ucf
 Suggests: x-terminal-emulator, www-browser, debianutils
 Description: Display new Debian changelog entries from .deb archives
  apt-listchanges is a tool to show what has been changed in a new
diff -Naurx '*~' apt-listchanges-2.42/debian/prerm apt-listchanges-2.42rb/debian/prerm
--- apt-listchanges-2.42/debian/prerm	2002-02-16 10:36:59.000000000 -0800
+++ apt-listchanges-2.42rb/debian/prerm	2003-10-13 23:11:36.000000000 -0700
@@ -2,8 +2,8 @@
 
 set -e
 
-rm -f /usr/lib/site-python/DebianControlParser.pyc \
-      /usr/lib/site-python/apt_listchanges.pyc
+rm -f /usr/lib/python2.3/site-packages/DebianControlParser.pyc \
+      /usr/lib/python2.3/site-packages/apt_listchanges.pyc
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
diff -Naurx '*~' apt-listchanges-2.42/Makefile apt-listchanges-2.42rb/Makefile
--- apt-listchanges-2.42/Makefile	2003-08-15 18:41:22.000000000 -0700
+++ apt-listchanges-2.42rb/Makefile	2003-10-13 23:08:47.000000000 -0700
@@ -6,9 +6,9 @@
 install: all
 	install -d $(DESTDIR)/usr/bin
 	install -m 755 apt-listchanges $(DESTDIR)/usr/bin
-	install -d $(DESTDIR)/usr/lib/site-python
+	install -d $(DESTDIR)/usr/lib/python2.3/site-packages
 	install -m 644 DebianControlParser.py apt_listchanges.py \
-		$(DESTDIR)/usr/lib/site-python
+		$(DESTDIR)/usr/lib/python2.3/site-packages
 	install -d $(DESTDIR)/etc/apt/apt.conf.d
 	install -m 644 debian/apt.conf \
 		$(DESTDIR)/etc/apt/apt.conf.d/20listchanges
diff -Naurx '*~' apt-listchanges-2.42/po/Makefile apt-listchanges-2.42rb/po/Makefile
--- apt-listchanges-2.42/po/Makefile	2002-01-15 16:19:14.000000000 -0800
+++ apt-listchanges-2.42rb/po/Makefile	2003-10-13 23:06:50.000000000 -0700
@@ -22,7 +22,7 @@
 CC = gcc
 GENCAT = gencat
 MSGFMT = /usr/bin/msgfmt --statistics
-XGETTEXT = /usr/share/doc/python2.2/examples/Tools/i18n/pygettext.py
+XGETTEXT = /usr/share/doc/python2.3/examples/Tools/i18n/pygettext.py
 MSGMERGE = msgmerge
 
 POFILES =  $(wildcard *.po)
diff -Naurx '*~' python-apt-0.5.8/debian/control python-apt-0.5.8rb/debian/control
--- python-apt-0.5.8/debian/control	2003-08-08 06:01:59.000000000 -0700
+++ python-apt-0.5.8rb/debian/control	2003-10-13 23:51:32.000000000 -0700
@@ -4,7 +4,7 @@
 Maintainer: APT Development Team <deity@lists.debian.org>
 Uploaders: Matt Zimmerman <mdz@debian.org>
 Standards-Version: 3.1.1
-Build-Depends: debhelper, libapt-pkg-dev (>= 0.5.5), apt-utils, python-dev (>= 2.3)
+Build-Depends: debhelper, libapt-pkg-dev (>= 0.5.5), apt-utils, python2.3-dev
 
 Package: python-apt
 Architecture: any
diff -Naurx '*~' python-apt-0.5.8/debian/python-dep python-apt-0.5.8rb/debian/python-dep
--- python-apt-0.5.8/debian/python-dep	2002-02-14 16:46:44.000000000 -0800
+++ python-apt-0.5.8rb/debian/python-dep	2003-10-14 00:01:07.000000000 -0700
@@ -1,6 +1,7 @@
 import sys;
 
 if sys.version[:3] != "1.5":
-	print "python:Depends=python (>= %s), python (<< %s)" % (sys.version[:3],float(sys.version[:3])+0.1)
+	#print "python:Depends=python (>= %s), python (<< %s)" % (sys.version[:3],float(sys.version[:3])+0.1)
+	print "python:Depends=python2.3"  # hack
 else:
 	print "python:Depends=python-base (>= 1.5) | python1.5"

Reply to: