Issue 14437 - configmgr: Support operation in a pipe
Summary: configmgr: Support operation in a pipe
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: utilities
Classification: Unclassified
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC Linux, all
: P5 (lowest) Trivial (vote)
Target Milestone: OOo PleaseHelp
Assignee: Stephan Bergmann
QA Contact: Unknown
URL:
Keywords: needhelp
Depends on: 21792
Blocks:
  Show dependency tree
 
Reported: 2003-05-14 14:48 UTC by chris
Modified: 2008-08-21 16:09 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description chris 2003-05-14 14:48:25 UTC
Hi Joerg, long time no hear

I've been working on .debs for 1.1 (now that 1.1 runs on Debian :) and am
looking at the mechanism for switching user interface language (Issue 10043),
and also reconfiguring other small items from scripts.  I dug out your mail to
-features about configmgr and tried it out, and it works like a charm, thanks!

I just have a small request: would it be possible to have a mechanism to read
stdin instead of a file?  The reason being, I'd like to be able to prepare a
template .xcu file and substitute the actual configuration value on the fly, e.g.

cat changeLocale.xcu.template | sed 's/%LANGUAGE%/de_DE/' | configmgr.bin -

Obviously this can also be done using a temporary file instead so don't treat my
 request as particularly high priority.  It would be nice not to have to rely on
a tempfile to avoid race conditions on architectures that do not have a secure
way to create tempfiles.

BTW, I tried using /dev/stdin as the input file but got an odd error message. 
Looks like the text should be 'input file' instead of 'output file' ?

$ cat setupLocale.xcu | ooconfigimport /dev/stdin
configimport.bin - Unhandled exception caught in main: "Cannot open output file
"file:///dev/stdin" : the format of the parameters was not valid"
Comment 1 joerg.barfurth 2003-05-14 18:10:45 UTC
Sounds like a reasonable addition.

Alas, the configimport tool uses the osl_file API and an XInputStream
on top of that for file access. A solution would require to either
provide another XInputStream implementation based on stdio or the
possibility to use stdin through the osl file API.

From a casual inquiry the latter seems possible, but probably only on
UNIX. I don't really like the idea of not offering this on all
platforms. The former seems to involve quite a lot of effort and code
for this feature.

Maybe someone can provide a stdin-XInputStream UNO service.

I'll keep the issue around, but don't expect action in the near
future. I add the 'needhelp' keyword, so whoever wants to tackle this
is welcome to contact me with some ideas on how to proceed.
Comment 2 joerg.barfurth 2005-10-20 08:54:16 UTC
Handing over

@sb: this is a low priority RFE. If issue 21792 is fixed, this one may be fixed
automatically or with trivial changes.

Set target to OOo PleaseHelp. This is something that could be taken on by an
interested community developer looking for a nicely isolated problem.
Comment 3 joerg.barfurth 2005-10-20 08:55:09 UTC
Now really reassigning
Comment 4 Stephan Bergmann 2006-12-20 08:41:30 UTC
Accepting, just to get the issue away from status NEW.
Comment 5 Stephan Bergmann 2008-08-21 16:07:24 UTC
configimport has been removed through issue 87512
Comment 6 Stephan Bergmann 2008-08-21 16:09:54 UTC
.