Control: tag -1 patch Hi Raphaël,
On 20-12-17 08:50, Raphael Hertzog wrote: > Sorry, but I no longer have any special interest in dh-linktree (I wrote > it for wordpress which I no longer maintain). Ack. > I will happily apply a patch or give up the package to someone else > but don't expect me to do any significant work on it. Please find attached my attempt (tested in so far that the produced dependencies are as expected for both embed and embed-weakdep) to achieve it. It is the first time ever that I change Perl code, so please check. I note that the code is on collab-maint. As such I assume you are totally fine with others uploading the package as well even if not fully taking over the package. Paul
diff --git a/debian/changelog b/debian/changelog index cf4dc14..6c659e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ dh-linktree (0.5) UNRELEASED; urgency=medium + [ Raphaël Hertzog ] * Fix typo in long description. Closes: #813761 + [ Paul Gevers ] + * Add embed-weakdep option to avoid strong dependencies when desired + Closes: #783906 + -- Raphaël Hertzog <hert...@debian.org> Fri, 05 Feb 2016 09:31:26 +0100 dh-linktree (0.4) unstable; urgency=low diff --git a/dh_linktree b/dh_linktree index 95a52d6..ebeab71 100755 --- a/dh_linktree +++ b/dh_linktree @@ -112,6 +112,9 @@ If the action is "embed" create a symlink tree named I<destination> with all files within it pointing to the corresponding file in I<source>. It generates a strong dependency ("exactly same upstream version"). +The "embed-weakdep" action is like "embed", except it generates a weak +dependency ("at least the current upstream version"). + The "deduplicate" action will not create new files but it will replace existing files in the destination directory with symlinks to the corresponding source file provided that both files have the same content. @@ -178,7 +181,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $src=File::Spec->canonpath(shift @srclinks); my $dest=File::Spec->canonpath(shift @srclinks); error("invalid action '$action'") - if $action !~ /^(embed|replace|deduplicate)$/; + if $action !~ /^(embed|embed-weakdep|replace|deduplicate)$/; if (! -l "/$src" and -d _) { find(sub { return if -d and ! -l; @@ -207,7 +210,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) { next; } - if ($action ne "embed" and not -e "$tmp/$dest") { + if (($action ne "embed" and $action ne "embed-weakdep") and + not -e "$tmp/$dest") { verbose_print("not creating $tmp/$dest"); next; } @@ -299,7 +303,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { error("Unexpected package $pkg returned by dpkg-query -W."); } $deps{"$pkg (>= $ver)"} = 1; - $deps{"$pkg (<< $ver.0~)"} = 1 if $pkgused{$pkg} ne "replace"; + $deps{"$pkg (<< $ver.0~)"} = 1 if $pkgused{$pkg} ne "replace" and $pkgused{$pkg} ne "embed-weakdep"; } close($output) or error("failed to close pipe with dpkg-query -W"); wait_child($pid, cmdline => "dpkg-query -W @{[sort keys %pkgused]}");
signature.asc
Description: OpenPGP digital signature