LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   There is ... updates. <- what package is this line in Kde 4? (http://www.linuxquestions.org/questions/debian-26/there-is-updates-what-package-is-this-line-in-kde-4-a-821343/)

donnied 07-21-2010 06:04 PM

There is ... updates. <- what package is this line in Kde 4?
 
The new install with KDE 4 notifies me when there are updates available in the repository.
Code:

There is 24 updates.
[sic]
Which program/package is responsible for these update messages?

AlucardZero 07-21-2010 06:09 PM

maybe update-notifier? it would help if you said where you saw it

pljvaldez 07-21-2010 06:10 PM

I believe it is update-notifier-kde, but I could be mistaken.

donnied 07-23-2010 08:42 AM

It appears in the KDE 4 in the system tray. I wasn't sure if it was KDE specific.

I found it in the update-notifier-kde (which comes from the source kingston-update notifier (?)).
Code:

find . | xargs grep -i "There is .* updates"
./src/notifier.cpp:      show_update_notification( "It is recommended to update your system", QString("There is %1 updates available").arg(updates), "dialog-information");
./src/notifier.cpp:        show_update_notification( "You should update your system", QString("There is %1 security updates available").arg(security_updates), "dialog-warning");
./src/notifier.cpp:        show_update_notification( "You should update your system", QString("There is %1 updates and %2 security updates available").arg(updates).arg(security_updates), "dialog-warning" );

Any recommendations on how to modify this to differentiate between 1 and more than 1?

Something like:
Code:

void notifier_t::notify_new_updates(int updates, int security_updates) {
  if(updates==0 && security_updates==0) {
    //do nothing, I guess
  } else {
    QPixmap px;
    if(security_updates==0) {
        if(updates==1) {
                show_update_notification( "It is recommended to update your system", QString("There is %1 update available").arg(updates), "dialog-information");
        } else {
                show_update_notification( "It is recommended to update your system", QString("There are %1 updates available").arg(updates), "dialog-information");
        }
    } else {
      if(updates==0) {
        if security_updates==1) {
                show_update_notification( "You should update your system", QString("There is %1 security update available").arg(security_updates), "dialog-warning");
        } else { show_update_notification( "You should update your system", QString("There are %1 security updates available").arg(security_updates), "dialog-warning");
        }
      } else {
        show_update_notification( "You should update your system", QString("There is %1 updates and %2 security updates available").arg(updates).arg(security_updates), "dialog-warning" );
      }
    }
  }
}


There's a bug report and a patch now: http://bugs.debian.org/cgi-bin/bugre...ved=no&mbox=no

However, I can't find the official patch or the new and improved version of notifier.cpp.

donnied 07-23-2010 09:40 AM

How do I get the git package for the new and improved version?
I don't know which git repository or branch I should use.
He mentioned the committed fix was here:
http://git.debian.org/?p=pkg-kde/kin...2eb5a89c47657e

I've tried building myself but I can't find a way to fix
Code:

Unknown CMake command "kde4_add_executable".
.


All times are GMT -5. The time now is 11:11 PM.