Changeset 225746b


Ignore:
Timestamp:
07/30/14 12:48:18 (3 weeks ago)
Author:
Ken Moore <ken@…>
Branches:
master
Children:
fb5b0b8
Parents:
0ac3332 (diff), e286b67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Location:
src-sh
Files:
3 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • src-sh/Makefile

    rb0982c5 r9255a4d  
    4343                sub-xdgutil \ 
    4444                sub-pccheckx \ 
    45                 sub-pcsystemflag 
     45                sub-pcsystemflag \ 
     46                sub-syscache 
    4647                 
     48sub-syscache: pc-syscache/$(MAKEFILE) FORCE 
     49        cd syscache/ && $(MAKE) -f $(MAKEFILE) 
     50sub-syscache-make_default: syscache/$(MAKEFILE) FORCE 
     51        cd syscache/ && $(MAKE) -f $(MAKEFILE)  
     52sub-syscache-make_first: syscache/$(MAKEFILE) FORCE 
     53        cd syscache/ && $(MAKE) -f $(MAKEFILE) first 
     54sub-syscache-all: syscache/$(MAKEFILE) FORCE 
     55        cd syscache/ && $(MAKE) -f $(MAKEFILE) all 
     56sub-syscache-clean: syscache/$(MAKEFILE) FORCE 
     57        cd syscache/ && $(MAKE) -f $(MAKEFILE) clean 
     58sub-syscache-install_subtargets: syscache/$(MAKEFILE) FORCE 
     59        cd syscache/ && $(MAKE) -f $(MAKEFILE) install           
     60 
    4761sub-pccheckx: pc-checkxdisplay/$(MAKEFILE) FORCE 
    4862        cd pc-checkxdisplay/ && $(MAKE) -f $(MAKEFILE) 
     
    366380        sub-xdgutil-make_default \ 
    367381        sub-pccheckx-make_default \ 
     382        sub-syscache-make_default \ 
    368383        sub-pcsystemflag-make_default \ 
    369384        FORCE 
     
    391406        sub-xdgutil-make_first \ 
    392407        sub-pccheckx-make_first \ 
     408        sub-syscache-make_first \ 
    393409        sub-pcsystemflag-make_first \ 
    394410        FORCE 
     
    416432        sub-xdgutil-all \ 
    417433        sub-pccheckx-all \ 
     434        sub-syscache-all \ 
    418435        sub-pcsystemflag-all \ 
    419436        FORCE 
     
    441458        sub-xdgutil-clean \ 
    442459        sub-pccheckx-clean \ 
     460        sub-syscache-clean \ 
    443461        sub-pcsystemflag-clean \ 
    444462        FORCE 
     
    466484        sub-xdgutil-install_subtargets \ 
    467485        sub-pccheckx-install_subtargets \ 
     486        sub-syscache-install_subtargets \ 
    468487        sub-pcsystemflag-install_subtargets \ 
    469488        FORCE 
  • src-sh/port-files/Makefile

    r0f08529 r9255a4d  
    1818WRKSRC=         ${WRKDIR}/src-sh 
    1919CONFLICTS?=     pbi-manager-[0-9]* 
     20USE_QT4=        corelib network qmake 
    2021USES=           pkgconfig 
    2122NO_BUILD=       yes 
    2223USE_BZIP2=      yes 
    23 USE_PYTHON=     yes 
    2424 
    2525.include <bsd.port.pre.mk> 
  • src-sh/port-files/pkg-plist

    r38ad557 re286b67  
    2727bin/enable_user_pefs 
    2828bin/restamp-grub 
     29bin/syscache 
     30bin/syscache-daemon 
    2931sbin/pc-sysinstall 
    3032share/lpreserver/backend/zfsmon.sh 
     
    254256etc/rc.d/pc-nssldap 
    255257etc/rc.d/pc-directory 
     258etc/rc.d/syscache 
    256259etc/sudoers.d/pcbsd 
    257260sbin/app 
  • src-sh/syscache/client/syscache-client.cpp

    r2ca866a r0ac3332  
    2626 
    2727void SysCacheClient::requestFinished(){ 
    28   qDebug() << "Client Request Finished"; 
     28  //qDebug() << "Client Request Finished"; 
    2929  QTextStream in(curSock); 
    3030  bool finished = false; 
  • src-sh/syscache/daemon/DB-accesscommands.txt

    r99e151e r0ac3332  
    2020  
    2121 "pkg [#system/<jailname>] local <pkg origin> <variable>" (get a particular piece of info for a pkg) 
    22    Available variables: (all locally installed info) 
     22   Available variables: 
    2323        origin 
    2424        name 
     
    3434        isOrphan 
    3535        isLocked 
     36        dependencies 
     37        rdependencies 
     38        categories 
     39        files 
     40        options 
     41        license 
     42        users 
     43        groups 
    3644         
     45-- Remote Pkg information 
     46 "pkg [#system/<jailname>] remotelist" (list all pkgs currently available) 
     47  
     48 "pkg [#system/<jailname>] remote <pkg origin> <variable>" (get info about a remote pkg) 
     49   Available variables: 
     50        origin 
     51        name 
     52        version 
     53        maintainer 
     54        comment 
     55        description 
     56        website 
     57        size 
     58        arch 
     59        message 
     60        dependencies 
     61        rdependencies 
     62        categories 
     63        options 
     64        license 
     65    
    3766-- PBI Database information 
    3867NOTE: Any identical variables to pkg information should be considered an overlay for the pkg info 
     
    5786        tags 
    5887        maintainer 
    59         summary 
     88        comment 
    6089        description 
    6190        screenshots 
    6291        relatedapps 
    6392        plugins 
    64         confdir (note: icon file is <confdir>/icon.png) 
     93        confdir (note: icon file path is "<confdir>/icon.png" or "/var/db/pbi/index/generic-icon.png") 
    6594        options 
    6695        rating 
     
    71100        name 
    72101        icon 
    73         summary 
     102        comment 
  • src-sh/syscache/daemon/DB.cpp

    r99e151e r0ac3332  
    8787      else if(request[2]=="hasupdates"){ hashkey.append("hasUpdates"); } 
    8888      else if(request[2]=="updatemessage"){ hashkey.append("updateLog"); } 
     89      else if(request[2]=="remotelist"){ hashkey="Repos/"+HASH->value(hashkey+"repoID")+"/pkgList"; } 
    8990      else{ hashkey.clear(); } 
    9091    }else if(request[0]=="pbi"){ 
     
    107108  }else if(request.length()==5){ 
    108109    if(request[0]=="pkg"){ 
     110      if(request[1]=="#system"){ hashkey="Jails/"+LOCALSYSTEM+"/"; } 
     111      else{ hashkey="Jails/"+request[1]+"/"; }       
    109112      if(request[2]=="local"){ 
    110         if(request[1]=="#system"){ hashkey="Jails/"+LOCALSYSTEM+"/"; } 
    111         else{ hashkey="Jails/"+request[1]+"/"; } 
    112113        hashkey.append("pkg/"+request[3]+"/"+request[4]); // "pkg/<origin>/<variable>" 
     114      }else if(request[2]=="remote"){ 
     115        hashkey="Repos/"+HASH->value(hashkey+"repoID")+"/pkg/"+request[3]+"/"+request[4]; 
    113116      } 
    114117    } 
     
    116119  //Now fetch/return the info 
    117120  QString val; 
    118   if(hashkey.isEmpty()){ val = "[ERROR] Invalid Information request"; } 
     121  if(hashkey.isEmpty()){ val = "[ERROR] Invalid Information request: \""+request.join(" ")+"\""; } 
    119122  else if(!HASH->contains(hashkey)){ val = "[ERROR] Information not available"; } 
    120123  else{ 
     
    277280  syncPkgLocal(); 
    278281  if(stopping){ return; } 
     282  //Now Load the PBI database (more useful, will not lock system usage, and is fast) 
     283  syncPbi(); 
    279284  //Now do all the remote pkg info retrieval (won't lock the pkg database in 1.3.x?) 
     285   // Note: This can take a little while 
    280286  syncPkgRemote(); 
    281287  if(stopping){ return; } 
    282   //Now Load the PBI database (more useful, but will not lock system usage) 
    283   syncPbi(); 
    284288  //Now check for overall system updates 
    285289   
     
    332336  } 
    333337  if(stopping){ return; } 
    334   QStringList info = directSysCmd(cmd+opt).join("").split("PKG::"); 
     338  QStringList info = directSysCmd(cmd+opt).join("\n").split("PKG::"); 
    335339  QStringList installed; 
    336340  for(int i=0; i<info.length(); i++){ 
     
    507511    //Now get all the remote pkg info for this repoID/jail 
    508512    clearRepo(repoID); 
    509     //Remote pkg info not retrieved yet 
    510            
    511   } 
     513    //Now fetch remote pkg info for this repoID 
     514    QString prefix = "Repos/"+repoID+"/pkg/"; 
     515    QString cmd = "pkg rquery -a "; 
     516    if(jail!=LOCALSYSTEM){ cmd = "pkg -j "+HASH->value("Jails/"+jail+"/JID")+" rquery -a "; } 
     517    QStringList info = directSysCmd(cmd+"PKG::%o::::%n::::%v::::%m::::%w::::%q::::%sh::::%c::::%e::::%M").join("\n").split("PKG::"); 
     518    //Format: origin, name, version, maintainer, website, arch, size, comment, description, message 
     519    QStringList pkglist; 
     520    for(int i=0; i<info.length(); i++){ 
     521      QStringList pkg = info[i].split("::::"); 
     522      if(pkg.length()<9){ continue; } //invalid line 
     523      pkglist << pkg[0]; 
     524      HASH->insert(prefix+pkg[0]+"/origin", pkg[0]); 
     525      HASH->insert(prefix+pkg[0]+"/name", pkg[1]); 
     526      HASH->insert(prefix+pkg[0]+"/version", pkg[2]); 
     527      HASH->insert(prefix+pkg[0]+"/maintainer", pkg[3]); 
     528      HASH->insert(prefix+pkg[0]+"/website", pkg[4]); 
     529      HASH->insert(prefix+pkg[0]+"/arch", pkg[5]); 
     530      HASH->insert(prefix+pkg[0]+"/size", pkg[6]); 
     531      HASH->insert(prefix+pkg[0]+"/comment", pkg[7]); 
     532      HASH->insert(prefix+pkg[0]+"/description", pkg[8]); 
     533      HASH->insert(prefix+pkg[0]+"/message", pkg[9]); 
     534    } 
     535    //Now save the list of installed pkgs 
     536    HASH->insert("Repos/"+repoID+"/pkgList", pkglist.join(LISTDELIMITER)); 
     537    //Now go through the pkgs and get the more complicated/detailed info 
     538    // -- dependency list 
     539    if(stopping){ return; } 
     540    info = directSysCmd(cmd+" %o::::%do"); 
     541    pkglist.clear(); 
     542    QString orig; 
     543    for(int i=0; i<info.length(); i++){ 
     544      if(orig!=info[i].section("::::",0,0) && !orig.isEmpty()){  
     545        HASH->insert(prefix+orig+"/dependencies", pkglist.join(LISTDELIMITER)); 
     546        pkglist.clear(); 
     547      } 
     548      orig = info[i].section("::::",0,0); 
     549      pkglist << info[i].section("::::",1,1); 
     550    } 
     551    HASH->insert(prefix+orig+"/dependencies", pkglist.join(LISTDELIMITER)); //make sure to save the last one too 
     552    // -- reverse dependency list 
     553    if(stopping){ return; } 
     554    info = directSysCmd(cmd+" %o::::%ro"); 
     555    pkglist.clear(); 
     556    orig.clear(); 
     557    for(int i=0; i<info.length(); i++){ 
     558      if(orig!=info[i].section("::::",0,0) && !orig.isEmpty()){  
     559        HASH->insert(prefix+orig+"/rdependencies", pkglist.join(LISTDELIMITER)); 
     560        pkglist.clear(); 
     561      } 
     562      orig = info[i].section("::::",0,0); 
     563      pkglist << info[i].section("::::",1,1); 
     564    } 
     565    HASH->insert(prefix+orig+"/rdependencies", pkglist.join(LISTDELIMITER)); //make sure to save the last one too 
     566    // -- categories 
     567    if(stopping){ return; } 
     568    info = directSysCmd(cmd+" %o::::%C"); 
     569    pkglist.clear(); 
     570    orig.clear(); 
     571    for(int i=0; i<info.length(); i++){ 
     572      if(orig!=info[i].section("::::",0,0) && !orig.isEmpty()){  
     573        HASH->insert(prefix+orig+"/categories", pkglist.join(LISTDELIMITER)); 
     574        pkglist.clear(); 
     575      } 
     576      orig = info[i].section("::::",0,0); 
     577      pkglist << info[i].section("::::",1,1); 
     578    } 
     579    HASH->insert(prefix+orig+"/categories", pkglist.join(LISTDELIMITER)); //make sure to save the last one too 
     580    // -- options 
     581    if(stopping){ return; } 
     582    info = directSysCmd(cmd+" %o::::%Ok=%Ov"); 
     583    pkglist.clear(); 
     584    orig.clear(); 
     585    for(int i=0; i<info.length(); i++){ 
     586      if(orig!=info[i].section("::::",0,0) && !orig.isEmpty()){  
     587        HASH->insert(prefix+orig+"/options", pkglist.join(LISTDELIMITER)); 
     588        pkglist.clear(); 
     589      } 
     590      orig = info[i].section("::::",0,0); 
     591      pkglist << info[i].section("::::",1,1); 
     592    } 
     593    HASH->insert(prefix+orig+"/options", pkglist.join(LISTDELIMITER)); //make sure to save the last one too   
     594    // -- licenses 
     595    if(stopping){ return; } 
     596    info = directSysCmd(cmd+" %o::::%L"); 
     597    pkglist.clear(); 
     598    orig.clear(); 
     599    for(int i=0; i<info.length(); i++){ 
     600      if(orig!=info[i].section("::::",0,0) && !orig.isEmpty()){  
     601        HASH->insert(prefix+orig+"/license", pkglist.join(LISTDELIMITER)); 
     602        pkglist.clear(); 
     603      } 
     604      orig = info[i].section("::::",0,0); 
     605      pkglist << info[i].section("::::",1,1); 
     606    } 
     607    HASH->insert(prefix+orig+"/license", pkglist.join(LISTDELIMITER)); //make sure to save the last one too  
     608  } //end sync of remote information 
    512609  //Update the timestamp for this repo 
    513610  HASH->insert("Repos/"+HASH->value("Jails/"+jail+"/repoID")+"/lastSyncTimeStamp", QString::number(QDateTime::currentMSecsSinceEpoch())); 
     
    556653        HASH->insert(prefix+"tags", pbi[8].replace(",",LISTDELIMITER)); 
    557654        HASH->insert(prefix+"maintainer", pbi[9]); 
    558         HASH->insert(prefix+"summary", pbi[10].replace("<br>", " ")); 
     655        HASH->insert(prefix+"comment", pbi[10].replace("<br>", " ")); 
    559656        HASH->insert(prefix+"description", pbi[11].replace("<br>","\n").section("\nWWW: ",0,0) ); 
    560657        HASH->insert(prefix+"screenshots", pbi[12].replace(",",LISTDELIMITER)); 
     
    574671        HASH->insert(prefix+"name", cat[0]); 
    575672        HASH->insert(prefix+"icon", "/var/db/pbi/PBI-cat-icons/"+cat[1]); 
    576         HASH->insert(prefix+"summary", cat[2]); 
     673        HASH->insert(prefix+"comment", cat[2]); 
    577674      } 
    578675      //Don't use the PKG= lines, since we already have the full pkg info available 
  • src-sh/syscache/daemon/syscache-daemon.cpp

    r5eaa0db r0ac3332  
    5353  while(!stream.atEnd()){ 
    5454    req = QString(stream.readLine()).split(" "); 
    55     qDebug() << "Request Received:" << req; 
     55    //qDebug() << "Request Received:" << req; 
    5656    if(req.join("")=="shutdowndaemon"){ stopdaemon=true; break; } 
    5757    else{ out << DATA->fetchInfo(req); } 
Note: See TracChangeset for help on using the changeset viewer.