[70974] trunk/base/src/port1.0

raimue at macports.org raimue at macports.org
Sat Aug 28 17:13:15 PDT 2010


Revision: 70974
          http://trac.macports.org/changeset/70974
Author:   raimue at macports.org
Date:     2010-08-28 17:13:12 -0700 (Sat, 28 Aug 2010)
Log Message:
-----------
port1.0: Do not output unnecessary messages in quiet mode, see #25880

Modified Paths:
--------------
    trunk/base/src/port1.0/portactivate.tcl
    trunk/base/src/port1.0/portbuild.tcl
    trunk/base/src/port1.0/portchecksum.tcl
    trunk/base/src/port1.0/portclean.tcl
    trunk/base/src/port1.0/portconfigure.tcl
    trunk/base/src/port1.0/portdestroot.tcl
    trunk/base/src/port1.0/portdistfiles.tcl
    trunk/base/src/port1.0/portextract.tcl
    trunk/base/src/port1.0/portfetch.tcl
    trunk/base/src/port1.0/portinstall.tcl
    trunk/base/src/port1.0/portpatch.tcl
    trunk/base/src/port1.0/portstartupitem.tcl
    trunk/base/src/port1.0/portsubmit.tcl
    trunk/base/src/port1.0/porttest.tcl
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/port1.0/portactivate.tcl
===================================================================
--- trunk/base/src/port1.0/portactivate.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portactivate.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -71,7 +71,7 @@
 
     # Display notes at the end of the activation phase.
     if {[info exists PortInfo(notes)] && $PortInfo(notes) ne {}} {
-        ui_msg ""
+        ui_notice ""
         foreach note $PortInfo(notes) {
             # If env(COLUMNS) exists, limit each line's width to this width.
             if {[info exists env(COLUMNS)]} {
@@ -94,13 +94,13 @@
                     if {$newline ne {}} {
                         lappend lines $newline
                     }
-                    ui_msg [join $lines "\n"]
+                    ui_notice [join $lines "\n"]
                 }
             } else {
-                ui_msg $note
+                ui_notice $note
             }
         }
-        ui_msg ""
+        ui_notice ""
     }
 
     return 0

Modified: trunk/base/src/port1.0/portbuild.tcl
===================================================================
--- trunk/base/src/port1.0/portbuild.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portbuild.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -143,7 +143,7 @@
 proc portbuild::build_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Building %s"] [option name]]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Building %s"] [option name]]"
 }
 
 proc portbuild::build_main {args} {

Modified: trunk/base/src/port1.0/portchecksum.tcl
===================================================================
--- trunk/base/src/port1.0/portchecksum.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portchecksum.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -191,7 +191,7 @@
 proc portchecksum::checksum_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Verifying checksum(s) for %s"] [option name]]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Verifying checksum(s) for %s"] [option name]]"
 }
 
 # checksum_main
@@ -307,11 +307,11 @@
             # expected. Probably a helpful DNS server sent us to its search results page
             # instead of admitting that the server we asked for doesn't exist, or a mirror that
             # no longer has the file served its error page with a 200 response.
-            ui_msg "***"
-            ui_msg "The non-matching file appears to be HTML. See this page for possible reasons"
-            ui_msg "for the checksum mismatch:"
-            ui_msg "<http://trac.macports.org/wiki/MisbehavingServers>"
-            ui_msg "***"
+            ui_notice "***"
+            ui_notice "The non-matching file appears to be HTML. See this page for possible reasons"
+            ui_notice "for the checksum mismatch:"
+            ui_notice "<http://trac.macports.org/wiki/MisbehavingServers>"
+            ui_notice "***"
         }
 
         return -code error "[msgcat::mc "Unable to verify file checksums"]"

