Opened 8 years ago

Closed 7 years ago

#8791 closed bug (fixed)

[Build System] expander.rules looks wrong

Reported by: diver Owned by: nobody
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


This is self made image built on linux, hrev44410 gcc2hybrid.

-e "application/x-7z-compressed"	.7z	"7za l %s"	"7za x -y %s"
"application/x-xz"	.tar.xz	"tar -Jtvf %s"	"tar -Jxvf %s"
"application/x-xz"	.txz	"tar -Jtvf %s"	"tar -Jxvf %s"
"application/x-xz"	.xz	"echo %s | sed 's/.xz$//g'"	"xz -df %s"

Change History (6)

comment:1 by bonefish, 8 years ago

Owner: changed from bonefish to nobody
Status: newassigned

If anyone want to fix this, feel free. But eventually the expander rule handling should be moved out of the build system anyway. Cf. #8494.

comment:2 by diver, 8 years ago

This fixes/workaround the issue:

diff --git a/build/jam/ImageRules b/build/jam/ImageRules
index 48ebb82..82190f9 100644
--- a/build/jam/ImageRules
+++ b/build/jam/ImageRules
@@ -908,7 +908,7 @@ rule AddEntryToHaikuImageExpanderRuleFile file : entry

 actions BuildHaikuImageExpanderRules
-       echo -e "$(HAIKU_IMAGE_EXPANDER_RULES_ENTRIES)" | tr '!' '\n' > $(1)
+       /bin/echo -e "$(HAIKU_IMAGE_EXPANDER_RULES_ENTRIES)" | tr '!' '\n' > $(1)

 rule AddExpanderRuleToHaikuImage mimetype : extension : list : extract

comment:3 by bonefish, 8 years ago

The problem is that the -e switch is not mandated (or even mentioned) by POSIX, so neither /bin/sh nor /bin/echo have to implement it. Apparently your Linux doesn't use bash or another shell that supports the switch as /bin/sh. The GNU coreutils echo command does support -e though, so on all GNU/Linux distributions your work-around would work. It would, however, break a currently correctly working FreeBSD, since that has a /bin/sh with -e support, but a /bin/echo without.

A work-around that should work for you is to set the JAMSHELL environment variable to /bin/bash -c.

comment:4 by diver, 8 years ago

$ lsb_release -d
Description:    Ubuntu 10.04.4 LTS

$ bash --version
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

comment:5 by diver, 7 years ago

This one is probably fixed now. Ingo?

comment:6 by bonefish, 7 years ago

Resolution: fixed
Status: assignedclosed

Indeed. The troublesome rule has been removed. Additional expander rules are provided by the respective packages.

Note: See TracTickets for help on using tickets.