AddBootModuleSymlinksToContainer: Fix symlink target

The symlink was only correct, if the container was a package. For
containers with a non-empty path to the system directory the link would
duplicate the system directory path.
This commit is contained in:
Ingo Weinhold 2013-09-12 23:27:22 +02:00
parent b3eaedd14a
commit dee358f0ec

View File

@ -525,8 +525,15 @@ rule AddBootModuleSymlinksToContainer container : targets
Exit "ERROR: Add*ToContainer has not been invoked for it yet." ;
}
# chop off the system dir prefix from installDir
installDir = [ on $(installDir) return $(DIRECTORY_TOKENS) ] ;
local dummy ;
for dummy in $(systemDirTokens) {
installDir = $(installDir[2-]) ;
}
local name = $(target:BS) ;
local linkTarget = [ FDirName ../../.. $(installDir:G=) $(name) ] ;
local linkTarget = [ FDirName ../../.. $(installDir) $(name) ] ;
AddSymlinkToContainer $(container)
: $(systemDirTokens) add-ons kernel boot