Skip to content

Commit

Permalink
workaround Debian #479852: remove left over python-central symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Jun 3, 2009
1 parent 6868601 commit 9faaf04
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion stdeb/util.py
Expand Up @@ -485,7 +485,7 @@ def __init__(self,

depends = []

depends.append('${python:Depends}')
depends.append('${python:Depends}, python-central')

if has_ext_modules:
self.architecture = 'any'
Expand Down Expand Up @@ -786,6 +786,12 @@ def build_dsc(debinfo,
os.link( debinfo.copyright_file,
os.path.join(debian_dir,'copyright'))

# G. debian/<package>.preinst
preinst = PREINST%debinfo.__dict__
fd = open( os.path.join(debian_dir,'%s.preinst'%debinfo.package), mode='w')
fd.write(preinst)
fd.close()

###############################################
# 3. unpack original source tarball

Expand Down Expand Up @@ -869,3 +875,16 @@ def build_dsc(debinfo,
%(percent_symbol)s:
dh $@
"""

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.
pycentral pkgremove %(package)s
#DEBHELPER#
"""

0 comments on commit 9faaf04

Please sign in to comment.