Author: gotar Date: Sat Mar 27 19:01:36 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- rel. 4; updated run-mailcap and manpages from Debian's mime-support 3.48
---- Files affected:
packages/mailcap:
mailcap.4 (1.1 -> 1.2) , mailcap.spec (1.60 -> 1.61) , run-mailcap (1.4 ->
1.5) , run-mailcap.man (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/mailcap/mailcap.4
diff -u packages/mailcap/mailcap.4:1.1 packages/mailcap/mailcap.4:1.2
--- packages/mailcap/mailcap.4:1.1 Wed Aug 25 13:45:24 2004
+++ packages/mailcap/mailcap.4 Sat Mar 27 20:01:28 2010
@@ -1,4 +1,5 @@
-.TH MAILCAP 4 "Release 2" "Bellcore Prototype"
+.\" Hey, Emacs! This is an -*- nroff -*- source file.
+.TH MAILCAP 5 "Release 2" "Bellcore Prototype"
.SH NAME
mailcap - metamail capabilities file
.SH DESCRIPTION
@@ -20,13 +21,9 @@
can be used to indicate that the output of the 'cat' command may be
voluminous, requiring either a scrolling window, a pager, or some other
appropriate coping mechanism.
-The "type" field (text/plain, in the above example) is simply any legal
content type name, as defined by RFC 822. In practice, this is almost any
string. It is the string that will be matched against the "Content-type"
header (or the value passed in with -c) to decide if this is the mailcap entry
that matches the current message. Additionally, the type field may specify a
subtype (e.g. "text/ISO-8859-1") or a wildcard to match all subtypes (e.g.
"image/*").
+The "type" field (text/plain, in the above example) is simply any legal
content type name, as defined by informational RFC 1524. In practice, this is
almost any string. It is the string that will be matched against the
"Content-type" header (or the value passed in with -c) to decide if this is the
mailcap entry that matches the current message. Additionally, the type field
may specify a subtype (e.g. "text/ISO-8859-1") or a wildcard to match all
subtypes (e.g. "image/*").
-The "command" field is any UNIX command ("cat %s" in the above example), and
is used to specify the interpreter for the given type of message. It will be
passed to the shell via the system(3) facility. Semicolons and backslashes
within the command must be quoted with backslashes. If the command contains
"%s", those two characters will be replaced by the name of a file that contains
the body of the message. If it contains "%t', those two characters will be
replaced by the content-type field, including the subtype, if any. (That is,
if the content-type was "image/pbm; opt1=something-else", then "%t" would be
replaced by "image/pbm".) If the command field contains "%{" followed by a
parameter name and a closing "}", then all those characters will be replaced by
the value of the named parameter, if any, from the Content-type header. Thus,
in the previous example, "%{opt1}" will be replaced by "something-else".
Finally, if the command contains "\%", those two characters
will be replaced by a single % ch
-
-
-
-aracter. (In fact, the backslash can be used to quote any character,
including itself.)
+The "command" field is any UNIX command ("cat %s" in the above example), and
is used to specify the interpreter for the given type of message. It will be
passed to the shell via the system(3) facility. Semicolons and backslashes
within the command must be quoted with backslashes. If the command contains
"%s", those two characters will be replaced by the name of a file that contains
the body of the message. If it contains "%t", those two characters will be
replaced by the content-type field, including the subtype, if any. (That is,
if the content-type was "image/pbm; opt1=something-else", then "%t" would be
replaced by "image/pbm".) If the command field contains "%{" followed by a
parameter name and a closing "}", then all those characters will be replaced by
the value of the named parameter, if any, from the Content-type header. Thus,
in the previous example, "%{opt1}" will be replaced by "something-else".
Finally, if the command contains "\\%", those two character
s will be replaced by a single % character. (In fact, the backslash can be
used to quote any character, including itself.)
If no "%s" appears in the command field, then instead of placing the message
body in a temporary file, metamail will pass the body to the command on the
standard input. This is helpful in saving /tmp file space, but can be
problematic for window-oriented applications under some window systems such as
MGR.
@@ -53,9 +50,10 @@
.SH BUILT-IN CONTENT-TYPE SUPPORT
The metamail program has built-in support for a few key content-types. In
particular, it supports the text type, the multipart and multipart/alternative
type, and the message/rfc822 types. This support is incomplete for many
subtypes -- for example, it only supports US-ASCII text in general. This kind
of built-in support can be OVERRIDDEN by an entry in any mailcap file on the
user's search path. Metamail also has rudimentary built-in support for types
that are totally unrecognized -- i.e. for which no mailcap entry or built-in
handler exists. For such unrecognized types, metamail will write a file with a
"clean" copy of the data -- i.e. a copy in which all mail headers have been
removed, and in which any 7-bit transport encoding has been decoded.
.SH FILES
-$HOME/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap -- default
path for mailcap files.
+$HOME/.mailcap:/etc/mailcap:/usr/share/etc/mailcap:/usr/local/etc/mailcap --
default path for mailcap files.
.SH SEE ALSO
-metamail(1)
+.BR run-mailcap "(1)",
+.BR update-mime-database "(1)"
.SH COPYRIGHT
Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
================================================================
Index: packages/mailcap/mailcap.spec
diff -u packages/mailcap/mailcap.spec:1.60 packages/mailcap/mailcap.spec:1.61
--- packages/mailcap/mailcap.spec:1.60 Wed Nov 25 21:23:11 2009
+++ packages/mailcap/mailcap.spec Sat Mar 27 20:01:28 2010
@@ -13,7 +13,7 @@
Summary(tr.UTF-8): Çeşitli programlar için çokluortam yardımcı
uygulamaları tanımlar
Name: mailcap
Version: 2.3
-Release: 3
+Release: 4
License: Public Domain
Group: Base
Source0:
https://fedorahosted.org/released/mailcap/mailcap-%{fcver}.tar.gz
@@ -135,6 +135,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.61 2010/03/27 19:01:28 gotar
+- rel. 4; updated run-mailcap and manpages from Debian's mime-support 3.48
+
Revision 1.60 2009/11/25 20:23:11 arekm
rel 3; use maintained mime.types
================================================================
Index: packages/mailcap/run-mailcap
diff -u packages/mailcap/run-mailcap:1.4 packages/mailcap/run-mailcap:1.5
--- packages/mailcap/run-mailcap:1.4 Thu May 28 01:33:16 2009
+++ packages/mailcap/run-mailcap Sat Mar 27 20:01:28 2010
@@ -11,6 +11,8 @@
$debug=0;
+$norun=0;
+$pager=0;
$etcmimetyp="/etc/mime.types";
$shrmimetyp="/usr/share/etc/mime.types";
$locmimetyp="/usr/local/etc/mime.types";
@@ -39,6 +41,8 @@
print STDERR "Options:\n";
print STDERR " action specify what action to do on these files
(default=view)\n";
print STDERR " debug be verbose about what's going on\n";
+ print STDERR " pager ignore any \"copiousoutput\" directives and
use a \"pager\"\n";
+ print STDERR " norun just print but don't execute the command
(useful with --debug)\n";
print STDERR "\n";
print STDERR "Mime-Type:\n";
print STDERR " any standard mime type designation in the form
<class>/<subtype> -- if\n";
@@ -357,6 +361,7 @@
unless ($action) {
if ($0 =~ m!(^|/)view$!) { $action="view"; }
elsif ($0 =~ m!(^|/)see$!) { $action="view"; }
+ elsif ($0 =~ m!(^|/)cat$!) { $action="cat"; }
elsif ($0 =~ m!(^|/)edit$!) { $action="edit"; }
elsif ($0 =~ m!(^|/)change$!) { $action="edit"; }
elsif ($0 =~ m!(^|/)compose$!) { $action="compose";}
@@ -420,14 +425,14 @@
$_ = "\Q$1\E"; s/\\\*/\.\*/g;
push @matches,$entry if ($type =~ m!^$_$!i);
}
- @matches = grep(/\Q$action\E=/,@matches) unless $action eq "view";
+ @matches = grep(/\Q$action\E=/,@matches) unless ($action eq "view" ||
$action eq "cat");
my $done=0;
my $fail=0;
foreach $match (@matches) {
my $comm;
print STDERR " - checking mailcap entry \"$match\"\n" if $debug;
- if ($action eq "view") {
+ if ($action eq "view" || $action eq "cat") {
($comm) = ($match =~ m/^.*?;\s*(.*?)\s*($|;)/);
} else {
($comm) = ($match =~ m/\Q$action\E=(.*?)\s*($|;)/);
@@ -435,17 +440,11 @@
next if (!$comm || $comm =~ m!(^|/)false$!i);
print STDERR " - program to execute: $comm\n" if $debug;
- if ($match =~ m/;\s*test=(.*?)\s*($|;)/) {
- my $test;
- print STDERR " - running test: $1 " if $debug;
- $test = system "$1 >/dev/null 2>&1";
- $test >>= 8;
- print STDERR " (result=$test=",($test!=0?"false":"true"),")\n" if
$debug;
- if ($test) {
- $fail++;
- next;
- }
- }
+ if ($action eq 'cat' && $match !~ m/;\s*copiousoutput\s*($|;)/) {
+ print STDERR " - \"copiousoutput\" is required for \"cat\"
action\n" if $debug;
+ $fail++;
+ next;
+ }
my($tmpfile,$tmplink);
if ($action ne 'print' && $match =~ m/;\s*needsterminal\s*($|;)/ && !
-t STDOUT) {
@@ -456,6 +455,20 @@
$fail++;
next;
}
+ } elsif ($action eq 'view' && $pager && $match =~
m/;\s*copiousoutput\s*($|;)/ && $type ne 'text/plain') {
+ $comm .= " | $0 --action=$action text/plain:-";
+ }
+
+ if ($match =~ m/;\s*test=(.*?)\s*($|;)/) {
+ my $test;
+ print STDERR " - running test: $1 " if $debug;
+ $test = system "$1 >/dev/null 2>&1";
+ $test >>= 8;
+ print STDERR " (result=$test=",($test!=0?"false":"true"),")\n" if
$debug;
+ if ($test) {
+ $fail++;
+ next;
+ }
}
if ($file ne "-") {
@@ -508,8 +521,13 @@
$comm =~ s!$quotedprct!%!go;
print STDERR " - executing: $comm\n" if $debug;
- $res = system $comm;
- $res = int($res/256);
+ if ($norun) {
+ print $comm,"\n";
+ $res = 0;
+ } else {
+ $res = system $comm;
+ $res = int($res/256);
+ }
if ($res != 0) {
print STDERR "Warning: program returned non-zero exit code
\#$res\n";
$retcode = $res;
================================================================
Index: packages/mailcap/run-mailcap.man
diff -u packages/mailcap/run-mailcap.man:1.1
packages/mailcap/run-mailcap.man:1.2
--- packages/mailcap/run-mailcap.man:1.1 Thu Apr 30 18:06:05 2009
+++ packages/mailcap/run-mailcap.man Sat Mar 27 20:01:28 2010
@@ -9,7 +9,7 @@
file
.SH SYNOPSIS
.B run-mailcap
-\-\-action=ACTION [\-\-debug]
+\-\-action=ACTION [\-\-option[=value]]
[MIME-TYPE:[ENCODING:]]FILE [...]
The
@@ -57,6 +57,8 @@
.BI \-\-action=<action>
Performs the specified action on the files. Valid actions are
.IR view ,
+.IR cat
+(like view but never paged) ,
.IR compose ,
.IR composetyped ,
.I edit
@@ -65,9 +67,14 @@
If no action is specified, the action will be determined by how the
program was called.
.TP
-.BI \-\-debug=<value>
-Turns on extra information to find out what is happening. Any value
-other than zero (0) will turn on debugging output.
+.BI \-\-debug
+Turns on extra information to find out what is happening.
+.TP
+.BI \-\-nopager
+Ignores any "copiousoutput" directive and sends output to STDOUT.
+.TP
+.BI \-\-norun
+Displays the found command without actually executing it.
.SH "SEE ALSO"
.BR update-mime "(8)"
.SH AUTHOR
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mailcap/mailcap.4?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mailcap/mailcap.spec?r1=1.60&r2=1.61&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mailcap/run-mailcap?r1=1.4&r2=1.5&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mailcap/run-mailcap.man?r1=1.1&r2=1.2&f=u
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit