Opened 15 years ago

Last modified 15 years ago

#5508 closed enhancement

[patch] AddExpanderRuleToHaikuImage — at Version 7

Reported by: mmadia Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc: scottmc
Blocked By: Blocking: #5155
Platform: All

Description (last modified by mmadia)

This patch creates a new rule AddExpanerRule, which allows optional packages to add one or more rules to common/etc/expander.rules

It is functional for the P7zip package and an upcoming XZ-Utils package. Tested in Haiku and FreeBSD.

common/etc/expander.rules:

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

Change History (9)

comment:1 by mmadia, 15 years ago

Blocking: 5155 added

comment:2 by PieterPanman, 15 years ago

Is it AddExpanerRule on purpose? Or should it be AddExpanderRule? Just noticed, though I'd ask.

in reply to:  2 comment:3 by mmadia, 15 years ago

Replying to PieterPanman:

Is it AddExpanerRule on purpose? Or should it be AddExpanderRule? Just noticed, though I'd ask.

Heh... chalk that up to post-midnight coding. Luckily the typo is consistent throughout the patch.

comment:4 by PieterPanman, 15 years ago

That's why I wondered, as you were so consistent, it must have been intentional ;)

comment:5 by scottmc, 15 years ago

Cc: scottmc added

comment:6 by bonefish, 15 years ago

For sake of consistency the rule should be named AddExpanderRuleToHaikuImage. Other than that, why not simply use another delimiter character instead of '|'? E.g. '#' comes to mind, or '!'.

by mmadia, 15 years ago

Attachment: AddExpanderRules.patch added

updated per comment 6

comment:7 by mmadia, 15 years ago

Description: modified (diff)
Summary: [WIP-patch] AddExpanerRule[patch] AddExpanderRuleToHaikuImage

The patch is updated. One thing that puzzles me, in hrev34942 echo -e ... was removed as the '-e' option isn't supported on FreeBSD. Despite this, action BuildHaikuImageExpanderRules seems to work without issue.

by mmadia, 15 years ago

Attachment: wip-OP-XZ-Utils.patch added

updated to use AddExpanderRuleToHaikuImage

Note: See TracTickets for help on using tickets.