Modified: trunk/base/src/port1.0/portclean.tcl
===================================================================
--- trunk/base/src/port1.0/portclean.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portclean.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -52,7 +52,7 @@
 proc portclean::clean_start {args} {
     global UI_PREFIX
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option name]]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Cleaning %s"] [option name]]"
 }
 
 proc portclean::clean_main {args} {

Modified: trunk/base/src/port1.0/portconfigure.tcl
===================================================================
--- trunk/base/src/port1.0/portconfigure.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portconfigure.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -189,7 +189,7 @@
 proc portconfigure::configure_start {args} {
     global UI_PREFIX configure.compiler
     
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option name]]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option name]]"
 
     set name ""
     switch -exact ${configure.compiler} {

Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portdestroot.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -93,7 +93,7 @@
     global applications_dir frameworks_dir
     variable oldmask
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${name}]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Staging %s into destroot"] ${name}]"
 
     # start gsoc08-privileges
     if { [getuid] == 0 && [geteuid] != 0 } {
@@ -337,7 +337,7 @@
             # error "mtree violation!"
         }
     } else {
-        ui_msg "[format [msgcat::mc "Note: %s installs files outside the common directory structure."] [option name]]"
+        ui_warn "[format [msgcat::mc "%s installs files outside the common directory structure."] [option name]]"
     }
 
     # Restore umask

Modified: trunk/base/src/port1.0/portdistfiles.tcl
===================================================================
--- trunk/base/src/port1.0/portdistfiles.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portdistfiles.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -49,7 +49,7 @@
 
 proc portdistfiles::distfiles_start {args} {
     global UI_PREFIX name
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${name}]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Distfiles for %s"] ${name}]"
 }
 
 proc portdistfiles::distfiles_main {args} {

Modified: trunk/base/src/port1.0/portextract.tcl
===================================================================
--- trunk/base/src/port1.0/portextract.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portextract.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -75,7 +75,7 @@
 proc portextract::extract_start {args} {
     global UI_PREFIX extract.dir extract.mkdir use_bzip2 use_lzma use_xz use_zip use_7z use_dmg
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option name]]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Extracting %s"] [option name]]"
 
     # should the distfiles be extracted to worksrcpath instead?
     if {[tbool extract.mkdir]} {

Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portfetch.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -534,7 +534,7 @@
 proc portfetch::fetch_start {args} {
     global UI_PREFIX name
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $name]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Fetching %s"] $name]"
 }
 
 # Main fetch routine

