summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-11-26 14:43:23 +0000
committerKarl Berry <karl@freefriends.org>2008-11-26 14:43:23 +0000
commit91a07e5039963a38b2b24af568581d73e872ad34 (patch)
tree60c1944ab2e2fbe797824d0653fabe3eb9c6e956
parentfd1e7d74f623e3dd04600dd96d6eef44b6446ab1 (diff)
doc, $0 in die
git-svn-id: svn://tug.org/texlive/trunk@11433 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm33
-rwxr-xr-xMaster/tlpkg/bin/ctan2tl4
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlnet2
3 files changed, 21 insertions, 18 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 3cc08682d8a..5f3c6ffc39c 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -194,7 +194,7 @@ It returns the actual number of packages (TLPOBJs) read from C<$filename>.
sub from_file {
my ($self, $path) = @_;
if (@_ != 2) {
- die "need filename for initialization";
+ die "$0: from_file needs filename for initialization";
}
my $root_from_path = dirname(dirname($path));
if (defined($self->{'root'})) {
@@ -242,7 +242,7 @@ sub from_file {
unlink($tlpdbfile);
} else {
unlink($lzmafile);
- open $retfh, "<$tlpdbfile" or die "open($tlpdbfile) failed: $!";
+ open($retfh, "<$tlpdbfile") || die "$0: open($tlpdbfile) failed: $!";
debug("found the uncompressed lzma file\n");
}
}
@@ -254,11 +254,11 @@ sub from_file {
# lzma did not succeed, so try the normal file
$retfh = TeXLive::TLUtils::download_file($path, "|");
if (!$retfh) {
- die("Cannot open tlpdb file: $path");
+ die "open tlpdb($path) failed: $!";
}
}
} else {
- open(TMP,"<$path") || die("Cannot open tlpdb file: $path");
+ open(TMP, "<$path") || die "$0: open($path) failed: $!";
$retfh = \*TMP;
}
my $found = 0;
@@ -313,7 +313,7 @@ sub save {
my $self = shift;
my $path = $self->location;
mkdirhier(dirname($path));
- open(FOO,">$path") || die("Cannot open $path for writing: $!");
+ open(FOO, ">$path") || die "$0: open(>$path) failed: $!";
$self->writeout(\*FOO);
close(FOO);
}
@@ -396,9 +396,9 @@ sub _add_tlpcontainer {
$container .= ".lzma";
$unpackprog="NO_IDEA_HOW_TO_UNPACK_LZMA";
$args="NO IDEA WHAT ARGS IT NEEDS";
- die "lzma checked for but not implemented, maybe update TLPDB.pm\n";
+ die "$0: lzma checked for but not implemented, maybe update TLPDB.pm";
} else {
- die "Cannot find package $container (.zip or .lzma) in $ziplocation\n";
+ die "$0: No package $container (.zip or .lzma) in $ziplocation";
}
tlwarn("Huuu, this needs testing and error checking!\n");
tlwarn("Should we use -a -- adapt line endings etc?\n");
@@ -680,7 +680,9 @@ sub _generate_listfile {
}
}
}
- open(TMP, ">$destdir/$listname") or die "Cannot open $destdir/$listname!";
+ open(TMP, ">$destdir/$listname")
+ || die "$0: open(>$destdir/$listname) failed: $!";
+
# title and size information for collections and schemes in the
# first two lines, marked with *
if ($tlp->category eq "Collection") {
@@ -1052,7 +1054,7 @@ sub fmtutil_cnf_lines {
my %fmtcnffiles;
foreach my $p ($self->list_packages) {
my $obj = $self->get_package ($p);
- die "No TeX Live package named $p, strange" if ! $obj;
+ die "$0: No TeX Live package named $p, strange" if ! $obj;
foreach my $e ($obj->executes) {
if ($e =~ m/BuildFormat (.*)$/) {
$fmtcnffiles{$1} = 1;
@@ -1082,7 +1084,7 @@ sub updmap_cfg_lines {
my %maps;
foreach my $p ($self->list_packages) {
my $obj = $self->get_package ($p);
- die "No TeX Live package named $p, strange" if ! $obj;
+ die "$0: No TeX Live package named $p, strange" if ! $obj;
foreach my $e ($obj->executes) {
if ($e =~ m/addMap (.*)$/) {
$maps{$1} = 1;
@@ -1158,7 +1160,7 @@ sub _parse_hyphen_execute {
foreach my $pkg ($self->list_packages) {
my $obj = $self->get_package ($pkg);
- die "No TeX Live package named $pkg, too strange" if ! $obj;
+ die "$0: No TeX Live package named $pkg, too strange" if ! $obj;
my $first = 1;
foreach my $e ($obj->executes) {
if ($e =~ m/AddHyphen\s+(.*)\s*/) {
@@ -1174,7 +1176,7 @@ sub _parse_hyphen_execute {
foreach my $p (split(' ', $1)) {
my ($a, $b) = split /=/, $p;
if ($a eq "name") {
- die "AddHyphen line needs name=something: $pkg, $e" unless $b;
+ die "$0: AddHyphen line needs name=something: $pkg, $e" unless $b;
$name = $b; next;
}
if ($a eq "lefthyphenmin") {
@@ -1187,7 +1189,7 @@ sub _parse_hyphen_execute {
next;
}
if ($a eq "file") {
- die "AddHyphen line needs file=something: $pkg, $e" unless $b;
+ die "$0: AddHyphen line needs file=something: $pkg, $e" unless $b;
$file = $b;
next;
}
@@ -1195,9 +1197,10 @@ sub _parse_hyphen_execute {
@synonyms = split /,/, $b;
next;
}
- die "Unknown language directive in $pkg: $e";
+ die "$0: Unknown language directive in $pkg: $e";
}
- my @foo = &$coderef ($name, $lefthyphenmin, $righthyphenmin, $file, @synonyms);
+ my @foo = &$coderef ($name, $lefthyphenmin, $righthyphenmin,
+ $file, @synonyms);
push @langlines, @foo;
}
}
diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl
index 01ca9abd40c..479f363bd14 100755
--- a/Master/tlpkg/bin/ctan2tl
+++ b/Master/tlpkg/bin/ctan2tl
@@ -20,8 +20,8 @@ if test "x$1" = x--help; then
echo
echo "Install a package from CTAN into TeX Live."
echo
- echo "--place execute place to do repository adds/removes."
- echo "--no-ctan if already have files in Build/tmp.raw/PKG."
+ echo "--place, -p execute place script for repository adds/removes."
+ echo "--no-ctan if already have files in Build/tmp.raw/PKG."
echo
echo "This never actually commits anything to the repository."
echo "Without --place, it doesn't even touch anything in the repository"
diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet
index 36f8190d9ff..1d974550297 100755
--- a/Master/tlpkg/bin/tl-update-tlnet
+++ b/Master/tlpkg/bin/tl-update-tlnet
@@ -146,7 +146,7 @@ if test -z "$unexpected_output"; then
echo "$0: Chicken mode, not updating anything."
else
echo "$0: Test install ok, comparing containers." # just a test
- (cd archive && time /home/karl/bin/cmpcont) >/tmp/cmpcont 2>&1 || true
+ (cd $tltry/archive && time /home/karl/bin/cmpcont) >/tmp/cmpcont 2>&1 || true
echo "$0: Updating $tlweb from $tltry."
rm -rf $tlweb