[24702] trunk/base/portmgr/autosubmit.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Mon Apr 30 09:30:23 PDT 2007
Revision: 24702
http://trac.macosforge.org/projects/macports/changeset/24702
Author: jberry at macports.org
Date: 2007-04-30 09:30:23 -0700 (Mon, 30 Apr 2007)
Log Message:
-----------
bit of cleanup to autosubmit
Modified Paths:
--------------
trunk/base/portmgr/autosubmit.tcl
Modified: trunk/base/portmgr/autosubmit.tcl
===================================================================
--- trunk/base/portmgr/autosubmit.tcl 2007-04-30 16:29:39 UTC (rev 24701)
+++ trunk/base/portmgr/autosubmit.tcl 2007-04-30 16:30:23 UTC (rev 24702)
@@ -1,26 +1,15 @@
-#!/bin/sh
-#\
-exec /usr/bin/tclsh "$0" "$@"
+#!/usr/bin/env tclsh
-# Updates the distfiles to current distfiles by deleting old stuff.
-# Uses the database.
-# $Id: portmirror.tcl 24631 2007-04-29 05:35:59Z jmpp at macports.org $
-
# TODO:
-# - autoconfigurize the tcl path
# - don't use a hard-coded db location
-# - search path is hardcoded at the moment
-
-catch {source \
- [file join "@TCL_PACKAGE_DIR@" darwinports1.0 darwinports_fastload.tcl]}
package require darwinports
package require sqlite3
proc open_db {} {
# Open/create our database
- sqlite3 db "/Users/jberry/autosubmit.sqlite3"
+ sqlite3 db "/Users/jberry/autosubmit.db"
db timeout 10000
if { [llength [db eval {pragma table_info('SubmitInfo')}]] == 0 } {
db eval {
@@ -44,7 +33,7 @@
proc check_ports {} {
- if {[catch {set res [dportsearch "^commons-.*\$"]} result]} {
+ if {[catch {set res [dportsearch "^.*\$"]} result]} {
puts "port search failed: $result"
exit 1
}
@@ -74,6 +63,7 @@
if { [llength $values] == 0 } {
puts "submitting ${name}"
+ # Open the port
if {[catch {set workername [dportopen $porturl]} result]} {
global errorInfo
ui_debug "$errorInfo"
@@ -81,14 +71,19 @@
continue
}
+ # Submit the port
if {[catch {set result [dportexec $workername submit]} result]} {
global errorInfo
dportclose $workername
ui_debug "$errorInfo"
puts "Unable to execute port: $result"
+
+ # Cleanup
+ dportclose $workername
continue
}
+ # Close the port
dportclose $workername
# Update the date in the database for this item
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070430/83930232/attachment.html
More information about the macports-changes
mailing list