Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5490 closed enhancement (fixed)

Reduce code duplication in build/scripts

Reported by: mmadia Owned by: mmadia
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: #5479 Blocking:
Has a Patch: no Platform: All

Description

From #5479#comment:2 Replying to bonefish:

  • Regarding code duplication in build_haiku_image, build_haiku_cd, and probably other scripts, that's indeed annoying. It would be nice to unify the scripts again or at least move commonly used code to a sourceable helper script. That's material for a separate undertaking, though.

Change History (6)

comment:1 Changed 9 years ago by mmadia

Blocked By: 5479 added

comment:2 Changed 9 years ago by mmadia

Owner: changed from bonefish to mmadia
Status: newin-progress

I'm starting by consolidating build_tgz_archive and build_zip_archive into build_archive.

comment:3 Changed 9 years ago by mmadia

Status: in-progressassigned

hrev36005 condenses those scripts.

Unifying build_haiku_{cd,image}, doesn't seem to be as straight forward. Moving the common bits to a utility script seems more feasible, at least in the short term. Changing the status from in-progress to assigned, as it'll be a few more days before working on this.

comment:4 Changed 9 years ago by mmadia

Status: assignedin-progress

For unifying build_haiku_cd & build_haiku_image, I plan on having the CD targets add an 'isCD' variable, similar to $isImage. Then it looks like only a few if [ $isCD ]; then would need to be added.

comment:5 Changed 9 years ago by mmadia

Resolution: fixed
Status: in-progressclosed

Implemented in hrev36123. I don't plan to attempt unifying build_cross_tools[_gcc4] unless requested.

comment:6 in reply to:  5 Changed 9 years ago by bonefish

Replying to mmadia:

Implemented in hrev36123.

Great, thanks!

I don't plan to attempt unifying build_cross_tools[_gcc4] unless requested.

No, those are different enough that it's not worth it. I also wouldn't expect any other scripts of this kind to be added in the future.

Note: See TracTickets for help on using tickets.