Permalink
Browse files

Remove workaround-548392 and pycentral-backwards-compatibility options

closes: #597137
  • Loading branch information...
1 parent 18af4d6 commit 7f2a1d74edd8a7f21534b5992ad4fa89a38fd494 @p1otr p1otr committed with esc Nov 27, 2010
Showing with 5 additions and 97 deletions.
  1. +0 −16 stdeb/command/common.py
  2. +5 −81 stdeb/util.py
View
@@ -18,8 +18,6 @@ def initialize_options (self):
self.patch_level = None
self.ignore_install_requires = None
self.debian_version = None
- self.pycentral_backwards_compatibility = None
- self.workaround_548392 = None
self.force_buildsystem = None
self.no_backwards_compatibility = None
self.guess_conflicts_provides_replaces = None
@@ -48,24 +46,12 @@ def str_to_bool(mystr):
if self.patch_level is not None:
self.patch_level = int(self.patch_level)
- if self.pycentral_backwards_compatibility is not None:
- self.pycentral_backwards_compatibility = str_to_bool(
- self.pycentral_backwards_compatibility)
- if self.workaround_548392 is not None:
- self.workaround_548392 = str_to_bool(self.workaround_548392)
-
if self.force_buildsystem is not None:
self.force_buildsystem = str_to_bool(self.force_buildsystem)
- if self.workaround_548392 is None:
- self.workaround_548392=False
-
if self.force_buildsystem is None:
self.force_buildsystem = True
- if self.pycentral_backwards_compatibility is None:
- self.pycentral_backwards_compatibility=False
-
if self.guess_conflicts_provides_replaces is None:
# the default
self.guess_conflicts_provides_replaces = False
@@ -183,10 +169,8 @@ def get_debinfo(self):
patch_level = self.patch_level,
install_requires = install_requires,
debian_version = self.debian_version,
- workaround_548392=self.workaround_548392,
force_buildsystem=self.force_buildsystem,
have_script_entry_points = have_script_entry_points,
- pycentral_backwards_compatibility=self.pycentral_backwards_compatibility,
setup_requires = (), # XXX How do we get the setup_requires?
use_setuptools = use_setuptools,
guess_conflicts_provides_replaces=self.guess_conflicts_provides_replaces,
View
@@ -66,10 +66,11 @@ def check_call(*popenargs, **kwargs):
('ignore-install-requires', 'i',
'ignore the requirements from requires.txt in the egg-info directory'),
('pycentral-backwards-compatibility=',None,
- 'If True, enable migration from old stdeb that used pycentral. (Default=False).'),
+ 'This option has no effect, is here for backwards compatibility, and may '
+ 'be removed someday.'),
('workaround-548392=',None,
- 'If True, limit binary package to single Python version, '
- 'working around Debian bug 548392 of debhelper. (Default=False).'),
+ 'This option has no effect, is here for backwards compatibility, and may '
+ 'be removed someday.'),
('force-buildsystem=',None,
"If True (the default), set 'DH_OPTIONS=--buildsystem=python_distutils'"),
('no-backwards-compatibility',None,
@@ -638,10 +639,8 @@ def __init__(self,
install_requires=None,
setup_requires=None,
debian_version=None,
- workaround_548392=None,
force_buildsystem=None,
have_script_entry_points = None,
- pycentral_backwards_compatibility=None,
use_setuptools = False,
guess_conflicts_provides_replaces = False,
sdist_dsc_command = None,
@@ -737,8 +736,6 @@ def __init__(self,
depends = ['${misc:Depends}', '${python:Depends}']
need_custom_binary_target = False
- self.do_pycentral_removal_preinst = pycentral_backwards_compatibility
-
if has_ext_modules:
self.architecture = 'any'
depends.append('${shlibs:Depends}')
@@ -793,10 +790,7 @@ def __init__(self,
self.long_description = ''
if have_script_entry_points:
- if workaround_548392:
- build_deps.append( 'debhelper (>= %s)'%DH_MIN_VERS)
- else:
- build_deps.append( 'debhelper (>= %s)'%DH_IDEAL_VERS )
+ build_deps.append( 'debhelper (>= %s)'%DH_IDEAL_VERS )
else:
build_deps.append( 'debhelper (>= %s)'%DH_MIN_VERS )
@@ -838,53 +832,6 @@ def __init__(self,
self.patch_level = 0
xs_python_version = parse_vals(cfg,module_name,'XS-Python-Version')
- if have_script_entry_points and workaround_548392:
-
- # Trap cases that might trigger Debian bug #548392 and
- # workaround. Disable this block once the bugfix has
- # become widespread and change Build-Depends: to include
- # sufficiently recent debhelper.
-
- if len(xs_python_version)==0:
- # No Python version specified. For now, just use default Python
- log.warn('working around Debian #548392, changing '
- 'XS-Python-Version: to \'current\'')
- xs_python_version = ['current']
- else:
-
- # The user specified a Python version. Check if s/he
- # specified more than one. (Specifying a single
- # version won't trigger the bug.)
-
- pyversions_fname = '/usr/bin/pyversions'
- assert os.path.exists(pyversions_fname)
- pyversions = load_module('pyversions',pyversions_fname)
- vstring = ', '.join(xs_python_version)
- pyversions_result = pyversions.parse_versions(vstring)
- if ('versions' in pyversions_result and
- len(pyversions_result['versions'])>1):
-
- vers = list(pyversions_result['versions'])
- # More than one Python version specified.
-
- # This is dubious as the following comparison
- # happens at source build time, but what matters
- # is what runs when building the binary package.
-
- default_vers = pyversions.default_version(version_only=True)
- if default_vers in vers:
- log.warn('working around Debian #548392, changing '
- 'XS-Python-Version: to \'current\'')
- xs_python_version = ['current']
- else:
- vers.sort()
- log.warn('working around Debian #548392, changing '
- 'XS-Python-Version: to \'%s\''%vers[-1])
- xs_python_version = [vers[-1]]
- elif 'all' in pyversions_result:
- log.warn('working around Debian #548392, changing '
- 'XS-Python-Version: to \'current\'')
- xs_python_version = ['current']
if len(xs_python_version)!=0:
self.source_stanza_extras += ('XS-Python-Version: '+
@@ -1167,13 +1114,6 @@ def build_dsc(debinfo,
link_func( debinfo.copyright_file,
os.path.join(debian_dir,'copyright'))
- # G. debian/<package>.preinst
- if debinfo.do_pycentral_removal_preinst:
- preinst = PREINST%debinfo.__dict__
- fd = open( os.path.join(debian_dir,'%s.preinst'%debinfo.package), mode='w')
- fd.write(preinst)
- fd.close()
-
# H. debian/<package>.install
if len(debinfo.install_file_lines):
fd = open( os.path.join(debian_dir,'%s.install'%debinfo.package), mode='w')
@@ -1338,19 +1278,3 @@ def build_dsc(debinfo,
%(dh_installmime_indep_line)s
%(dh_desktop_indep_line)s
"""
-
-PREINST = """#! /bin/sh
-
-set -e
-
-# This was added by stdeb to workaround Debian #479852. In a nutshell,
-# pycentral does not remove normally remove its symlinks on an
-# upgrade. Since we're using python-support, however, those symlinks
-# will be broken. This tells python-central to clean up any symlinks.
-if [ -e /var/lib/dpkg/info/%(package)s.list ] && which pycentral >/dev/null 2>&1
-then
- pycentral pkgremove %(package)s
-fi
-
-#DEBHELPER#
-"""

0 comments on commit 7f2a1d7

Please sign in to comment.