Am 15.03.2017 um 20:34 schrieb Andreas Beckmann:
> On Wed, 15 Mar 2017 18:39:14 +0100 Markus Koschany <[email protected]> wrote:
>> I recently created a maintscript file for holotz-castle to convert
>> symlinks to real directories on upgrade.
>>
>> maintscript:
> 
> maintscript files are for debhelper (dh_installdeb), not dpkg.

But dpkg-maintscript-helper is part of dpkg and the man page was my
source of information I was referring to in this bug report. If this is
in fact a bug in debhelper and not in dpkg-maintscript-helper, please
feel free to reassign to debhelper.

> 
>> symlink_to_dir /usr/share/doc/holotz-castle 
>> /usr/share/doc/holotz-castle-data 1.3.14-8~ holotz-castle
>> symlink_to_dir /usr/share/doc/holotz-castle-editor 
>> /usr/share/doc/holotz-castle-data 1.3.14-8~ holotz-castle-editor
>>
>> Currently the syntax described in the man page is as follows:
>>
>>  symlink_to_dir pathname old-target [prior-version [package]]
>>
>> I was under the impression that symlink_to_dir will act on [package]
>> name but apparently maintscript without the $PACKAGE prefix will only
>> act on the first binary package. I find this behavior rather confusing
>> at the moment. For a package with ten binary packages this would
>> require up to ten different $PACKAGE.maintscript files which seems to
>> be impractical to me.
> 
> I don't see much difference between 1 file with 10 lines and 10 files
> with 1 line each.

I beg to differ. Cluttering the debian directory with ten more files (in
addition to *.install, *.docs, *.links, *.prerm, *.preinst, etc pp.) is
something I would rather like to avoid. It is already quite annoying
that dh_installdocs --link-doc is basically broken by design (#766711)
for symlinks from arch:all to arch:any packages (probably the reason why
most people use it at all, for saving disk space) and reverting the
symlinks to real directories then requires the symlink_to_dir function
from dpkg-maintscript-helper. That is the reason why I avoid symlinked
directories as much as I can in my packages.

>> I would appreciate it if maintscript acted on [package] instead. If
>> you don't want to implement this feature, please consider to update
>> the man page of dpkg-maintscript-helper which should be more precise
>> why specifying [package] is needed at all.
> 
> The "package" argument is not about the package that makes the changes,
> but about the package owning the stuff being acted upon. Usually both
> are the same and the "package" argument can be omitted.
> I think the "package" argument is not used for symlink_to_dir, but
> needed for dir_to_symlink ("Is all the stuff found in dir owned by
> $package?"). Or for rm_conffile/mv_conffile cases where the conffile was
> previously owned by a *different* package.
> 
> Maybe something could be accomplished with dh-exec, but that sounds like
> overkill ...

And that's the confusing part about the current documentation in man
dpkg-maintscript-helper. I thought [package] was actually needed for
symlink_to_dir in case you use the maintscript file to specify the
package to work on.

> 
> Andreas
> 
> PS: at some point I would have liked to put all the lintian overrides in
> one file ... it sounded so natural to just dump a bit of lintian's
> output into a single ignore list ... and so redundant to prefix each
> line in $package.lintian_overrides with "$package: " - but luckily that
> can be omitted :-)

Yeah, a single lintian-overrides file for all binary packages would be
nice too. :/

Markus



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to