[55416] branches/gsoc09-logging/base

enl at macports.org enl at macports.org
Mon Aug 10 05:34:55 PDT 2009


Revision: 55416
          http://trac.macports.org/changeset/55416
Author:   enl at macports.org
Date:     2009-08-10 05:34:52 -0700 (Mon, 10 Aug 2009)
Log Message:
-----------
Changed options names for log command and added documentation

Modified Paths:
--------------
    branches/gsoc09-logging/base/doc/macports.conf.5
    branches/gsoc09-logging/base/doc/macports.conf.in
    branches/gsoc09-logging/base/doc/port.1
    branches/gsoc09-logging/base/doc/portfile.7
    branches/gsoc09-logging/base/src/port/port.tcl

Modified: branches/gsoc09-logging/base/doc/macports.conf.5
===================================================================
--- branches/gsoc09-logging/base/doc/macports.conf.5	2009-08-10 11:53:35 UTC (rev 55415)
+++ branches/gsoc09-logging/base/doc/macports.conf.5	2009-08-10 12:34:52 UTC (rev 55416)
@@ -161,6 +161,11 @@
 .br
 .Ic Default:
 yes
+.It Va keeplogs 
+Keep logs for ports
+.br
+.Ic Default:
+yes
 .It Va universal_archs
 The machine architectures to use for +universal variant
 (multiple architecture entries should be space separated)

Modified: branches/gsoc09-logging/base/doc/macports.conf.in
===================================================================
--- branches/gsoc09-logging/base/doc/macports.conf.in	2009-08-10 11:53:35 UTC (rev 55415)
+++ branches/gsoc09-logging/base/doc/macports.conf.in	2009-08-10 12:34:52 UTC (rev 55416)
@@ -78,6 +78,10 @@
 # Set whether to automatically execute "clean" after "install" of ports
 portautoclean		yes
 
+# Uncomment if you dont want logs to be saved (but you will not be able to get 
+# help if something goes wrong)
+#keeplogs no
+
 # Rsync server to fetch MacPorts sources from. Note that this is only used
 # for selfupdate. The source(s) for the ports tree are set in sources.conf.
 # Known mirrors at time of writing (see http://trac.macports.org/wiki/Mirrors
@@ -135,4 +139,3 @@
 # hosts not to go through the proxy (comma-separated, applies to HTTP, HTTPS,
 # and FTP, but not rsync):
 #proxy_skip            internal1, internal2, internal3
-

Modified: branches/gsoc09-logging/base/doc/port.1
===================================================================
--- branches/gsoc09-logging/base/doc/port.1	2009-08-10 11:53:35 UTC (rev 55415)
+++ branches/gsoc09-logging/base/doc/port.1	2009-08-10 12:34:52 UTC (rev 55416)
@@ -396,10 +396,13 @@
 .Fl -archive .
 To remove the work files, distribution files and archives, pass
 .Fl -all .
+To remove log files for certain port, pass
+.Fl -logs .
 For example:
 .Pp
 .Dl "port clean --dist vim"
 .Dl "port clean --archive vim"
+.Dl "port clean --logs vim"
 .Pp
 To remove only certain version(s) of a port's archives (
 .Ar version
@@ -410,6 +413,19 @@
 or:
 .Pp
 .Dl "port clean --archive vim '6.*'"
+.Ss log
+Parses and shows log files for
+.Ar portname .
+To filter log files by some criterions use
+.Fl -phase 
+to specify phase you want to show and
+.Fl -verbosity
+to specify message category (msg, info, debug)
+For example:
+.Pp
+.Dl "port log --phase configure vim"
+.Dl "port log --phase fetch --verbosity debug vim"
+.Pp
 .Ss echo
 Writes to stdout the arguments passed to
 .Nm .

Modified: branches/gsoc09-logging/base/doc/portfile.7
===================================================================
--- branches/gsoc09-logging/base/doc/portfile.7	2009-08-10 11:53:35 UTC (rev 55415)
+++ branches/gsoc09-logging/base/doc/portfile.7	2009-08-10 12:34:52 UTC (rev 55416)
@@ -306,6 +306,14 @@
 .br
 .Sy Example:
 .Dl use_configure no
+.It Ic copy_log_files Ar path/to/logfile1 Ar path/to/logfile2 Ar ...
+Copy specific log files from the workdir to the main macports log dir
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Example:
+.Dl copy_log_files config.log
 .El
 .Sh TARGET HOOKS
 A number of hooks are available for customizing many of the standard

Modified: branches/gsoc09-logging/base/src/port/port.tcl
===================================================================
--- branches/gsoc09-logging/base/src/port/port.tcl	2009-08-10 11:53:35 UTC (rev 55415)
+++ branches/gsoc09-logging/base/src/port/port.tcl	2009-08-10 12:34:52 UTC (rev 55416)
@@ -1431,14 +1431,14 @@
             set data [read $fp]
             set data [split $data "\n"]
 
-            if {[info exists global_options(ports_log_stage)]} {
-                set stage $global_options(ports_log_stage);
+            if {[info exists global_options(ports_log_phase)]} {
+                set stage $global_options(ports_log_phase);
             } else {
                 set stage "\[a-z\]*"
             }
 
-            if {[info exists global_options(ports_log_prefix)]} {
-                set prefix $global_options(ports_log_prefix);
+            if {[info exists global_options(ports_log_verbosity)]} {
+                set prefix $global_options(ports_log_verbosity);
             } else {
                 set prefix "\[a-z\]*"
             }
@@ -3198,7 +3198,7 @@
     mirror      {new}
     lint        {nitpick}
     select      {list set show}
-    log         {{stage 1} {prefix 1}}
+    log         {{phase 1} {verbosity 1}}
 }
 
 global cmd_implied_options
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090810/70ca0df5/attachment.html>


More information about the macports-changes mailing list