Changeset 8205673


Ignore:
Timestamp:
08/26/14 11:03:00 (9 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
b1edcee
Parents:
9cb7cdd
Message:

Clean up when a repo information is cleared. This fixes problem when a later jail with the same repo setup experiences a pkg error - just let it use the info found previously instead of clearing the info and failing to re-fill it.

File:
1 edited

Legend:

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

    r3728a270 r8205673  
    132132    } 
    133133  } 
    134   qDebug() << "Request Key:" << hashkey; 
     134  //qDebug() << "Request Key:" << hashkey; 
    135135  //Now fetch/return the info 
    136136  QString val; 
     
    236236   //QTimer time(this); 
    237237    //time.setSingleShot(true); 
    238     //time.start(120000); //2 minute timeout 
     238    //time.start(5000); //5 second timeout 
    239239   while(p.state()==QProcess::Starting || p.state() == QProcess::Running){ 
    240      //if(!time.isActive()){ 
    241        //p.terminate(); //hung process - kill it 
    242      //} 
     240     /*if(!time.isActive()){ 
     241       p.terminate(); //hung process - kill it 
     242     }*/ 
    243243     p.waitForFinished(100); 
    244244     QCoreApplication::processEvents(); 
     
    420420    if(info[i].isEmpty()){ continue; } 
    421421    QStringList tmp = info[i].split("----"); 
    422     qDebug() << "tmp:" << tmp; 
     422    //qDebug() << "tmp:" << tmp; 
    423423    //Create the info strings possible 
    424424    QString ID, HOST, IPV4, AIPV4, BIPV4, ABIPV4, ROUTERIPV4, IPV6, AIPV6, BIPV6, ABIPV6, ROUTERIPV6, AUTOSTART, VNET, TYPE; 
     
    655655    //qDebug() << "Sync Remote Jail:" << jail << repoID; 
    656656    HASH->insert("Jails/"+jail+"/RepoID", repoID); 
    657     //Now get all the remote pkg info for this repoID/jail 
    658     clearRepo(repoID); 
    659657    //Now fetch remote pkg info for this repoID 
    660658    QString prefix = "Repos/"+repoID+"/pkg/"; 
     
    662660    if(jail!=LOCALSYSTEM){ cmd = "pkg -j "+HASH->value("Jails/"+jail+"/JID")+" rquery -a "; } 
    663661    QStringList info = directSysCmd(cmd+"PKG::%o::::%n::::%v::::%m::::%w::::%q::::%sh::::%c::::%e::::%M").join("\n").split("PKG::"); 
     662    if(info.length() < 3){ 
     663      qDebug() << "[ERROR] Remote info fetch for jail:" << jail<<"\n"<<info; 
     664      return; 
     665    } 
    664666    //qDebug() << "Info:" << info; 
    665667    //Format: origin, name, version, maintainer, website, arch, size, comment, description, message 
    666668    QStringList pkglist; 
     669    clearRepo(repoID); //valid info found 
    667670    for(int i=0; i<info.length(); i++){ 
    668671      QStringList pkg = info[i].split("::::"); 
Note: See TracChangeset for help on using the changeset viewer.