Changeset 5db8f02


Ignore:
Timestamp:
01/07/14 10:37:26 (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
1f0325a
Parents:
a4325b4 (diff), 7004a51 (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:
3 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • src-sh/libsh/functions.sh

    r4430632 r9d168987  
    457457 
    458458  # Lets test if we have any conflicts 
    459   pkg-static ${1} 2>/tmp/.pkgConflicts.$$ >/tmp/.pkgConflicts.$$ 
     459  pkg-static ${1} | tee /tmp/.pkgConflicts.$$ 
    460460  if [ $? -eq 0 ] ; then rm /tmp/.pkgConflicts.$$ ; return ; fi 
    461461 
  • src-sh/pc-metapkgmanager/pc-metapkgmanager

    r9809371 r7004a51  
    5454  del pkg1,pkg2          -- Delete the specified list of meta-packages 
    5555  list                   -- List the available meta-packages 
     56  list-installed         -- Only list the installed meta-packages 
    5657  status <pkg>           -- List the status of the specified meta-packages 
    5758  --pkgset <pkgset>      -- Change default pkgset we are using 
     
    170171 
    171172} 
     173 
     174# Function to list installed metapkgs 
     175list_installed_metapkgs() { 
     176        if [ ! -d "${MPDIR}" ] ; then exit_err "No available meta-pkg dir" ; fi 
     177 
     178        # Start listing each meta-pkg 
     179        for i in `find ${MPDIR}/* -type d` 
     180        do 
     181                # Is this package ignored on this arch? 
     182                if [ -e "${i}/ignore-arch" ] ; then 
     183                        if [ `cat ${i}/ignore-arch` = "$ARCH" ] ; then continue; fi 
     184                fi 
     185                MPNAME=`basename $i` 
     186                if [ ! -e "${MPDIR}/${MPNAME}/ports-list" ] ; then continue ; fi 
     187 
     188                stat_metapkg "$MPNAME" >/dev/null 2>/dev/null 
     189                if [ $? -eq 0 ] ; then 
     190                   if [ -z "$installed" ] ; then 
     191                     installed="$MPNAME" 
     192                   else 
     193                     installed="$installed $MPNAME" 
     194                   fi 
     195                fi 
     196        done 
     197        echo "$installed" 
     198} 
     199 
    172200 
    173201# Function to list available metapkgs 
     
    368396while [ $# -gt 0 ]; do 
    369397  case "$1" in 
    370       list) list_metapkgs ; exit 0 ;; 
     398          list) list_metapkgs ; exit 0 ;; 
     399list-installed) list_installed_metapkgs ; exit 0 ;; 
    371400       add) parse_metapkgs "$2" "add" "$3" ; exit 0 ;; 
    372401       del) parse_metapkgs "$2" "del" ; exit 0 ;; 
  • src-sh/pc-updatemanager/pc-updatemanager

    rf566c15 r81e27dd  
    433433  fi 
    434434 
     435  clear 
     436  echo "Starting networking..." 
     437  echo "" 
     438  # Enable networking 
     439  /etc/rc.d/devfs restart 
     440  /etc/rc.d/netif restart 
     441  sleep 8 
     442  clear 
     443 
    435444  # Now its time to force a pkg-update of all packages to their new FreeBSD compiled versions 
    436445  pc-updatemanager pkgupdate -f 
     
    444453  grub-mkconfig -o /boot/grub/grub.cfg 
    445454  if [ $? -ne 0 ] ; then 
    446      echo "Warning: Failed running 'pc-updatemanager pkgupdate -f'" 
     455     echo "Warning: Failed running 'grub-mkconfig -o /boot/grub/grub.cfg'" 
    447456     echo "Press ENTER to continue" 
    448457     read tmp 
     
    476485 
    477486  # Lets backup old pkgng 
    478   oPkg=`pkg info pkg | awk '{print $1}'` 
     487  oPkg=`pkg info pkg | head -n 1 | awk '{print $1}'` 
    479488  pkg create -o /usr/local/tmp/ ${oPkg} 
    480489  if [ -e "/usr/local/tmp/oldPkg.txz" ] ; then rm /usr/local/tmp/oldPkg.txz; fi 
  • src-qt4/pc-sysmanager/cmdDialog.cpp

    r8d1c3e0 ra4325b4  
    55  ui->setupUi(this); //load the designer UI file 
    66  //Setup the backend process class 
    7   PROC = new gitProc; 
     7  PROC = new LongProc; 
    88    connect(PROC, SIGNAL(ProcMessage(QString)), this, SLOT(NewMessage(QString)) ); 
    9     connect(PROC, SIGNAL(procFinished(bool)), this, SLOT(Finished(bool)) ); 
     9    connect(PROC, SIGNAL(ProcFinished()), this, SLOT(Finished()) ); 
    1010  //Setup internal flags 
    11   initPorts = false; initSource = false; //make sure these are both initially disabled 
    1211  connect(ui->push_close, SIGNAL(clicked()), this, SLOT(CloseUI()) );    
    1312} 
     
    2322  } 
    2423  ui->push_close->setEnabled(false); //make sure they cannot close this while it is running 
     24  ui->textEdit->clear(); //make sure this is cleared 
     25  QStringList cmds, dirs, info; //For generating the necessary input to the backend 
    2526  if(cmdtype.toLower() == "ports"){ 
    2627    //Check for if the port tree needs to be initialized first 
    2728    qDebug() << "WARNING: Ports init check still needs to be implemented"; 
    2829    bool init = true; 
     30    //Now create the commands necessary 
    2931    if(init){ 
    30       initPorts = true; //set the internal flag 
    3132      ui->textEdit->setPlainText("Starting Ports Tree Initialization...."); 
    32       bool ok = PROC->startInitPorts(); 
    33       if(!ok){  
    34         ui->textEdit->appendPlainText("\nERROR: Could not clean and git init /usr/ports"); 
    35         ui->push_close->setEnabled(true); //they can now close the window 
     33      if(QFile::exists("/usr/ports")){ 
     34        cmds << "rm -rf /usr/ports/*"; info << "Removing the old ports tree"; dirs << ""; //Clean the old ports tree 
     35      }else{ 
     36        cmds << "mkdir /usr/ports"; info << "Creating the ports tree"; dirs << ""; //Create the source tree 
    3637      } 
     38      cmds << "git init"; info << "Initialize GIT"; dirs << "/usr/ports"; //setup git 
     39      cmds << "git remote add origin https://www.github.com/pcbsd/freebsd-ports.git"; info << ""; dirs << "/usr/ports/.git"; //setup PC-BSD git repo 
    3740    }else{ 
    38       ui->textEdit->setPlainText("Fetching the Ports Tree...."); 
    39       bool ok = PROC->startPorts(); 
    40       if(!ok){  
    41         ui->textEdit->appendPlainText("\nERROR: Could not setup git fetch within /usr/ports"); 
    42         ui->push_close->setEnabled(true); //they can now close the window 
    43       } 
     41      ui->textEdit->setPlainText("Updating the Ports Tree...."); 
    4442    } 
     43    //Now create the git update commands 
     44    cmds << "git fetch --depth=1"; info << "Fetch new GIT info"; dirs << "/usr/ports/.git"; 
     45    cmds << "git checkout -t origin/master"; info << "Checkout the tree"; dirs << "/usr/ports/.git";  
     46 
    4547  }else if(cmdtype.toLower() == "source"){ 
    4648    //Check for if the source tree needs to be initialized first 
    4749    qDebug() << "WARNING: Source init check still needs to be implemented"; 
    4850    bool init = true; 
     51    //Now create the commands necessary 
    4952    if(init){ 
    50       initSource = true; //set the internal flag 
    5153      ui->textEdit->setPlainText("Starting Source Tree Initialization...."); 
    52       bool ok = PROC->startInitSource(); 
    53       if(!ok){  
    54         ui->textEdit->appendPlainText("\nERROR: Could not clean and git init /usr/src"); 
    55         ui->push_close->setEnabled(true); //they can now close the window 
     54      if(QFile::exists("/usr/src")){ 
     55        cmds << "rm -rf /usr/src/*"; info << "Removing the old source tree"; dirs << ""; //Clean the old source tree 
     56      }else{ 
     57        cmds << "mkdir /usr/src"; info << "Creating the source tree"; dirs << ""; //Create the source tree 
    5658      } 
     59      cmds << "git init"; info << "Initialize GIT"; dirs << "/usr/src"; //setup git 
     60      cmds << "git remote add origin https://www.github.com/pcbsd/freebsd.git"; info << ""; dirs << "/usr/src/.git"; //setup PC-BSD git repo 
    5761    }else{ 
    58       ui->textEdit->setPlainText("Fetching the Source Tree...."); 
    59       bool ok = PROC->startSource(); 
    60       if(!ok){  
    61         ui->textEdit->appendPlainText("\nERROR: Could not setup git fetch within /usr/src"); 
    62         ui->push_close->setEnabled(true); //they can now close the window 
    63       } 
     62      ui->textEdit->setPlainText("Updating the Source Tree...."); 
    6463    } 
     64    //Now create the git update commands 
     65    cmds << "git fetch --depth=1"; info << "Fetch new GIT info"; dirs << "/usr/src/.git"; 
     66    cmds << "git checkout -t origin/master"; info << "Checkout the tree"; dirs << "/usr/src/.git";  
    6567  }else{ 
    6668    ui->textEdit->setPlainText("Unknown CMD Type: "+cmdtype); 
    6769    ui->push_close->setEnabled(true); 
     70    return; 
    6871  } 
     72  PROC->startCMDs(cmds, dirs, info); 
    6973} 
    7074 
     
    7478} 
    7579 
    76 void CMDDialog::Finished(bool ok){ 
    77   if(!ok){ 
    78     ui->textEdit->appendPlainText("\n=============\nProcess Completed Unsuccessfully"); 
     80void CMDDialog::Finished(){ 
    7981    ui->push_close->setEnabled(true); //enabled the close button 
    80   }else if(initPorts){ 
    81     initPorts = false; //make sure it doesn't fall into this catch again 
    82     //ports tree initialized successfully - start the fetch process 
    83     ui->textEdit->appendPlainText("\n=============\nFetching the Ports Tree...."); 
    84     bool ok = PROC->startPorts(); 
    85     if(!ok){  
    86       ui->textEdit->appendPlainText("\nERROR: Could not setup git fetch within /usr/ports"); 
    87       ui->push_close->setEnabled(true); //they can now close the window 
    88     } 
    89   }else if(initSource){ 
    90     initSource = false; //make sure it doesn't fall into this catch again 
    91     //Source tree initialized successfully - start the fetch process 
    92     ui->textEdit->appendPlainText("\n=============\nFetching the Source Tree...."); 
    93     bool ok = PROC->startPorts(); 
    94     if(!ok){  
    95       ui->textEdit->appendPlainText("\nERROR: Could not setup git fetch within /usr/src"); 
    96       ui->push_close->setEnabled(true); //they can now close the window 
    97     } 
    98   }else{ 
    99     ui->textEdit->appendPlainText("\n=============\nFinished Successfully"); 
    100   } 
    10182} 
    10283 
  • src-qt4/pc-sysmanager/cmdDialog.h

    r6d7b1e6 ra4325b4  
    66#include <QWidget> 
    77 
    8 #include "gitprogress.h" 
     8#include "longProc.h" 
    99 
    1010namespace Ui{ 
     
    2222private: 
    2323        Ui::CMDDialog *ui; 
    24         gitProc *PROC; 
    25         bool initPorts, initSource; //to keep track if only the first step was running 
     24        LongProc *PROC; 
    2625 
    2726private slots: 
    2827        void NewMessage(QString); 
    29         void Finished(bool); 
     28        void Finished(); 
    3029        void CloseUI(); 
    3130}; 
  • src-qt4/pc-sysmanager/pbsystemtab.cpp

    r7cd7e8f ra4325b4  
    2626{ 
    2727    //Grab the username 
    28     username = QString::fromLocal8Bit(getenv("SUDO_USER")); 
    29     qDebug() << "Username:" << username; 
     28    username = QString::fromLocal8Bit(getenv("SUDO_USER")); //since the app is always run as root with sudo 
     29    if(username.isEmpty()){ username = QString::fromLocal8Bit(getenv("LOGNAME")); } //in case SUDO_USER is not set 
     30    //qDebug() << "Username:" << username; 
    3031    // Set the Uname on the General Tab 
    3132    CheckUname(); 
     
    148149        args << SheetFileName; 
    149150        args << username; 
    150         qDebug() << "CMD: " << prog+" "+args.join(" "); 
     151        //qDebug() << "CMD: " << prog+" "+args.join(" "); 
    151152        connect( SheetGenScript, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(finishedSheet()) ); 
    152153                 
  • src-qt4/pc-sysmanager/pbsystemtab.ui

    rba438ce ra4325b4  
    660660  <include location="local">qfile.h</include> 
    661661  <include location="local">qsettings.h</include> 
    662   <include location="local">gitprogress.h</include> 
    663662  <include location="global">qregexp.h</include> 
    664663  <include location="global">pcbsd-utils.h</include> 
  • src-qt4/pc-sysmanager/pc-sysmanager.pro

    ra2d9be0 ra4325b4  
    99 
    1010HEADERS += pbsystemtab.h \ 
    11         gitprogress.h \ 
    1211        updaterDialog.h \ 
    13         cmdDialog.h 
     12        cmdDialog.h \ 
     13        longProc.h 
    1414 
    1515SOURCES += main.cpp \ 
    1616        pbsystemtab.cpp \ 
    17         gitprogress.cpp \ 
    1817        updaterDialog.cpp \ 
    19         cmdDialog.cpp 
     18        cmdDialog.cpp \ 
     19        longProc.cpp 
     20         
    2021 
    2122FORMS   = pbsystemtab.ui \ 
    22         gitprogress.ui \ 
    2323        updaterDialog.ui \ 
    2424        cmdDialog.ui 
Note: See TracChangeset for help on using the changeset viewer.