[29189] trunk/base/src/port/portmirror.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Mon Sep 17 00:32:36 PDT 2007
Revision: 29189
http://trac.macosforge.org/projects/macports/changeset/29189
Author: jmpp at macports.org
Date: 2007-09-17 00:32:36 -0700 (Mon, 17 Sep 2007)
Log Message:
-----------
Whitespace changes only.
Modified Paths:
--------------
trunk/base/src/port/portmirror.tcl
Modified: trunk/base/src/port/portmirror.tcl
===================================================================
--- trunk/base/src/port/portmirror.tcl 2007-09-17 07:25:45 UTC (rev 29188)
+++ trunk/base/src/port/portmirror.tcl 2007-09-17 07:32:36 UTC (rev 29189)
@@ -1,5 +1,5 @@
#!/bin/sh
-#\
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
exec @TCLSH@ "$0" "$@"
# Updates the distfiles to current distfiles by deleting old stuff.
@@ -7,14 +7,14 @@
# $Id$
catch {source \
- [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
+ [file join "@TCL_PACKAGE_DIR@" macports1.0 macports_fastload.tcl]}
package require macports
package require Pextlib
# Globals
global distfiles_filemap
-array set ui_options [list]
-array set global_options [list]
+array set ui_options [list]
+array set global_options [list]
array set global_variations [list]
# Pass global options into mportinit
@@ -29,10 +29,10 @@
proc ui_isset {val} {
global ui_options
if {[info exists ui_options($val)]} {
- if {$ui_options($val) == "yes"} {
- return 1
- }
+ if {$ui_options($val) == "yes"} {
+ return 1
}
+ }
return 0
}
@@ -40,16 +40,16 @@
proc ui_prefix {priority} {
switch $priority {
debug {
- return "DEBUG: "
+ return "DEBUG: "
}
error {
- return "Error: "
+ return "Error: "
}
warn {
- return "Warning: "
+ return "Warning: "
}
default {
- return ""
+ return ""
}
}
}
@@ -58,9 +58,9 @@
switch $priority {
debug {
if {[ui_isset ports_debug]} {
- return {stderr}
+ return {stderr}
} else {
- return {}
+ return {}
}
}
info {
@@ -68,73 +68,73 @@
return {stdout}
} else {
return {}
- }
- }
+ }
+ }
msg {
if {[ui_isset ports_quiet]} {
return {}
- } else {
- return {stdout}
- }
- }
+ } else {
+ return {stdout}
+ }
+ }
error {
- return {stderr}
+ return {stderr}
}
default {
- return {stdout}
+ return {stdout}
}
}
}
# Iterate on dist files.
#
-# func: function to call on every dist file (it is passed
-# the path as its parameter)
-# root: the directory with all the dist files (full path).
+# func: function to call on every dist file (it is passed
+# the path as its parameter)
+# root: the directory with all the dist files (full path).
proc iterate_distfiles_r {func root} {
- foreach item [readdir $root] {
- set pathToItem [file join $root $item]
+ foreach item [readdir $root] {
+ set pathToItem [file join $root $item]
if {[file isdirectory $pathToItem]} {
- iterate_distfiles_r $func $pathToItem
+ iterate_distfiles_r $func $pathToItem
} else {
- $func $pathToItem
+ $func $pathToItem
}
- }
+ }
}
# Iterate on dist files.
#
-# func: function to call on every dist file (it is passed
-# the path as its parameter)
+# func: function to call on every dist file (it is passed
+# the path as its parameter)
proc iterate_distfiles {func} {
- global macports::portdbpath
- iterate_distfiles_r $func [file join ${macports::portdbpath} distfiles]
+ global macports::portdbpath
+ iterate_distfiles_r $func [file join ${macports::portdbpath} distfiles]
}
# Check if the file is in the map and delete it otherwise.
proc iterate_walker {path} {
- global distfiles_filemap
- if {![filemap exists distfiles_filemap $path]} {
- puts "deleting $path"
- file delete -force $path
- }
+ global distfiles_filemap
+ if {![filemap exists distfiles_filemap $path]} {
+ puts "deleting $path"
+ file delete -force $path
+ }
}
# Open the database
proc open_database args {
- global macports::portdbpath distfiles_filemap
- set path [file join ${macports::portdbpath} distfiles_mirror.db]
- if {[file exists $path]} {
- filemap open distfiles_filemap $path readonly
- } else {
- return -code error "The database doesn't exist at <$path>"
- }
+ global macports::portdbpath distfiles_filemap
+ set path [file join ${macports::portdbpath} distfiles_mirror.db]
+ if {[file exists $path]} {
+ filemap open distfiles_filemap $path readonly
+ } else {
+ return -code error "The database doesn't exist at <$path>"
+ }
}
# Close the database
proc close_database args {
- global distfiles_filemap
- filemap close distfiles_filemap
+ global distfiles_filemap
+ filemap close distfiles_filemap
}
# Standard procedures
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070917/ede3d5d7/attachment.html
More information about the macports-changes
mailing list