Re: TL2012 status 2012-03-06
Hi Frank,
On Di, 06 Mär 2012, Frank Küster wrote:
> > Why don't you read the code I sent you:
> > # the following actually also *reads* the configuration and returns
> > # a list where the first item is the one selected.
> > my ($current_paper, @other_options) = TeXLive::TLPaper::get_paper_list($prg)
> >
> > Isn't that what you need?
>
> Of course. I _did_ read it, but before touching any perl code. "list"
> didn't ring a bell, it does now...
tl-paper.pl I wrote *only* for you ... it is NOT used in TL, it is for
us in Debian and we can rename, change, do whatever we want. I really
just squeaked it together in hurry to show you all the options there are.
> --- TLPaper.pm (revision 25568)
> +++ TLPaper.pm (working copy)
> @@ -673,7 +673,7 @@
> TeXLive::TLUtils::announce_execute_actions("regenerate-formats")
> if ($prog eq "context");
> } else {
> - tlwarn("$0: Not a valid paper size for $prog: $newpaper\n");
> + tldie("$0: Not a valid paper size for $prog: $newpaper\n");
> }
> }
> } else {
>
> That would make things much easier to code in the libpaper script.
Hmmm... I cannot do this change so easily. We can do it for Debian,
but not for TeX Live, as it might have more consequences.
Why is it such a problem? Ah, you need to know if it failed ...
THis is a serious drawback at the current state, we don't have a consistent
error code handling in the TL perl modules and scripts. Unfortunately.
And I don't have the time to go over the whole code and fix it everywhere,
taking care not to change the semantics.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
QUEDGELEY (n.)
A rabidly left-wing politician who can afford to be that way because
he married a millionairess.
--- Douglas Adams, The Meaning of Liff
Reply to: