Bug 190740 - webplugin sym links broken (e.g., multimedia/totem)
Summary: webplugin sym links broken (e.g., multimedia/totem)
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-07 01:59 UTC by John Hein
Modified: 2019-09-05 07:50 UTC (History)
2 users (show)

See Also:


Attachments
fix webplugin sym links due to make eval order problems (601 bytes, patch)
2014-06-07 01:59 UTC, John Hein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2014-06-07 01:59:41 UTC
Created attachment 143475 [details]
fix webplugin sym links due to make eval order problems

I think webplugin sym links are still broken even after:

==============
r333783 | jkim | 2013-11-14 11:43:25 -0700 (Thu, 14 Nov 2013) | 6 lines
Changed paths:
   M /head/Mk/Uses/webplugin.mk

Fix symlink when PKGBASE, WEBPLUGIN_DIR, and WEBPLUGIN_NAME are not defined.
The deeply nested expression for .for loop cannot be completely evaluated at
the time of loop expansion because PKGBASE will be assigned much later.

Approved by:    bapt
==============

The issue is the same as what is described in the commit message.
When WEBPLUGIN_NAME is undefined by the port, WEBPLUGIN_DIR (which
references WEBPLUGIN_NAME) will also not have the right value until
after PKGBASE is defined.

But the :S substitution is done before that and thus before
WEBPLUGIN_DIR really gets the value we want it to have (not at the
time the ln command is run).


For example, in multimedia/totem, I see the following during 'make stage':

 .
 .
gmake[1]: Leaving directory `/usr/ports/multimedia/totem/work/totem-2.32.0'
install -d /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko
/bin/ln -sf /usr/local/lib/browser_plugins//libtotem-cone-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/
 .
 .

And that sym link is broken.

It should be:

/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-cone-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/
                                           ^^^^^


Attached is a fix that avoids the :S evaluation that happens too soon.
Comment 1 John Hein 2014-06-07 02:02:32 UTC
I sent this out in mid-May in email, but I think it has been overlooked.  So I'm adding here as a bug so it doesn't get forgotten.
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2014-06-07 08:32:36 UTC
I can't reproduce the problem:

% make webplugin-post-install
install -d /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-cone-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-gmp-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-mully-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-narrowspace-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/
install -d /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-cone-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-gmp-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-mully-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-narrowspace-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera/
install -d /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-cone-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-gmp-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-mully-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-narrowspace-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel/
install -d /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-cone-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-gmp-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-mully-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2/
/bin/ln -sf /usr/local/lib/browser_plugins/totem/libtotem-narrowspace-plugin.so /usr/ports/multimedia/totem/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2/
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2014-06-07 08:38:07 UTC
- Mk/Uses is portmgr territory
- Can't reproduce with bmake but can reproduce with fmake
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2019-09-05 07:50:22 UTC
fmake is not supported anymore