Changeset 5934953


Ignore:
Timestamp:
05/30/14 14:09:18 (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
79398f2, fd565e6
Parents:
df041a0 (diff), 26c696f (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

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • build-files/conf/port-make.conf

    rf569907 rd580303  
    7676gmusicbrowser_SET=GSTREAMER 
    7777gnome2_SET=XSCREENSAVER PAM KERBEROS 
     78gnome3_SET=MAPI 
    7879gnomebaker_SET=DVD 
    7980gnupg_SET=GPGSM 
  • src-qt4/warden-gui/dialogwarden.cpp

    ra7c522d rba606f5  
    14741474   if ( ! listJails->currentItem() ) 
    14751475     return; 
    1476    QString cmd = "pc-pkgmanager -chroot /usr/jails/" + listJails->currentItem()->text(0) + " &";  
     1476   QString cmd = "appcafe -jail " + listJails->currentItem()->text(0) + " &";  
    14771477   system(cmd.toLatin1()); 
    14781478} 
  • src-qt4/warden-gui/dialogwarden.ui

    r58440a1 rba606f5  
    388388                <item> 
    389389                 <widget class="QPushButton" name="pushPackageManager"> 
    390                   <property name="text"> 
    391                    <string>Package Manager</string> 
     390                  <property name="toolTip"> 
     391                   <string>Run the AppCafe for this jail. (Jail must be running)</string> 
     392                  </property> 
     393                  <property name="text"> 
     394                   <string>AppCafe</string> 
    392395                  </property> 
    393396                  <property name="icon"> 
     
    10081011     <y>0</y> 
    10091012     <width>757</width> 
    1010      <height>21</height> 
     1013     <height>22</height> 
    10111014    </rect> 
    10121015   </property> 
  • src-qt4/warden-gui/wizardNewJail.cpp

    rdcaaab6 r75a3e4a  
    2424    connect(lineIP, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    2525    connect(lineIP6, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    26     connect(checkIPv4, SIGNAL(clicked()), this, SLOT(slotCheckChecks())); 
    27     connect(checkIPv6, SIGNAL(clicked()), this, SLOT(slotCheckChecks())); 
     26    connect(checkIPv4, SIGNAL(clicked(bool)), this, SLOT(slotCheckChecks())); 
     27    connect(checkIPv6, SIGNAL(clicked(bool)), this, SLOT(slotCheckChecks())); 
    2828    connect(lineHost, SIGNAL(editingFinished( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    2929    connect(lineLinuxScript, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
  • src-sh/pc-extractoverlay/ports-overlay/usr/local/sbin/grub-mkconfig

    r0fbe5d0 r26c696f  
    282282check_grub_zfs_be() 
    283283{ 
     284 
     285  ROOTFS=`mount | awk '/ \/ / {print $1}'` 
     286  BEDS="$( echo ${ROOTFS} | awk -F '/' '{print $2}' )" 
     287  if [ "$BEDS" = "dev" ] ; then BEDS="ROOT"; fi 
     288 
    284289  if [ "$grub_cfg" = "/boot/grub/grub.cfg" ] ; then 
    285     dTank=`beadm list -a 2>/dev/null | grep '/ROOT/default' | awk '{print $1}'` 
    286     if ! mount | grep -q "$dTank on / ("; then 
    287        echo -e "Copying grub.cfg to $dTank...\c" >&2 
    288        fMnt="/mnt.$$" 
    289        mkdir $fMnt 
    290        if ! mount -t zfs ${dTank} $fMnt ; then 
    291           echo "Failed to mount ${dTank}" >&2 
    292           return 
    293        else 
    294          cp ${grub_cfg} ${fMnt}/boot/grub/grub.cfg 
    295          echo -e "done" >&2 
    296          umount ${fMnt} >/dev/null 
    297          rmdir ${fMnt} >/dev/null 
    298        fi 
    299     fi 
     290    for i in `beadm list -a 2>/dev/null | grep "/${BEDS}/" | awk '{print $1}'` 
     291    do 
     292      if ! mount | grep -q "$dTank on / ("; then 
     293         echo -e "Copying grub.cfg to $dTank...\c" >&2 
     294         fMnt="/mnt.$$" 
     295         mkdir $fMnt 
     296         if ! mount -t zfs ${dTank} $fMnt ; then 
     297            echo "Failed to mount ${dTank}" >&2 
     298            return 
     299         else 
     300           cp ${grub_cfg} ${fMnt}/boot/grub/grub.cfg 
     301           echo -e "done" >&2 
     302           umount ${fMnt} >/dev/null 
     303           rmdir ${fMnt} >/dev/null 
     304         fi 
     305      fi 
     306    done 
     307 
     308    # Check if we can re-stamp the boot-loader 
     309    TANK=`echo $ROOTFS | cut -d '/' -f 1` 
     310    for i in `zpool status $TANK | grep ONLINE | awk '{print $1}'` 
     311    do 
     312       if [ ! -e "/dev/${i}" ] ; then continue; fi 
     313       disk=`echo $i | sed 's|.eli||g'` 
     314 
     315       # Now get the root of the disk 
     316       disk=`echo $disk | sed 's|p[1-9]$||g' | sed "s|s[1-9][a-z]||g"` 
     317       if [ ! -e "/dev/${disk}" ] ; then continue; fi 
     318 
     319       # Re-install GRUB on this disk 
     320       echo "Installing GRUB to $disk" >&2 
     321       grub-install /dev/${disk} 
     322    done 
    300323  fi 
    301324 
  • src-qt4/pc-softwaremanager/mainUI.cpp

    r479e9767 rdf041a0  
    269269      item->setText(1,app.installedversion); 
    270270      item->setText(2, PBI->currentAppStatus(ID, VISJAIL)); 
    271       item->setText(3, app.installedsize); 
     271      if(app.installedsize=="0.00B"){ item->setText(3, PBI->getMetaPkgSize(ID, VISJAIL) ); } 
     272      else{ item->setText(3, app.installedsize); } 
    272273      item->setText(4, app.installedwhen); 
    273274      item->setText(5, app.installedarch); 
     
    772773    ui->label_bapp_arch->setText(data.arch); 
    773774    if(data.size.isEmpty()){ ui->label_bapp_size->setText(tr("Unknown")); } 
     775    else if(data.size=="0.00B"){ ui->label_bapp_size->setText( PBI->getMetaPkgSize(appID) ); }  
    774776    else{ ui->label_bapp_size->setText( data.size ); } 
    775777  //Now update the download button appropriately 
     
    11861188 
    11871189  QString msg = tr("Please verify the following removals:")+"\n\n"; 
     1190  apps.removeAll(""); //make sure no empty entries 
    11881191  apps = PBI->filterBasePkgs(apps); //cannot remove particular packages 
     1192  //QStringList pluspkgs; 
    11891193  for(int i=0; i<apps.length(); i++){ 
    11901194    NGApp app = PBI->singleAppInfo(apps[i]); 
    11911195    msg.append(app.name+"\n"); 
     1196    //if(app.installedsize=="0.00B" && !app.pbiorigin.isEmpty() ){  
     1197      //msg.append( " - "+QString(tr("Removes: %1")).arg( app.dependency.join(", ") )+"\n" ); 
     1198      //pluspkgs << app.dependency; 
     1199    //} 
    11921200    if(!app.rdependency.isEmpty()){ msg.append( " - "+QString(tr("Also Removes: %1")).arg( PBI->listRDependencies(apps[i]).join(", "))+"\n" ); } 
    11931201  } 
     1202  //if( !pluspkgs.isEmpty() ){ apps << pluspkgs; } 
    11941203   
    11951204  if(apps.isEmpty()){ 
  • src-qt4/pc-softwaremanager/pbiNgBackend.cpp

    r246e1cf rdf041a0  
    369369    else if(PKGHASH.contains(appID[i])){ output <<PKGHASH[appID[i]]; } 
    370370  } 
     371  return output; 
     372} 
     373 
     374QString PBIBackend::getMetaPkgSize(QString appID, QString injail){ 
     375  QString output; 
     376  NGApp info = singleAppInfo(appID, injail); 
     377  //Now add up the sizes of all the direct dependencies 
     378  double bytes = 0; 
     379  QStringList deps; 
     380  if(info.isInstalled){ deps = info.dependency; } //only use direct dependencies (better appx) 
     381  else{ deps = listDependencies(appID); } //check the entire dep tree for missing pkgs 
     382  for(int i=0; i<deps.length(); i++){ 
     383    NGApp dep = singleAppInfo(deps[i],injail); 
     384    QString sz; 
     385    if( info.isInstalled ){ 
     386      //Add the installed size of the dependencies 
     387      sz = dep.installedsize; 
     388    }else{ 
     389      //Add the download size for uninstalled dependencies 
     390      if( !dep.isInstalled ){ sz = dep.size; } 
     391    } 
     392    if(sz.isEmpty()){ continue; } 
     393    bytes+= pkgSizeToBytes(sz); 
     394  } 
     395  //Now convert the size back into the right format 
     396  output = bytesToPkgSize(bytes); 
    371397  return output; 
    372398} 
     
    681707  return out;    
    682708} 
     709 
     710double PBIBackend::pkgSizeToBytes(QString size){ 
     711  if(size.isEmpty()){ return 0; } 
     712  //Check for a non-number as the second-to-last character 
     713  QString unit; 
     714  double num = 0; 
     715  if(size[size.length()-2].isNumber()){ 
     716    unit = size.right(1); 
     717    num = size.left(size.length()-1).toDouble(); 
     718    //qDebug() << "Converter:" << size << unit << QString::number(num); 
     719  }else{ 
     720    unit = size.right(2); 
     721    num = size.left(size.length()-2).toDouble();           
     722    //qDebug() << "Converter:" << size << unit << QString::number(num); 
     723  } 
     724  unit = unit.toLower(); 
     725  if(unit=="kb"){ num = num*1024; } 
     726  else if(unit=="mb"){ num = num*1024*1024; } 
     727  else if(unit=="gb"){ num = num*1024*1024*1024; } 
     728  //qDebug() << "PKG to Number:" << size <<"->"<<QString::number(num)+" bytes"; 
     729  return num; 
     730} 
     731 
     732QString PBIBackend::bytesToPkgSize(double bytes){ 
     733  QString unit = "B"; 
     734  if(bytes >= (1024*1024*1024)){ bytes = bytes/(1024*1024*1024); unit = "GB";} 
     735  else if(bytes >= (1024*1024)){ bytes = bytes/(1024*1024); unit = "MB";} 
     736  else if(bytes >= 1024){ bytes = bytes/1024; unit = "kB"; } 
     737  //Trim to 3 digit output 
     738  if(bytes > 99){ bytes = qRound(bytes); } //no decimel places (already 3 digits long) 
     739  else if(bytes > 9){ bytes = qRound(bytes*10)/10.0; } // 1 decimel place 
     740  else{ bytes = qRound(bytes*100)/100.0; } // 2 decimel places 
     741  unit.prepend( QString::number(bytes) ); 
     742  return unit; 
     743} 
     744 
    683745 // =============================== 
    684746 // ======   PRIVATE SLOTS   ====== 
  • src-qt4/pc-softwaremanager/pbiNgBackend.h

    r246e1cf rdf041a0  
    7676        QList<NGCat> CatInfo( QStringList cats ); 
    7777        QList<NGApp> SimilarApps( QString app ); 
    78          
     78        QString getMetaPkgSize(QString appID, QString injail = ""); 
    7979        QString currentAppStatus(QString appID , QString injail = ""); 
    8080        bool isWorking(QString pbiID); 
     
    140140        void checkForJails(QString jailID=""); //parses the "jls" command to get name/JID combinations 
    141141         
     142        //General Pkg Conversions 
     143        double pkgSizeToBytes(QString size); 
     144        QString bytesToPkgSize(double bytes); 
     145         
    142146private slots: 
    143147        //Process functions 
Note: See TracChangeset for help on using the changeset viewer.