From c9dd4d5b9cbe67b6ec53e04cb7c3f1819685cf33 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Tue, 2 Mar 2010 15:30:41 -0700 Subject: [PATCH] fix a couple bugs --- debian/changelog | 5 +- debian/control | 4 +- debian/prefs.py | 126 ----------------------------------------------- debian/rules | 4 -- 4 files changed, 6 insertions(+), 133 deletions(-) delete mode 100644 debian/prefs.py diff --git a/debian/changelog b/debian/changelog index 5d9ec12c..c521bae4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,11 @@ gnuradio (3.2.2.dfsg-2) UNRELEASED; urgency=low * fix typos in short package descriptions, closes: #556572 * make gnuradio-companion conflict with grc to resolve conflict over the file named /usr/bin/grc, closes: #557050 + * patch from Kamal Mostafa to make libusrp packages depend on adduser, + closes: #566564, #566565 + * stop delivering custom prefs.py, closes: #559640 - -- Bdale Garbee Thu, 19 Nov 2009 02:49:40 -0700 + -- Bdale Garbee Tue, 02 Mar 2010 15:08:41 -0700 gnuradio (3.2.2.dfsg-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 93fb61ad..8240d467 100644 --- a/debian/control +++ b/debian/control @@ -110,7 +110,7 @@ Description: GNU Radio Message Block Library Package: libusrp0 Section: comm Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, adduser Replaces: libusrp0c2a, usrp-firmware Conflicts: usrp-firmware Suggests: usrp-doc @@ -146,7 +146,7 @@ Description: Client side library for the USRP(1) hardware Package: libusrp2-0 Section: comm Architecture: any -Depends: libgruel0 (= ${binary:Version}), libgromnithread0 (= ${binary:Version}), ${shlibs:Depends} +Depends: libgruel0 (= ${binary:Version}), libgromnithread0 (= ${binary:Version}), ${shlibs:Depends}, adduser Description: Client side library for the USRP2 hardware The Universal Software Radio Peripheral 2 (USRP2) is a GbE-connected, low-cost and open board. It features two high-speed analog-to-digital diff --git a/debian/prefs.py b/debian/prefs.py deleted file mode 100644 index 452415b9..00000000 --- a/debian/prefs.py +++ /dev/null @@ -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 diff --git a/debian/rules b/debian/rules index 3a4b1692..fd99b3c7 100755 --- a/debian/rules +++ b/debian/rules @@ -94,10 +94,6 @@ install-stamp: extract-stamp debian/control 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 $@ -- 2.30.2