Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 28, 2013
@kmoore134 kmoore134 Two more mirrors to add! dac7e02
Commits on Jun 03, 2013
@kmoore134 kmoore134 Merge branch 'master' of github.com:pcbsd/pcbsd
Conflicts:
	src-sh/xtrafiles/local/share/pcbsd/conf/pcbsd-mirrors
c9e754c
Commits on Jun 04, 2013
@kmoore134 kmoore134 Merge branch 'master' of github.com:pcbsd/pcbsd 66f9603
@kmoore134 kmoore134 Update the Update GUI to use a new Details section, which gives descr…
…iptions of

updates pulled down from freebsd-update
408fff7
View
72 src-qt4/pc-updategui/mainWin.cpp
@@ -25,6 +25,7 @@
void mainWin::ProgramInit(QString ch, QString ip)
{
// Set any warden directories
+ groupDetails->setVisible(false);
doingUpdate=false;
lastError="";
wDir = ch;
@@ -75,6 +76,24 @@ void mainWin::slotListClicked(){
pushInstallUpdates->setEnabled(false);
else
pushInstallUpdates->setEnabled(true);
+
+
+ // See if we have description text to update
+ groupDetails->setVisible(false);
+ textDesc->setText(QString());
+ if ( ! listViewUpdates->currentItem() )
+ return;
+
+ int myRow = listViewUpdates->currentRow();
+
+ if ( listUpdates.at(myRow).at(1) == "FBSDUPDATE" ) {
+ groupDetails->setVisible(true);
+
+ QString desc;
+ for (int p=2; p < listUpdates.at(myRow).count(); p++)
+ desc += listUpdates.at(myRow).at(p) + "<br>";
+ textDesc->setText(desc);
+ }
}
bool mainWin::sanityCheck()
@@ -380,9 +399,9 @@ void mainWin::slotDisplayUpdates()
for (int p=2; p < listUpdates.at(z).count(); p++)
fileNameList += listUpdates.at(z).at(p) + "<br>";
- QListWidgetItem *item = new QListWidgetItem(tr("FreeBSD Security Update"));
+ QListWidgetItem *item = new QListWidgetItem(tr("Base System Updates"));
item->setCheckState(Qt::Unchecked);
- item->setToolTip(tr("The following files need updating:") + "<hr>" + fileNameList);
+ item->setToolTip(fileNameList);
listViewUpdates->addItem(item);
}
@@ -504,8 +523,8 @@ void mainWin::checkPCUpdates() {
}
void mainWin::checkFBSDUpdates() {
- QString line;
- QStringList up, listPkgs;
+ QString line, toPatchVer, tmp;
+ QStringList up, listDesc, listPkgs;
// Now check if there are freebsd-updates to install
QProcess f;
@@ -524,8 +543,13 @@ void mainWin::checkFBSDUpdates() {
while (f.canReadLine()) {
line = f.readLine().simplified();
qDebug() << line;
- if ( line.indexOf("The following files will be updated ") == 0) {
+ if ( line.indexOf("The following files will be ") == 0) {
+ toPatchVer= line.remove(0, line.lastIndexOf(" "));
+ toPatchVer=toPatchVer.section("-", 2,2);
+ toPatchVer=toPatchVer.section(":", 0,0);
+ toPatchVer=toPatchVer.section("p", 1,1);
fUp = true;
+ listPkgs << " " << tr("The following files will be updated:");
continue;
}
@@ -538,9 +562,45 @@ void mainWin::checkFBSDUpdates() {
// Are there freebsd updates to install?
if ( fUp ) {
+ QString mySysVer;
+ QString myPatchVer;
+
+ // Lets try and fetch the desc file
+ QProcess::execute("fetch -o /tmp/.fbsdupdesc http://fbsd-update.pcbsd.org/updates.desc");
+
+ // Get the current system ver
+ QProcess p;
+ p.start(QString("uname"), QStringList() << "-r");
+ while(p.state() == QProcess::Starting || p.state() == QProcess::Running)
+ QCoreApplication::processEvents();
+ tmp = p.readLine().simplified();
+ mySysVer = tmp;
+ myPatchVer = tmp;
+ mySysVer = mySysVer.section("-", 0, 1);
+ mySysVer = mySysVer.section("-", 0, 1);
+ myPatchVer = myPatchVer.section("-", 2, 2);
+ myPatchVer = myPatchVer.section(":", 0, 0);
+ myPatchVer = myPatchVer.section("p", 1, 1);
+
+ QFile file("/tmp/.fbsdupdesc");
+ if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ listDesc << tr("Update Details:");
+ while (!file.atEnd()) {
+ line = file.readLine();
+ tmp = line;
+ if ( tmp.section(":::", 0, 0) != mySysVer )
+ continue;
+ if ( tmp.section(":::", 1, 1) <= myPatchVer )
+ continue;
+ if ( tmp.section(":::", 1, 1) > toPatchVer )
+ continue;
+ listDesc << tmp.section(":::", 2, 2);
+ }
+ }
+
up.clear();
up << "FreeBSD Security Updates" << "FBSDUPDATE";
- up.append(listPkgs);
+ up.append(listDesc + listPkgs);
listUpdates.append(up);
}
View
74 src-qt4/pc-updategui/mainWin.ui
@@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
- <width>593</width>
- <height>339</height>
+ <width>620</width>
+ <height>455</height>
</rect>
</property>
<property name="windowTitle">
<string>Update Manager</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="3" column="0">
+ <item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_2">
@@ -38,32 +38,6 @@
</item>
</layout>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="textLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Preparing to check for updates... Please Wait...</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QProgressBar" name="progressUpdate">
- <property name="value">
- <number>24</number>
- </property>
- </widget>
- </item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupUpdates">
<property name="title">
@@ -141,6 +115,48 @@
</layout>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QProgressBar" name="progressUpdate">
+ <property name="value">
+ <number>24</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="textLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Preparing to check for updates... Please Wait...</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QGroupBox" name="groupDetails">
+ <property name="title">
+ <string>Update Details</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QTextEdit" name="textDesc">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
<resources>
View
2  src-sh/xtrafiles/local/share/pcbsd/conf/pcbsd-mirrors
@@ -28,4 +28,6 @@ http://ftp.is.co.za/BSD/distributions/pc-bsd
http://mirror.internode.on.net/pub/pcbsd
http://ftp.free.org/pub/PC-BSD
http://stingray.cyber.net.pk/pub/pcbsd
+ftp://pcbsd.iqm.unicamp.br/pub/pcbsd
+http://mirror.klaus.priv.at/pub/PCBSD
ftp://ftp.isc-germany.biz/mirror/PcBSD.org

No commit comments for this range

Something went wrong with that request. Please try again.