Skip to content

Commit cdc4dc2

Browse files
committed
dh_configpackage: Document relative transform sources and check_file
1 parent 434cb01 commit cdc4dc2

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

dh_configpackage

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,17 @@ this with e.g. Perl's C<or die> syntax to make sure that the source
140140
file of the transformation has not changed from what you expected.
141141

142142
I<Transformation sources>: Under normal operation, the source (passed
143-
on stdin) for the transformation is the name of the diversion without
144-
the divert extension. In some cases, you may wish to use a different
143+
on stdin) for the transformation is the name of the target file without
144+
the displace extension. B<dh_configpackage> will check to make sure that
145+
the source file is owned by a Debian package and has not been modified
146+
locally, in order to ensure that unwanted changes do not show up in the
147+
result of the transformation. (If the file is already displaced or
148+
transformed by a config-package-dev package, it will check the original
149+
version of the file and use that as the transformation source, allowing
150+
a config-package-dev package to be built correctly on a running system
151+
where a previous version of the same package was already installed.)
152+
153+
In some cases, you may wish to use a different
145154
source (e.g. a sample configuration file in /usr/share/doc). You can
146155
specify this source as an optional field between the diversion
147156
filename and the transformation. This field must begin with a '<'
@@ -150,6 +159,12 @@ example above, we might alter it as follows:
150159

151160
/etc/school.conf.debathena </usr/share/doc/school/conf.example sed -e 's/Harvard/MIT/g'
152161

162+
The full path should generally be an absolute path; however, in rare
163+
cases, it is useful to use a file in the current package's build
164+
directory as the transformation source. In this case, the package's
165+
build directory is assumed to be clean, and no dpkg ownership check is
166+
performe.
167+
153168
B<NOTE:> There is no "untransform" operation. Because a transform
154169
operation is a special case of a displace operation, the "undisplace"
155170
operation is the correct way of removing a no-longer-needed

0 commit comments

Comments
 (0)