Missed some unlinks() when scripts failed

CVS patchset: 2094
CVS date: 1998/04/20 01:15:41
This commit is contained in:
marc 1998-04-20 01:15:41 +00:00
parent 09ddb1a9f0
commit 47571d8adf
2 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- dep ordering returns w/ an error as soon as a prereq loop is found
- autoreqprov flag was being ignored during builds
- add autoreq: and autoprov:
- missed a few unlink() when scripts failed
2.4.108 -> 2.4.109:
- remove icons with --rmsource

View File

@ -142,6 +142,7 @@ int doScript(Spec spec, int what, char *name, StringBuf sb, int test)
if (writeVars(spec, f)) {
fclose(f);
unlink(scriptName);
FREE(scriptName);
return RPMERR_SCRIPT;
}
@ -177,6 +178,7 @@ int doScript(Spec spec, int what, char *name, StringBuf sb, int test)
execl(buildShell, buildShell, "-e", scriptName, scriptName, NULL);
rpmError(RPMERR_SCRIPT, "Exec of %s failed (%s)",
scriptName, name);
unlink(scriptName);
FREE(scriptName);
return RPMERR_SCRIPT;
}
@ -184,6 +186,7 @@ int doScript(Spec spec, int what, char *name, StringBuf sb, int test)
if (! WIFEXITED(status) || WEXITSTATUS(status)) {
rpmError(RPMERR_SCRIPT, "Bad exit status from %s (%s)",
scriptName, name);
unlink(scriptName);
FREE(scriptName);
return RPMERR_SCRIPT;
}