Package: gnuradio-companion
Version: 3.2.2.dfsg-1+b1
Severity: serious
Tags: patch
Justification: 2
When starting grc, an exeption is raised:
(just last lines)
line 281, in get_flow_graph
return self.get_page().get_flow_graph()
AttributeError: 'NoneType' object has no attribute 'get_flow_graph'
The problem was reported on the GNU Radio mailing list on 2009-07-06
and was reported to be fixed by Jonathan Corgan the next day.
The relating messages are
Report:
http://lists.gnu.org/archive/html/discuss-gnuradio/2009-07/msg00060.html
Workaround:
http://lists.gnu.org/archive/html/discuss-gnuradio/2009-07/msg00063.html
Fix Report:
http://lists.gnu.org/archive/html/discuss-gnuradio/2009-07/msg00069.html
It's a problem with the preferences parser.
Attached is the diff of the tag release 3.2.2 to release 3.2.1 of the debian
directory.
I was able to fix the problem in doing the 'install' command from the rules
file with
the prefs.py file.
Regards
Patrick
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-1-686 (SMP w/1 CPU core)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gnuradio-companion depends on:
ii gnuradio 3.2.2.dfsg-1 The GNU Software Radio Toolkit
ii gnuradio-doc 3.2.2.dfsg-1 Software Defined Radio
ii python 2.5.4-2 An interactive high-level object-o
ii python-central 0.6.14+nmu2 register and build utility for Pyt
ii python-cheetah 2.0.1-2 text-based template engine and Pyt
ii python-gtk2 2.16.0-1 Python bindings for the GTK+ widge
ii python-lxml 2.2.2-2 pythonic binding for the libxml2 a
ii usrp-doc 3.2.2.dfsg-1 Software Defined Radio
gnuradio-companion recommends no packages.
gnuradio-companion suggests no packages.
-- no debconf information
Index: prefs.py
===================================================================
--- prefs.py (.../tags/releases/3.2.2/debian) (Arbeitskopie)
+++ prefs.py (.../branches/releases/3.2/debian) (Revision 11371)
@@ -1,126 +0,0 @@
-#
-# Copyright 2006,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import gnuradio_swig_python as gsp
-_prefs_base = gsp.gr_prefs
-
-
-import ConfigParser
-import os
-import os.path
-import sys
-
-
-def _user_prefs_filename():
- return os.path.expanduser('~/.gnuradio/config.conf')
-
-def _sys_prefs_dirname():
- return '/etc/gnuradio/conf.d'
-
-def _bool(x):
- """
- Try to coerce obj to a True or False
- """
- if isinstance(x, bool):
- return x
- if isinstance(x, (float, int)):
- return bool(x)
- raise TypeError, x
-
-
-class _prefs(_prefs_base):
- """
- Derive our 'real class' from the stubbed out base class that has support
- for SWIG directors. This allows C++ code to magically and transparently
- invoke the methods in this python class.
- """
- def __init__(self):
- _prefs_base.__init__(self)
- self.cp = ConfigParser.RawConfigParser()
- self.__getattr__ = lambda self, name: getattr(self.cp, name)
-
- def _sys_prefs_filenames(self):
- dir = _sys_prefs_dirname()
- try:
- fnames = os.listdir(dir)
- except (IOError, OSError):
- return []
- fnames.sort()
- return [os.path.join(dir, f) for f in fnames]
-
- def _read_files(self):
- filenames = self._sys_prefs_filenames()
- filenames.append(_user_prefs_filename())
- #print "filenames: ", filenames
- self.cp.read(filenames)
-
- # ----------------------------------------------------------------
- # These methods override the C++ virtual methods of the same name
- # ----------------------------------------------------------------
- def has_section(self, section):
- return self.cp.has_section(section)
-
- def has_option(self, section, option):
- return self.cp.has_option(section, option)
-
- def get_string(self, section, option, default_val):
- try:
- return self.cp.get(section, option)
- except:
- return default_val
-
- def get_bool(self, section, option, default_val):
- try:
- return self.cp.getboolean(section, option)
- except:
- return default_val
-
- def get_long(self, section, option, default_val):
- try:
- return self.cp.getint(section, option)
- except:
- return default_val
-
- def get_double(self, section, option, default_val):
- try:
- return self.cp.getfloat(section, option)
- except:
- return default_val
- # ----------------------------------------------------------------
- # End override of C++ virtual methods
- # ----------------------------------------------------------------
-
-
-_prefs_db = _prefs()
-
-# if GR_DONT_LOAD_PREFS is set, don't load them.
-# (make check uses this to avoid interactions.)
-if os.getenv("GR_DONT_LOAD_PREFS", None) is None:
- _prefs_db._read_files()
-
-
-_prefs_base.set_singleton(_prefs_db) # tell C++ what instance to use
-
-def prefs():
- """
- Return the global preference data base
- """
- return _prefs_db
Index: gen-install-files.sh
===================================================================
--- gen-install-files.sh (.../tags/releases/3.2.2/debian) (Arbeitskopie)
+++ gen-install-files.sh (.../branches/releases/3.2/debian) (Revision 11371)
@@ -335,7 +335,7 @@
NAME=debian/gnuradio-radar-mono.install
rm -f $NAME
touch $NAME
-$EXTRACT gr-radar-mono/src/python/Makefile radar_mono_python_PYTHON >>$NAME
+$EXTRACT gr-radar-mono/src/python/Makefile dist_ourpython_PYTHON >>$NAME
$EXTRACT gr-radar-mono/src/python/Makefile dist_bin_SCRIPTS >>$NAME
echo usr/share/usrp/rev2/usrp_radar_mono.rbf >>$NAME
echo usr/share/usrp/rev4/usrp_radar_mono.rbf >>$NAME
Index: changelog
===================================================================
--- changelog (.../tags/releases/3.2.2/debian) (Arbeitskopie)
+++ changelog (.../branches/releases/3.2/debian) (Revision 11371)
@@ -1,24 +1,11 @@
-gnuradio (3.2.2-1) stable; urgency=low
+gnuradio (3.2.1) unstable; urgency=low
- * New upstream release 3.2.2
- * See http://gnuradio.org/trac
-
- -- Johnathan Corgan <[email protected]> Sat, 14 Jul 2009 16:00:00 -0800
-
-gnuradio (3.2.1-1) stable; urgency=low
-
- * Fix broken prefs.py when installed using --prefix=/usr
-
- -- Johnathan Corgan <[email protected]> Sat, 06 Jul 2009 16:00:00 -0800
-
-gnuradio (3.2.1) stable; urgency=low
-
* New upstream release 3.2.1
* See http://gnuradio.org/trac
- -- Johnathan Corgan <[email protected]> Sat, 05 Jul 2009 18:00:00 -0800
+ -- Johnathan Corgan <[email protected]> Sat, 23 May 2009 18:00:00 -0800
-gnuradio (3.2) stable; urgency=low
+gnuradio (3.2) unstable; urgency=low
* New upstream release 3.2
* See http://gnuradio.org/trac
Index: rules
===================================================================
--- rules (.../tags/releases/3.2.2/debian) (Arbeitskopie)
+++ rules (.../branches/releases/3.2/debian) (Revision 11371)
@@ -90,15 +90,10 @@
install -m 0644 -D debian/grc.conf \
debian/tmp/etc/gnuradio/conf.d/grc.conf
- : # Install custom prefs.py FIXME
- install -m 0644 -D debian/prefs.py \
- debian/tmp/usr/lib/python2.6/dist-packages/gnuradio/gr/prefs.py
-
dh_install --sourcedir=debian/tmp
touch $@
-
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.