Eliminate silly and unused timecheck feature from (lib)rpmbuild
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Sep 2010 13:47:43 +0000 (16:47 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Sep 2010 13:48:16 +0000 (16:48 +0300)
- 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.

build/files.c
build/parseSpec.c
build/rpmspec.h
build/spec.c
rpmpopt.in

index 3f3fc58..d2272e0 100644 (file)
@@ -228,27 +228,6 @@ static char *strtokWithQuotes(char *s, const char *delim)
 
 /**
  */
-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 {
     const char const * attribute;
     int not;
@@ -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);
 
index 3fd9e79..3d99ec6 100644 (file)
@@ -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.         */
index 8a0b425..450f264 100644 (file)
@@ -68,8 +68,6 @@ struct rpmSpec_s {
     int force;
     int anyarch;
 
-    int timeCheck;
-
     struct Source * sources;
     int numSources;
     int noSource;
index 7fae654..91bc55c 100644 (file)
@@ -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;
index dc10b5b..92e3a2e 100644 (file)
@@ -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>"