made it compileable
This commit is contained in:
parent
60e3bed786
commit
e9567d1274
@ -2822,10 +2822,10 @@ static int checkFiles(Spec spec, StringBuf fileList, int fileListLen)
|
|||||||
StringBuf readBuf = NULL;
|
StringBuf readBuf = NULL;
|
||||||
const char *rootURL = spec->rootURL;
|
const char *rootURL = spec->rootURL;
|
||||||
const char *runDirURL = NULL;
|
const char *runDirURL = NULL;
|
||||||
const char *scriptName = NULL;
|
|
||||||
const char *runCmd = NULL;
|
|
||||||
const char *runTemplate = NULL;
|
const char *runTemplate = NULL;
|
||||||
const char *runPost = NULL;
|
const char *runPost = NULL;
|
||||||
|
const char *scriptName = NULL;
|
||||||
|
const char *runCmd = NULL;
|
||||||
const char *rootDir;
|
const char *rootDir;
|
||||||
const char *runScript;
|
const char *runScript;
|
||||||
const char *mTemplate = "%{__spec_install_template}";
|
const char *mTemplate = "%{__spec_install_template}";
|
||||||
@ -2835,7 +2835,6 @@ static int checkFiles(Spec spec, StringBuf fileList, int fileListLen)
|
|||||||
const char ** av = 0;
|
const char ** av = 0;
|
||||||
int ac = 0;
|
int ac = 0;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char *buf;
|
|
||||||
|
|
||||||
if (fileListLen == 0)
|
if (fileListLen == 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -2851,16 +2850,13 @@ static int checkFiles(Spec spec, StringBuf fileList, int fileListLen)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
runTemplate = rpmExpand(mTemplate, NULL);
|
runCmd = rpmExpand("%{?__check_files}", NULL);
|
||||||
runPost = rpmExpand(mPost, NULL);
|
if (!(runCmd && *runCmd)) {
|
||||||
|
|
||||||
runBody = rpmExpand("%{?__check_files}", NULL);
|
|
||||||
if (!(runBody && *runBody)) {
|
|
||||||
rc = -1;
|
rc = -1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
rpmMessage(RPMMESS_NORMAL, _("Finding %s (using %s)\n"), _("unpackaged files"), runBody);
|
rpmMessage(RPMMESS_NORMAL, _("Finding %s (using %s)\n"), _("unpackaged files"), runCmd);
|
||||||
|
|
||||||
if (makeTempFile(rootURL, &scriptName, &fd) || fd == NULL || Ferror(fd)) {
|
if (makeTempFile(rootURL, &scriptName, &fd) || fd == NULL || Ferror(fd)) {
|
||||||
rc = RPMERR_SCRIPT;
|
rc = RPMERR_SCRIPT;
|
||||||
@ -2879,14 +2875,18 @@ static int checkFiles(Spec spec, StringBuf fileList, int fileListLen)
|
|||||||
|
|
||||||
urlPath(scriptName, &runScript);
|
urlPath(scriptName, &runScript);
|
||||||
|
|
||||||
|
runTemplate = rpmExpand(mTemplate, NULL);
|
||||||
fputs(runTemplate, fp);
|
fputs(runTemplate, fp);
|
||||||
|
runTemplate = _free(runTemplate);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
|
|
||||||
fputs(runBody, fp);
|
fputs(runCmd, fp);
|
||||||
runBody = _free(runBody);
|
runCmd = _free(runCmd);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
|
|
||||||
|
runPost = rpmExpand(mPost, NULL);
|
||||||
fputs(runPost, fp);
|
fputs(runPost, fp);
|
||||||
|
runPost = _free(runPost);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
|
|
||||||
Fclose(xfd);
|
Fclose(xfd);
|
||||||
@ -2908,6 +2908,7 @@ static int checkFiles(Spec spec, StringBuf fileList, int fileListLen)
|
|||||||
} else {
|
} else {
|
||||||
static int _unpackaged_files_terminate_build = 0;
|
static int _unpackaged_files_terminate_build = 0;
|
||||||
static int oneshot = 0;
|
static int oneshot = 0;
|
||||||
|
char *buf;
|
||||||
|
|
||||||
if (!oneshot) {
|
if (!oneshot) {
|
||||||
_unpackaged_files_terminate_build =
|
_unpackaged_files_terminate_build =
|
||||||
@ -2924,14 +2925,11 @@ static int checkFiles(Spec spec, StringBuf fileList, int fileListLen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
if (scriptName) Unlink(scriptName);
|
||||||
freeStringBuf(readBuf);
|
freeStringBuf(readBuf);
|
||||||
av = _free(av);
|
av = _free(av);
|
||||||
runCmd = _free(runCmd);
|
runCmd = _free(runCmd);
|
||||||
if (scriptName) Unlink(scriptName);
|
|
||||||
scriptName = _free(scriptName);
|
scriptName = _free(scriptName);
|
||||||
runBody = _free(runBody);
|
|
||||||
runPost = _free(runPost);
|
|
||||||
runTemplate = _free(runTemplate);
|
|
||||||
runDirURL = _free(runDirURL);
|
runDirURL = _free(runDirURL);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user