Eliminate silly and unused timecheck feature from (lib)rpmbuild
- This was broken for years without anybody complaining, should be safe to conclude nobody will miss it later either. And if somebody misses it, this is a job for rpmlint really.
This commit is contained in:
parent
f9740318a8
commit
c22fff5b93
|
@ -226,27 +226,6 @@ static char *strtokWithQuotes(char *s, const char *delim)
|
|||
return token;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
static void timeCheck(int tc, Header h)
|
||||
{
|
||||
rpm_time_t * mtime;
|
||||
time_t currentTime = time(NULL);
|
||||
struct rpmtd_s files, mtimes;
|
||||
|
||||
headerGet(h, RPMTAG_FILENAMES, &files, HEADERGET_EXT);
|
||||
headerGet(h, RPMTAG_FILEMTIMES, &mtimes, HEADERGET_MINMEM);
|
||||
|
||||
while ((mtime = rpmtdNextUint32(&mtimes))) {
|
||||
if ((currentTime - (time_t) *mtime) > tc) {
|
||||
rpmlog(RPMLOG_WARNING, _("TIMECHECK failure: %s\n"),
|
||||
rpmtdGetString(&files));
|
||||
}
|
||||
}
|
||||
rpmtdFreeData(&files);
|
||||
rpmtdFreeData(&mtimes);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
typedef const struct VFA {
|
||||
|
@ -1937,9 +1916,6 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg,
|
|||
|
||||
genCpioListAndHeader(&fl, &pkg->cpioList, pkg->header, 0);
|
||||
|
||||
if (spec->timeCheck)
|
||||
timeCheck(spec->timeCheck, pkg->header);
|
||||
|
||||
exit:
|
||||
fl.buildRoot = _free(fl.buildRoot);
|
||||
|
||||
|
|
|
@ -544,8 +544,6 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootDir,
|
|||
spec->anyarch = anyarch;
|
||||
spec->force = force;
|
||||
|
||||
spec->timeCheck = rpmExpandNumeric("%{_timecheck}");
|
||||
|
||||
/* All the parse*() functions expect to have a line pre-read */
|
||||
/* in the spec's line buffer. Except for parsePreamble(), */
|
||||
/* which handles the initial entry into a spec file. */
|
||||
|
|
|
@ -68,8 +68,6 @@ struct rpmSpec_s {
|
|||
int force;
|
||||
int anyarch;
|
||||
|
||||
int timeCheck;
|
||||
|
||||
struct Source * sources;
|
||||
int numSources;
|
||||
int noSource;
|
||||
|
|
|
@ -224,8 +224,6 @@ rpmSpec newSpec(void)
|
|||
spec->buildRoot = NULL;
|
||||
spec->buildSubdir = NULL;
|
||||
|
||||
spec->timeCheck = 0;
|
||||
|
||||
spec->buildRestrictions = headerNew();
|
||||
spec->BANames = NULL;
|
||||
spec->BACount = 0;
|
||||
|
|
|
@ -166,7 +166,6 @@ rpmbuild alias --ftpport --define '_httpport !#:+'
|
|||
rpmbuild alias --ftpproxy --define '_httpproxy !#:+'
|
||||
rpmbuild alias --httpport --define '_httpport !#:+'
|
||||
rpmbuild alias --httpproxy --define '_httpproxy !#:+'
|
||||
rpmbuild alias --timecheck --define '_timecheck !#:+'
|
||||
rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
|
||||
--POPTdesc=$"enable configure <option> for build" \
|
||||
--POPTargs=$"<option>"
|
||||
|
|
Loading…
Reference in New Issue