Author: tgoettlicher Date: Wed Aug 1 16:41:23 2007 New Revision: 6368 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6368&view=rev Log: added priority for pkgmgr patches Modified: trunk/updater-kde/updater/MainWindow.cpp trunk/updater-kde/updater/TrayIcon.cpp trunk/updater-kde/updater/Updater.h trunk/updater-kde/updater/simpleview.cpp trunk/updater-kde/updater/zypp/CMakeLists.txt trunk/updater-kde/updater/zypp/ZYppUpdater.cpp Modified: trunk/updater-kde/updater/MainWindow.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/MainWindow.cpp?rev=6368&r1=6367&r2=6368&view=diff ============================================================================== --- trunk/updater-kde/updater/MainWindow.cpp (original) +++ trunk/updater-kde/updater/MainWindow.cpp Wed Aug 1 16:41:23 2007 @@ -538,7 +538,8 @@ QCheckListItem *item = (QCheckListItem*)patchList->firstChild(); while (item != NULL) { - if (item->text(COLUMN_TYPE).lower() == "security" ) + if (item->text(COLUMN_TYPE).lower() == "security" || + item->text(COLUMN_TYPE).lower() == "packagemanager" ) { item->setState(QCheckListItem::On); item->setSelected(true); Modified: trunk/updater-kde/updater/TrayIcon.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/TrayIcon.cpp?rev=6368&r1=6367&r2=6368&view=diff ============================================================================== --- trunk/updater-kde/updater/TrayIcon.cpp (original) +++ trunk/updater-kde/updater/TrayIcon.cpp Wed Aug 1 16:41:23 2007 @@ -86,7 +86,9 @@ break; case APPLET_UPDATES: + case APPLET_PKGMGR_UPDATES: case APPLET_CRITICAL_UPDATES: + QToolTip::add(this, i18n("New software updates are available.")); setPixmap(loadIcon(TRAY_ICON_YELLOW)); showPopup(); break; Modified: trunk/updater-kde/updater/Updater.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/Updater.h?rev=6368&r1=6367&r2=6368&view=diff ============================================================================== --- trunk/updater-kde/updater/Updater.h (original) +++ trunk/updater-kde/updater/Updater.h Wed Aug 1 16:41:23 2007 @@ -53,7 +53,8 @@ APPLET_CRITICAL_UPDATES, /** Updates available (security) **/ APPLET_CHECKING, /** Checking for updates **/ APPLET_PROBLEM, /** problem **/ - APPLET_INSTALLING /** installing patches or packages **/ + APPLET_INSTALLING, /** installing patches or packages **/ + APPLET_PKGMGR_UPDATES /** Updates available that affect the package manager **/ }; /** Modified: trunk/updater-kde/updater/simpleview.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/simpleview.cpp?rev=6368&r1=6367&r2=6368&view=diff ============================================================================== --- trunk/updater-kde/updater/simpleview.cpp (original) +++ trunk/updater-kde/updater/simpleview.cpp Wed Aug 1 16:41:23 2007 @@ -185,6 +185,22 @@ bar->hide(); break; + case APPLET_PKGMGR_UPDATES: + headline->setText(i18n("<b>New software for your system is available</b>")); + title->setText(i18n("Updates that affect your updater itself are available.")); + + recommended->hide(); + recommended->setDown(true); + securityCount=999; + norestart->hide(); + + install->show(); + ok->hide(); + details->hide(); + cancel->show(); + bar->hide(); + break; + case APPLET_UPDATES: case APPLET_CRITICAL_UPDATES: headline->setText(i18n("<b>New software for your system is available</b>")); Modified: trunk/updater-kde/updater/zypp/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/zypp/CMakeLists.txt?rev=6368&r1=6367&r2=6368&view=diff ============================================================================== --- trunk/updater-kde/updater/zypp/CMakeLists.txt (original) +++ trunk/updater-kde/updater/zypp/CMakeLists.txt Wed Aug 1 16:41:23 2007 @@ -15,6 +15,8 @@ #INSTALL_TARGETS(/lib/kde3 opensuseupdater_zypp ) #INSTALL_TARGETS(${KDE3_LIB_DIR} opensuseupdater_zypp ) INSTALL(TARGETS opensuseupdater_zypp DESTINATION ${KDE3_LIB_INSTALL_DIR} ) +INSTALL(TARGETS opensuseupdater_zypp DESTINATION ${KDE3_LIB_INSTALL_DIR}/kde3 ) +#INSTALL(TARGETS opensuseupdater_zypp DESTINATION ${KDE3_LIB_DIR} ) ########### install files ############### Modified: trunk/updater-kde/updater/zypp/ZYppUpdater.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/updater-kde/updater/zypp/ZYppUpdater.cpp?rev=6368&r1=6367&r2=6368&view=diff ============================================================================== --- trunk/updater-kde/updater/zypp/ZYppUpdater.cpp (original) +++ trunk/updater-kde/updater/zypp/ZYppUpdater.cpp Wed Aug 1 16:41:23 2007 @@ -93,10 +93,27 @@ QMessageBox::information( NULL, PROGRAM_DISPLAY_NAME, i18n("Update finished.")); doCheckForUpdates(); } - else + + + if (p->exitStatus() == 102 ) + { + QMessageBox::information( NULL, PROGRAM_DISPLAY_NAME, i18n("One of installed patches affects the package manager itself, thus it requires to restart %1.").arg(PROGRAM_DISPLAY_NAME)); + + system("( sleep 2; opensuseupdater-kde ) & "); + + kapp->quit(); + } + + if (p->exitStatus() == 103) { - // Some Error/Warning occured + QMessageBox::information( NULL, PROGRAM_DISPLAY_NAME, + i18n("One of installed patches requires reboot of your machine. Please, do it as soon as possible.")); + doCheckForUpdates(); + } + if ( !_install_stderr_buffer.isEmpty() || !_install_stdout_buffer.isEmpty() ) + { + // some errors/warnings occured QString message; @@ -112,10 +129,6 @@ QMessageBox::critical( NULL, PROGRAM_DISPLAY_NAME, _install_stderr_buffer); } - if ( p->exitStatus() != 0 ) - message+=i18n("return value: %1").arg(p->exitStatus()); - - updateAppletError( i18n("helper program returned:\n%1").arg(message)); } @@ -124,15 +137,6 @@ delete p; _install_process = 0L; - if (restartUpdater==true) - { - kdDebug() << "RESTART" << endl; - QMessageBox::information( NULL, PROGRAM_DISPLAY_NAME, i18n("One of installed patches affects the package manager itself, thus it requires to restart %1.").arg(PROGRAM_DISPLAY_NAME)); - - system("( sleep 3; opensuseupdater-kde ) & "); - - kapp->quit(); - } } @@ -192,6 +196,8 @@ _patchList->clear(); _packageList->clear(); + bool pkgmgr_avail=false; + kdDebug() << "populating... " << _resolvables.count() << " resolvables" << endl; for ( QPtrList<ZYppResolvable>::const_iterator it = _resolvables.begin(); it != _resolvables.end(); ++it ) @@ -211,9 +217,17 @@ newItem->setText(COLUMN_RESTART, ((*it)->restart == true ) ? "Yes" : "No" ) ; newItem->setText(COLUMN_RESTART_HIDDEN, ((*it)->restart == true) ? "restart" : "norestart" ); - } + if ((*it)->pkgmanager) + { + pkgmgr_avail=true; + newItem->setText(COLUMN_TYPE, "packagemanager" ); + } + - if ( _patchList->childCount() > 0 ) + } + if (pkgmgr_avail) + emit(updateApplet(APPLET_PKGMGR_UPDATES, _patchList->childCount(), _packageList->childCount())); + else if ( _patchList->childCount() > 0 ) emit(updateApplet(APPLET_UPDATES, _patchList->childCount(), _packageList->childCount())); else emit(updateApplet(APPLET_NO_UPDATES, 0, 0)); @@ -431,11 +445,6 @@ return; } - if (!installPkgMgrList.isEmpty()) - restartUpdater=true; - else - restartUpdater=false; - _install_process = new KProcess; QString command="/usr/sbin/zypper_install"; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org