Modified: trunk/base/src/port1.0/portinstall.tcl
===================================================================
--- trunk/base/src/port1.0/portinstall.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portinstall.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -59,7 +59,7 @@
 proc portinstall::install_start {args} {
     global UI_PREFIX name version revision portvariants
     global prefix registry_open registry.format registry.path
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $name $version $revision $portvariants]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Installing %s @%s_%s%s"] $name $version $revision $portvariants]"
     
     # start gsoc08-privileges
     if {![file writable $prefix] || ([getuid] == 0 && [geteuid] != 0)} {

Modified: trunk/base/src/port1.0/portpatch.tcl
===================================================================
--- trunk/base/src/port1.0/portpatch.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portpatch.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -75,7 +75,7 @@
         return 0
     }
 
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Applying patches to %s"] [option name]]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Applying patches to %s"] [option name]]"
 
     foreach patch [option patchfiles] {
         set patch_file [getdistname $patch]

Modified: trunk/base/src/port1.0/portstartupitem.tcl
===================================================================
--- trunk/base/src/port1.0/portstartupitem.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portstartupitem.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -379,14 +379,14 @@
     close ${para}
     
     # Emit some information for the user
-    ui_msg "###########################################################"
-    ui_msg "# A startup item has been generated that will aid in"
-    ui_msg "# starting ${name} with SystemStarter. It is disabled"
-    ui_msg "# by default. Add the following line to /etc/hostconfig"
-    ui_msg "# or ${prefix}/etc/rc.conf to start it at startup:"
-    ui_msg "#"
-    ui_msg "# ${uppername}=-YES-"
-    ui_msg "###########################################################"
+    ui_notice "###########################################################"
+    ui_notice "# A startup item has been generated that will aid in"
+    ui_notice "# starting ${name} with SystemStarter. It is disabled"
+    ui_notice "# by default. Add the following line to /etc/hostconfig"
+    ui_notice "# or ${prefix}/etc/rc.conf to start it at startup:"
+    ui_notice "#"
+    ui_notice "# ${uppername}=-YES-"
+    ui_notice "###########################################################"
 }
 
 proc portstartupitem::startupitem_create_darwin_launchd {args} {
@@ -597,23 +597,23 @@
     # If launchd is not available, warn the user
     set haveLaunchd ${portutil::autoconf::have_launchd}
     if {![tbool haveLaunchd]} {
-        ui_msg "###########################################################"
-        ui_msg "# WARNING:"
-        ui_msg "# We're building a launchd startup item, but launchd wasn't"
-        ui_msg "# found by configure. Are you sure you didn't mess up your"
-        ui_msg "# macports.conf settings?"
-        ui_msg "###########################################################"
+        ui_notice "###########################################################"
+        ui_notice "# WARNING:"
+        ui_notice "# We're building a launchd startup item, but launchd wasn't"
+        ui_notice "# found by configure. Are you sure you didn't mess up your"
+        ui_notice "# macports.conf settings?"
+        ui_notice "###########################################################"
     }
     
     # Emit some information for the user
-    ui_msg "###########################################################"
-    ui_msg "# A startup item has been generated that will aid in"
-    ui_msg "# starting ${name} with launchd. It is disabled"
-    ui_msg "# by default. Execute the following command to start it,"
-    ui_msg "# and to cause it to launch at startup:"
-    ui_msg "#"
-    ui_msg "# sudo port load ${name}"
-    ui_msg "###########################################################"
+    ui_notice "###########################################################"
+    ui_notice "# A startup item has been generated that will aid in"
+    ui_notice "# starting ${name} with launchd. It is disabled"
+    ui_notice "# by default. Execute the following command to start it,"
+    ui_notice "# and to cause it to launch at startup:"
+    ui_notice "#"
+    ui_notice "# sudo port load ${name}"
+    ui_notice "###########################################################"
 }
 
 proc portstartupitem::startupitem_create {args} {
@@ -640,9 +640,9 @@
     }
 
     if { ${startupitem.type} == "none" } {
-        ui_msg "$UI_PREFIX [msgcat::mc "Skipping creation of control script"]"
+        ui_notice "$UI_PREFIX [msgcat::mc "Skipping creation of control script"]"
     } else {
-        ui_msg "$UI_PREFIX [msgcat::mc "Creating ${startupitem.type} control script"]"
+        ui_notice "$UI_PREFIX [msgcat::mc "Creating ${startupitem.type} control script"]"
 
         switch -- ${startupitem.type} {
             launchd         { startupitem_create_darwin_launchd }

Modified: trunk/base/src/port1.0/portsubmit.tcl
===================================================================
--- trunk/base/src/port1.0/portsubmit.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portsubmit.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -83,7 +83,7 @@
     set cmd [join $args]
 
     if {[tbool portverbose]} {
-        ui_msg "Submitting portpkg $pkgpath for $name to $submiturl"
+        ui_notice "Submitting portpkg $pkgpath for $name to $submiturl"
     }
 
     # Invoke curl to do the submit
@@ -104,16 +104,16 @@
 
     # Interpret and act on the result
     if {[info exists result(MESSAGE)] && [tbool portverbose]} {
-        ui_msg $result(MESSAGE)
+        ui_notice $result(MESSAGE)
     }
     if {[info exists result(STATUS)]} {
         if { $result(STATUS) == 0 } {
-            ui_msg "Submitted portpkg for $name"
+            ui_notice "Submitted portpkg for $name"
             if {[info exists result(DOWNLOAD_URL)]} {
-                ui_msg "    download URL => $result(DOWNLOAD_URL)"
+                ui_notice "    download URL => $result(DOWNLOAD_URL)"
             }
             if {[info exists result(HUMAN_URL)]} {
-                ui_msg "    human readable URL => $result(HUMAN_URL)"
+                ui_notice "    human readable URL => $result(HUMAN_URL)"
             }
         } else {
             return -code error [format [msgcat::mc "Status %d reported during submit of port %s"] $result(STATUS) $name]
@@ -152,13 +152,13 @@
         close $fd
     }
     if {$portsource == ""} {
-        ui_msg "$UI_PREFIX Submitting $name-$version"
+        ui_notice "$UI_PREFIX Submitting $name-$version"
         puts -nonewline "URL: "
         flush stdout
         gets stdin portsource
     }
 
-    ui_msg "$UI_PREFIX Submitting $name-$version to $portsource"
+    ui_notice "$UI_PREFIX Submitting $name-$version to $portsource"
 
     puts -nonewline "Username: "
     flush stdout
@@ -222,8 +222,8 @@
         puts $fd "revision: $result(revision)"
         close $fd
 
-        ui_msg "$name-$version submitted successfully."
-        ui_msg "New revision: $result(revision)"
+        ui_notice "$name-$version submitted successfully."
+        ui_notice "New revision: $result(revision)"
     } elseif {[info exists result(ERROR)]} {
         return -code error $result(ERROR)
     } elseif {[info exists result(CONFLICT)]} {

Modified: trunk/base/src/port1.0/porttest.tcl
===================================================================
--- trunk/base/src/port1.0/porttest.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/porttest.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -27,7 +27,7 @@
 
 proc porttest::test_start {args} {
     global UI_PREFIX name
-    ui_msg "$UI_PREFIX [format [msgcat::mc "Testing %s"] ${name}]"
+    ui_notice "$UI_PREFIX [format [msgcat::mc "Testing %s"] ${name}]"
 }
 
 proc porttest::test_main {args} {

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2010-08-28 22:31:13 UTC (rev 70973)
+++ trunk/base/src/port1.0/portutil.tcl	2010-08-29 00:13:12 UTC (rev 70974)
@@ -1027,8 +1027,7 @@
     # do we have any files to process?
     if {[llength $args] == 0} {
         # print usage
-        ui_msg {usage: touch [-a] [-c] [-m] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...}
-        return
+        return -code error {usage: touch [-a] [-c] [-m] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...}
     }
 
     foreach file $args {
@@ -1085,9 +1084,8 @@
     }
 
     if {[llength $args] == 0} {
-        ui_msg {usage: ln [-f] [-h] [-s] [-v] source_file [target_file]}
-        ui_msg {       ln [-f] [-h] [-s] [-v] file ... directory}
-        return
+        return -code error [join {{usage: ln [-f] [-h] [-s] [-v] source_file [target_file]}
+                                  {       ln [-f] [-h] [-s] [-v] file ... directory}} "\n"]
     } elseif {[llength $args] == 1} {
         set files $args
         set target ./
@@ -1125,7 +1123,7 @@
         }
 
         if {[info exists options(v)]} {
-            ui_msg "ln: $linktarget -> $file"
+            ui_notice "ln: $linktarget -> $file"
         }
         if {[info exists options(s)]} {
             symlink $file $linktarget
@@ -1243,7 +1241,7 @@
             if {[info exists ports_dryrun] && $ports_dryrun == "yes"} {
                 # only one message per portname
                 if {$portname != $ports_dry_last_skipped} {
-                    ui_msg "For $portname: skipping $targetname (dry run)"
+                    ui_notice "For $portname: skipping $targetname (dry run)"
                     set ports_dry_last_skipped $portname
                 } else {
                     ui_info "    .. and skipping $targetname"
@@ -1562,12 +1560,12 @@
         }
         if {!([info exists ports_ignore_older] && $ports_ignore_older == "yes") && [file mtime $statefile] < [file mtime ${portpath}/Portfile]} {
             if {![tbool ports_dryrun]} {
-                ui_msg "Portfile changed since last build; discarding previous state."
+                ui_notice "Portfile changed since last build; discarding previous state."
                 chownAsRoot $portbuildpath
                 delete $workpath
                 file mkdir $workpath
             } else {
-                ui_msg "Portfile changed since last build but not discarding previous state (dry run)"
+                ui_notice "Portfile changed since last build but not discarding previous state (dry run)"
             }
         }
     } elseif {[tbool ports_dryrun]} {
@@ -1578,7 +1576,7 @@
     if {![tbool ports_dryrun]} {
         if {[catch {flock $fd -exclusive -noblock} result]} {
             if {"$result" == "EAGAIN"} {
-                ui_msg "Waiting for lock on $statefile"
+                ui_notice "Waiting for lock on $statefile"
                 flock $fd -exclusive
             } elseif {"$result" == "EOPNOTSUPP"} {
                 # Locking not supported, just return
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100828/d2711650/attachment.html>


More information about the macports-changes mailing list