mgirod / clearcase-cpan

Automatically exported from code.google.com/p/clearcase-cpan
0 stars 0 forks source link

CygWin: handling of exec('CC') from the wrappers #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In a vob, under a view, in cygwin
2. ctx des -fmt "%[owner]p\n" vob:.

What is the expected output?

nobody

[the answer under Windows]

What do you see instead?

cleartool: Error: No match for wildcard: "des -fmt %[owner]p\n vob:.".

Please use labels and text to provide additional information.

r199, ClearCase-Argv-1.44a, with ClearCase::Wrapper::DSB installed.

The trace gives (from within ClearCase/Argv.pm:_cvt_input_cw):

  DB<3> T
. = ClearCase::Argv::_cvt_input_cw(ref(ClearCase::Argv)) called from file
`/usr/lib/perl5/site_perl/5.10/ClearCase/Argv.pm' line 121
$ = ClearCase::Argv::system(ref(ClearCase::Argv), 'CC') called from file
`/usr/lib/perl5/site_perl/5.10/ClearCase/Argv.pm' line 108
$ = ClearCase::Argv::exec(ref(ClearCase::Argv), 'CC') called from file
`blib/lib/ClearCase/Wrapper/DSB.pm (autosplit into
blib/lib/auto/ClearCase/Wrapper/DSB/describe.al)' line 271
$ = ClearCase::Wrapper::DSB::describe('des', '-fmt', '%[owner]p\\n',
'vob:.') called from file `/usr/bin/cleartool.plx' line 53
  DB<3> x @{$self->{AV_ARGS}}
0  'vob:.'

But there is a sub-object with the rest of the command line:

  DB<5> x $self->{AV_LKG}->{'CC'}
0  HASH(0x21ee5e8)
   'fmt' => '%[owner]p\\n'

Original issue reported on code.google.com by marc.girod on 2 Mar 2009 at 12:22

GoogleCodeExporter commented 9 years ago
Somebody (the shell) ate the double-quotes around the format, and this hurts 
because
of the newline.

Original comment by marc.girod on 2 Mar 2009 at 3:50

GoogleCodeExporter commented 9 years ago
$ ctx des -fmt '"%[owner]p\n"' vob:.
nobody

Now, this may be a workaround, but I am not sure how, where, and on what basis, 
to
add the quotes back.
My previous comment has a flaw: the newline doesn't matter:

$ ctx des -fmt %[owner]p vob:.; echo
cleartool: Error: No match for wildcard: "des -fmt %[owner]p vob:.".

Original comment by marc.girod on 2 Mar 2009 at 3:54

GoogleCodeExporter commented 9 years ago
This is not specific to cygwin: it is an ipc problem:

$ perl -e 'use
ClearCase::Argv;ClearCase::Argv->ipc(1);$c=ClearCase::Argv->new({autochomp=>1});
$c->argv(qw(des
-fmt),q(%[owner]p\n),q(vob:.))->system'
cleartool: Error: No match for wildcard: "des -fmt %[owner]p\n vob:.".

Fixed in r203

Original comment by marc.girod on 2 Mar 2009 at 7:54