[ Redirecting to tools-discuss, in case anyone else has seen this before. ]
On Thu, Jul 20, 2006 at 09:59:10PM -0700, Zhishun Alex Liu wrote: > Can either one of you help me decipher the following Warning message? > Thanks so much. > > % pwd > /import/loge13/zaliu/dpnv_45/src > % /ws/onnv-tools/onbld/bin/webrev -l -f flp > Generating file list ... Done > > > CODEMGR_WS=/import/loge13/zaliu/dpnv_45/src > CODEMGR_PARENT=/ws/dpnv-gate/src > > Makefile.compilers > cdiffs udiffs wdiffs > Warning: relative_cws: "/import/loge13/zaliu/dpnv_45/src" not relative to > "/import/loge13/zaliu/dpnv_45/src". > Check input paths. Framed webrev will not be relocatable! > sdiffs frames old new > ... I believe that what's going on is that the the statement on first line of relative_cws() in webrev, "${PWD##$CWS(/)}", is evaluating to $PWD when $PWD == $CWS -- that is, when a file that's being processed is in the root of the workspace -- and is using the equality of that value to $PWD to mean that the file is outside the workspace. ON doesn't have any files in the root of the workspace, so the problem is probably not seen very often. I'm not sure what the author meant by the "(/)" part there, though it appears to work correctly if a ksh "composite pattern" is used: "${PWD##$CWS?(/)}". There's another strange use of parens a few lines later that I can't make sense of, but presumably that clause works okay. Can anyone else shed some light on why this is written the way it is? Danek _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org