Project

General

Profile

Bug #11197

wsdiff -t looks for wrong tools proto location

Added by Anonymous 5 months ago. Updated 4 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

The wsdiff -t option is currently looking for the tools proto in $SRC/tools/proto.
Here's an excerpt from wsdiff.py find_tools(..):

1312         if localTools :
1313                 try:
1314                         src = os.environ['SRC']
1315                 except:
1316                         error("-t specified, but $SRC not set. Cannot find $SRC/tools")
1317                         src = "" 
1318                 if len(src) > 0 :
1319                         wsdiff_path.insert(0, src + "/tools/proto/opt/onbld/bin")
1320

which means that when running wsdiff in a built workspace, we get:

timf@smartos-build (release-20190523) echo $SRC
/space/timf/smartos-live-64/projects/illumos/usr/src
timf@smartos-build (release-20190523) ./tools/scripts/wsdiff -t $M/proto $X/proto
ERROR: Could not find path to: lintdump

interestingly, when running it from $SRC/tools, we don't complain! This is because
find_tools() is incorrectly selecting the $SRC/tools/lintdump directory, so attempting
to run that binary will always fail.

We should be looking in the $TOOLS_PROTO area, which is by default:

timf@smartos-build (release-20190523) cat -n Makefile.tools | grep TOOLS_PROTO
    31  TOOLS_PROTO=            $(TOOLS)/proto/root_$(MACH)-nd
    32  ROOTOPT=                $(TOOLS_PROTO)/opt

The fix here is to to add root_<arch>-nd, and to change find_tools() from
using os.path.exists(location) which is otherwise masking this error.

History

#1

Updated by Tim Foster 5 months ago

  • Assignee changed from Anonymous to Tim Foster
#2

Updated by Tim Foster 5 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90
#3

Updated by Rich Lowe 4 months ago

Something I've wanted to do for a while is move the tools proto to ${CODEMGR_WS}/proto/tools_${MACH}
(include -nd, if you feel strongly about them "always being non-debug").

The reason things like this manage to creep in and survive is that we hide the tools proto so bloody well in the first place.

Also available in: Atom PDF