Changeset 64470b0


Ignore:
Timestamp:
08/28/14 08:11:37 (12 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1, releng/10.1.1, releng/10.1.2, releng/10.2
Children:
bff92ba6
Parents:
47daad9
Message:

Add a check for the local system to resync the local info if the installed pkg list is different (don't just rely on pkg database timestamps, they seem erratic)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/syscache/daemon/DB.cpp

    r4599c59 r64470b0  
    311311      qint64 mod = QFileInfo(path).lastModified().toMSecsSinceEpoch(); 
    312312      qint64 stamp = HASH->value("Jails/"+jail+"/lastSyncTimeStamp","").toLongLong(); 
    313       return (mod > stamp); //was it modified after the last sync? 
     313      if(mod > stamp){ return true; }//was it modified after the last sync? 
     314      //Otherwise check if the installed pkg list if different (sometimes timestamps don't get updated properly on files) 
     315      return (HASH->value("Jails/"+jail+"/pkgList","") != directSysCmd("pkg query -a %o").join(LISTDELIMITER) ); 
    314316    }else{ 
    315317      //This is inside a jail - need different method 
Note: See TracChangeset for help on using the changeset viewer.