[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: maintainer scripts handling symlink to directory conversion



I found two things you need to do to avoid breakages:

1. Strip trailing slash for any argument (especially the first argument,
e.g. the path)
2. Strip full path for old_path, as readlink -f is a beast in case you
have symlink->symlink->dir or something like that

E.g. do:

symlink_to_dir /usr/share/doc/libavifile-0.7-bin libavifile-0.7-common
1:0.7.48~20090503.ds-16.1~

symlink_to_dir /usr/share/doc/libavifile-0.7c2 libavifile-0.7-common
1:0.7.48~20090503.ds-16.1~

symlink_to_dir /usr/share/doc/libavifile-0.7-dev libavifile-0.7-common
1:0.7.48~20090503.ds-16.1~

In case this doesn't help, you might need to set DPKG_DEBUG=1 before
running upgrade, or even mangle dpkg-maintscript-helper to have
#!/bin/sh -x stanza.

Cheers,
Ondrej

On Fri, Dec 12, 2014, at 11:52, Andreas Tille wrote:
> Hi,
> 
> I had a look into #771753 and noticed that the proper maintscripts that
> should deal with the issue are included into the packaging.  However, I
> can confirm that it only works for package libavifile-0.7c2 but not for
> libavifile-0.7-bin and libavifile-0.7-dev.
> 
> I had tried whether the superflous '-- "$@"' at the end of these scripts
> which is rather added by debhelper (see debdiff extract below) might
> have some influence but it does not.
> 
> Does anybody have a clue why symlink_to_dir works perfectly for
> libavifile-0.7c2 but not for libavifile-0.7-bin and libavifile-0.7-dev?
> 
> Kind regards
> 
>        Andreas.
> 
> 
> diff -Nru
> avifile-0.7.48~20090503.ds/debian/libavifile-0.7-bin.maintscript
> avifile-0.7.48~20090503.ds/debian/libavifile-0.7-bin.maintscript
> --- avifile-0.7.48~20090503.ds/debian/libavifile-0.7-bin.maintscript   
> 2014-10-20 13:28:43.000000000 +0200
> +++ avifile-0.7.48~20090503.ds/debian/libavifile-0.7-bin.maintscript   
> 2014-12-12 11:16:47.000000000 +0100
> @@ -1 +1 @@
> -symlink_to_dir /usr/share/doc/libavifile-0.7-bin/
> /usr/share/doc/libavifile-0.7-common 1:0.7.48~20090503.ds-16.1~ -- "$@"
> +symlink_to_dir /usr/share/doc/libavifile-0.7-bin/
> /usr/share/doc/libavifile-0.7-common 1:0.7.48~20090503.ds-16.1~
> diff -Nru avifile-0.7.48~20090503.ds/debian/libavifile-0.7c2.maintscript
> avifile-0.7.48~20090503.ds/debian/libavifile-0.7c2.maintscript
> --- avifile-0.7.48~20090503.ds/debian/libavifile-0.7c2.maintscript     
> 2014-10-20 13:28:43.000000000 +0200
> +++ avifile-0.7.48~20090503.ds/debian/libavifile-0.7c2.maintscript     
> 2014-12-12 11:16:59.000000000 +0100
> @@ -1 +1 @@
> -symlink_to_dir /usr/share/doc/libavifile-0.7c2/
> /usr/share/doc/libavifile-0.7-common 1:0.7.48~20090503.ds-16.1~ -- "$@"
> +symlink_to_dir /usr/share/doc/libavifile-0.7c2/
> /usr/share/doc/libavifile-0.7-common 1:0.7.48~20090503.ds-16.1~
> diff -Nru
> avifile-0.7.48~20090503.ds/debian/libavifile-0.7-dev.maintscript
> avifile-0.7.48~20090503.ds/debian/libavifile-0.7-dev.maintscript
> --- avifile-0.7.48~20090503.ds/debian/libavifile-0.7-dev.maintscript   
> 2014-10-20 13:28:43.000000000 +0200
> +++ avifile-0.7.48~20090503.ds/debian/libavifile-0.7-dev.maintscript   
> 2014-12-12 11:16:54.000000000 +0100
> @@ -1 +1 @@
> -symlink_to_dir /usr/share/doc/libavifile-0.7-dev/
> /usr/share/doc/libavifile-0.7-common 1:0.7.48~20090503.ds-16.1~ -- "$@"
> +symlink_to_dir /usr/share/doc/libavifile-0.7-dev/
> /usr/share/doc/libavifile-0.7-common 1:0.7.48~20090503.ds-16.1~
> 
> 
> -- 
> http://fam-tille.de


-- 
Ondřej Surý <ondrej@sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server


Reply to: