Skip to content
Permalink
Browse files

Centralize the setting of UI_PREFIX so it can also be overridden in o…

…ne place for

automated scripts (which need to mark the stages with some sort of unique marker).
This is also a lot cleaner than what we had before, were each module could
set it to any value it liked and wreak havoc with the output.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@4598 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jordan K. Hubbard
Jordan K. Hubbard committed Jan 12, 2004
1 parent e341b2a commit 06386bf9cd6a03f8d2f9d5eee15108774ae663d1
@@ -46,7 +46,7 @@ default build.cmd {[build_getmaketype]}
default build.pre_args {${build.target}}
default build.target "all"

set UI_PREFIX "---> "
set_ui_prefix

proc build_getmaketype {args} {
if {![exists build.type]} {
@@ -40,7 +40,7 @@ target_prerun ${com.apple.checksum} checksum_start
# define options
options checksums

set UI_PREFIX "---> "
set_ui_prefix

proc dmd5 {file} {
foreach {name type sum} [option checksums] {
@@ -40,7 +40,7 @@ target_provides ${com.apple.clean} clean
target_requires ${com.apple.clean} main
target_prerun ${com.apple.clean} clean_start

set UI_PREFIX "--->"
set_ui_prefix

proc clean_start {args} {
global UI_PREFIX
@@ -49,7 +49,7 @@ default xmkmf.cmd xmkmf
default xmkmf.dir {${worksrcpath}}
default use_configure yes

set UI_PREFIX "---> "
set_ui_prefix

proc configure_start {args} {
global UI_PREFIX
@@ -51,7 +51,7 @@ default destroot.post_args {${destroot.destdir}}
default destroot.destdir {DESTDIR=${destroot}}
default destroot.clean no

set UI_PREFIX "---> "
set_ui_prefix

proc destroot_start {args} {
global UI_PREFIX prefix portname destroot portresourcepath os.platform destroot.clean
@@ -37,7 +37,7 @@ target_runtype ${com.apple.dmg} always
target_provides ${com.apple.dmg} dmg
target_requires ${com.apple.dmg} package

set UI_PREFIX "---> "
set_ui_prefix

proc dmg_main {args} {
global portname portversion portrevision package.destpath UI_PREFIX
@@ -52,7 +52,7 @@ default extract.cmd gzip
default extract.pre_args -dc
default extract.post_args {{| tar -xf -}}

set UI_PREFIX "---> "
set_ui_prefix

proc extract_init {args} {
global extract.only extract.dir extract.cmd extract.pre_args extract.post_args distfiles use_bzip2 use_zip workpath
@@ -91,7 +91,7 @@ proc fix_extract_suffix {option action args} {
# Site lists are stored here
namespace eval portfetch { }

set UI_PREFIX "---> "
set_ui_prefix

# Given a distname, return a suffix based on the use_zip / use_bzip2 / extract.suffix options
proc suffix {distname} {
@@ -38,7 +38,7 @@ target_provides ${com.apple.install} install
target_requires ${com.apple.install} main fetch extract checksum patch configure build destroot
target_prerun ${com.apple.install} install_start

set UI_PREFIX "---> "
set_ui_prefix

proc install_start {args} {
global UI_PREFIX portname portversion
@@ -40,7 +40,7 @@ target_requires ${com.apple.mpkg} package
# define options
options package.type package.destpath

set UI_PREFIX "---> "
set_ui_prefix

proc mpkg_main {args} {
global portname portversion portrevision package.type package.destpath UI_PREFIX
@@ -43,7 +43,7 @@ options package.type package.destpath
# Set defaults
default package.destpath {${workpath}}

set UI_PREFIX "---> "
set_ui_prefix

proc package_main {args} {
global portname portversion portrevision package.type package.destpath UI_PREFIX
@@ -36,7 +36,7 @@ set com.apple.patch [target_new com.apple.patch patch_main]
target_provides ${com.apple.patch} patch
target_requires ${com.apple.patch} main fetch checksum extract

set UI_PREFIX "---> "
set_ui_prefix

# Add command patch
commands patch
@@ -39,7 +39,7 @@ target_requires ${com.apple.rpmpackage} destroot

options package.destpath

set UI_PREFIX "---> "
set_ui_prefix

proc rpmpackage_main {args} {
global portname portversion portrevision UI_PREFIX
@@ -19,7 +19,7 @@ default test.cmd {${build.cmd}}
default test.pre_args {${test.target}}
default test.target test

set UI_PREFIX "---> "
set_ui_prefix

proc test_start {args} {
global UI_PREFIX portname
@@ -41,7 +41,7 @@ target_prerun ${com.apple.uninstall} uninstall_start
# define options
options uninstall.force uninstall.nochecksum

set UI_PREFIX "---> "
set_ui_prefix

proc uninstall_start {args} {
global portname portversion UI_PREFIX
@@ -1099,3 +1099,13 @@ proc binaryInPath {binary} {

return -code error [format [msgcat::mc "Failed to locate '%s' in path: '%s'"] $binary $env(PATH)];
}

# Set the UI prefix to something standard (so it can be grepped for in output)
proc set_ui_prefix {} {
global UI_PREFIX env
if {[info exists env(UI_PREFIX)]} {
set UI_PREFIX $env(UI_PREFIX)
} else {
set UI_PREFIX "---> "
}
}

0 comments on commit 06386bf

Please sign in to comment.
You can’t perform that action at this time.