job000013

miklos_fazekas (Miklos Fazekas)
Miklos Fazekas created this job , modified by Matt Attaway
Closed
TOGETHER targets not removed on failure

From: http://maillist.perforce.com/pipermail/jamming/2002-January/001537.html :

| If an actions fails it's targets are delted by jam.
| If the action is marked with TOGETHER it's targets are not deleted. Why?
|
| I'd like them to be deleted.
|
| Code from make1.c
| > /* If the command was interrupted or failed and the target */
| >/* is not "precious", remove the targets */
| >
| >if( status != EXEC_CMD_OK && !( cmd->rule->flags & RULE_TOGETHER ) )
| >{
| >     LIST *targets = lol_get( &cmd->args, 0 );
| >
| >     for( ; targets; targets = list_next( targets ) )
| >if( !unlink( targets->string ) )
| >     printf( "...removing %s\n", targets->string );
| >}
|
| Is !( cmd->rule->flags & RULE_TOGETHER ) neccesary here?!
|
| Reagards,
| Miklos
1494Switch "delete target on failed update?" test to protect targets
marked with 'actions updated', not 'actions together'.

The idea is that targets with state (those updated, not replaced)
shouldn't be deleted if their update fails.  But the test was on
'actions together' (which in the stock Jambase is always used with
'actions updated'), when it should be on 'actions updated'.

Bug fix documented in RELNOTES.
  • Details
  • Comments -
Status
Closed
Project
jam
Severity
C
Reported By
Miklos Fazekas
Reported Date
Modified By
Matt Attaway
Modified Date