~ubuntu-branches/ubuntu/precise/config-package-dev/precise

« back to all changes in this revision

Viewing changes to divert.sh.in

  • Committer: Bazaar Package Importer
  • Author(s): Anders Kaseorg, Tim Abbott, Anders Kaseorg
  • Date: 2011-02-05 21:37:05 UTC
  • Revision ID: james.westby@ubuntu.com-20110205213705-afd4g9yap9il46ny
Tags: 4.12
[ Tim Abbott ]
* Allow specifying DEB_TRANSFORM_SCRIPT_$package_$file in case you want
  multiple binary packages transforming the same file differently.
  (Thanks to Evan Broder for this patch).
* Add a decode script for undoing the file to virtual package name
  transformation. (Thanks to Patrick Hurst for writing decode).

[ Anders Kaseorg ]
* Fix a quoting bug that failed to disallow transformation of generated
  conffiles.  (Patch from Evan Broder.)
* Remove DEB_UNDIVERT_VERSION_file and DEB_UNREMOVE_VERSION_file, and
  instead test for the undiverted file in the postinst.  (Patch from
  Evan Broder.)
* Write the prerm and postrm maintainer script fragments in reverse
  order when DH_COMPAT ≥ 5, to match debhelper’s behavior.
* Bump debhelper compatibility level to 6.
* Bump Standards-Version to 3.9.1 (no changes required).

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
    undivert_unlink_divert "$file"
108
108
}
109
109
 
 
110
check_undivert_unlink()
 
111
{
 
112
    prefix=$1
 
113
    suffix=$2
 
114
 
 
115
    file=$prefix$suffix
 
116
    ourfile=$prefix$ours$suffix
 
117
    theirfile=$prefix$theirs$suffix
 
118
 
 
119
    if dpkg-divert --list "$package" | \
 
120
        grep -xFq "diversion of $file to $theirfile by $package"; then
 
121
        undivert_unlink "$prefix" "$suffix"
 
122
    fi
 
123
}
 
124
 
 
125
check_undivert_unremove()
 
126
{
 
127
    file=$1
 
128
    removedfile=$2
 
129
    if dpkg-divert --list "$package" | \
 
130
        grep -xFq "diversion of $file to $removedfile by $package"; then
 
131
        undivert_unremove "$file"
 
132
    fi
 
133
}