gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘Dia broken by 7075ba10648296389c193ed835112b0c920e5335


From: Fred Wright
Subject: Re: ✘Dia broken by 7075ba10648296389c193ed835112b0c920e5335
Date: Sun, 3 Jan 2021 17:04:55 -0800 (PST)
User-agent: Alpine 2.23 (OSX 453 2020-06-18)


On Sun, 3 Jan 2021, Gary E. Miller wrote:
Yo Fred!

You made all tergets of Utility() to be Pseudo(), but that is not
always true.  It leads to this error when using dia:

[...]
chmod -w gpsd-3.21.1~dev/www/hacking.html
Creating 'gpsd-3.21.1~dev/www/index.html'
chmod -w gpsd-3.21.1~dev/www/index.html
Creating 'gpsd-3.21.1~dev/www/troubleshooting.html'
chmod -w gpsd-3.21.1~dev/www/troubleshooting.html
cd gpsd-3.21.1~dev; dia -e www/cycle.svg www/cycle.dia
No protocol specified
www/cycle.dia --> www/cycle.svg

scons: *** Pseudo target gpsd-3.21.1~dev/www/cycle.svg must not exist
File "/usr/lib/python3.9/site-packages/SCons/Node/__init__.py", line 804, in 
built

Git has a copy of cycle.svg, built by dia from cycle.dia, because most
users to not have dia installed.

Sorry - that went unnoticed since I didn't have 'dia' installed here.

Utility() was intended for "named procedures" which are always aliases, so it's not the proper choice for a file target, though it didn't generate any complaints in such cases until Pseudo() was added. This seems to be the only use of Utility() for a file target, where plain old Command() is the proper choice, and seems to be working so far (after installing 'dia').

I don't think it makes sense to include an Alias() for it, since that only matters when using that specific file as a target on the command line, where needing to prefix it with the variantdir is no different than any of the other build products (which may or may not be worth fixing). The normal Utility() targets aren't files at all, so having to prefix them with variantdir was a silliness that was inconsistently fixed.

I see no reason to apply Precious() to cycle.svg, given the way it's built. It also seems that Precious() is utterly pointless for a non-file target, so the comment in Utility() is quite correct in questioning it. :-)

The commit that originally introduced Pseudo() didn't explain what misbehavior it was fixing, though I had to disable it for SCons 2.3.0, where it doesn't exist. The limited documentation on Pseudo() explains *when* one might use it, but not *why*.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]