[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[update-notifier] include missing localized message, files and remove unnessesary patch for reject file



Package: update-notifier
Severity: grave
Tags: l10n, patch

Hi,

 I've found that ALL localized message files (update-notifier.mo) and more 
 were NOT included in package. All the files are stayed debian/tmp directory,
 but not specify to install in debian/update-notifier.install file.

 So, see attached file. I've added patch for 4 area.
  - debian/changelog :)
  - update debian/patches/002_i18n_update.diff for ja.po
  - remove unnecessary lines from debian/patches/04_fix_gksu_usage.diff to
    be enable re-build package
  - update debian/update-notifier.install to install files from debian/tmp


 Could you review it, please?

-- 
Regards,

 Hideki Yamane     henrich @ debian.or.jp/iijmio-mail.jp
 http://wiki.debian.org/HidekiYamane
diff -urN update-notifier-0.70.7.debian.orig/debian/changelog update-notifier-0.70.7.debian/debian/changelog
--- update-notifier-0.70.7.debian.orig/debian/changelog	2008-10-21 19:02:04.000000000 +0900
+++ update-notifier-0.70.7.debian/debian/changelog	2008-10-21 18:57:10.000000000 +0900
@@ -1,3 +1,19 @@
+update-notifier (0.70.7.debian-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/update-notifier.install
+    - add localized message 
+      (as /usr/share/locale/*/LC_MESSAGES/update-notifier.mo)
+    - add /usr/lib/update-notifier/{apt-cdrom-check,apt-check,cddistupgrader}
+    - add /usr/share/icons/hicolor/*/apps/*.png
+    - add /etc/xdg/autostart/update-notifier.desktop
+  * debian/patches/002_i18n_update.diff
+    - update ja.po
+  * debian/patches/04_fix_gksu_usage.diff
+    - remove unnecessary patch line for src/update-notifier.c.orig.rej
+ 
+ -- Hideki Yamane (Debian-JP) <henrich@debian.or.jp>  Tue, 21 Oct 2008 18:55:34 +0900
+
 update-notifier (0.70.7.debian-4) unstable; urgency=low
 
   * 002_i18n_update.diff:
diff -urN update-notifier-0.70.7.debian.orig/debian/patches/002_i18n_update.diff update-notifier-0.70.7.debian/debian/patches/002_i18n_update.diff
--- update-notifier-0.70.7.debian.orig/debian/patches/002_i18n_update.diff	2008-10-21 19:02:04.000000000 +0900
+++ update-notifier-0.70.7.debian/debian/patches/002_i18n_update.diff	2008-10-21 15:19:36.000000000 +0900
@@ -1015,35 +1015,6 @@
  
  #: ../src/hal.c:74
  #, fuzzy
-diff -pruN po.orig/ja.po po/ja.po
---- po.orig/ja.po	2008-01-08 17:40:27.000000000 +0100
-+++ po/ja.po	2008-09-17 12:12:01.772835653 +0200
-@@ -61,9 +61,10 @@ msgid ""
- "\n"
- "Would you like to open it with the package manager?"
- msgstr ""
--"<span weight=\"bold\" size=\"larger\">Ubuntu ã?® CD ã??æ¤?å?ºã??ã?¾ã??ã??</span> \n"
-+"<span weight=\"bold\" size=\"larger\">A volume with software packages has "
-+"been detected.</span>\n"
- "\n"
--"ã??ã??ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??èµ·å??ã??ã?¦ã??ã? ã??ã??ã??"
-+"Would you like to open it with the package manager?"
- 
- #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
- #: ../src/update.c:29
-@@ -82,9 +83,10 @@ msgid ""
- "\n"
- "Would you like to try to upgrade from it automatically? "
- msgstr ""
--"<span weight=\"bold\" size=\"larger\">Ubuntu ã?® CD ã??æ¤?å?ºã??ã?¾ã??ã??</span> \n"
-+"<span weight=\"bold\" size=\"larger\">A distribution volume with software "
-+"packages has been detected.</span>\n"
- "\n"
--"ã??ã??ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??èµ·å??ã??ã?¦ã??ã? ã??ã??ã??"
-+"Would you like to try to upgrade from it automatically? "
- 
- #: ../src/hal.c:74
- #, fuzzy
 diff -pruN po.orig/pl.po po/pl.po
 --- po.orig/pl.po	2008-01-08 17:40:27.000000000 +0100
 +++ po/pl.po	2008-09-17 12:12:01.772835653 +0200
@@ -1394,3 +1365,193 @@
 +"If this is disabled, the user will not be notified about pending apport "
 +"crash reports."
 +msgstr "å¦?æ??ç¦?ç?¨ï¼?ç?¨æ?·å°?æ? æ³?æ?¶å?°å°?æ?¥ç?? apport å´©æº?æ?¥å??é??ç?¥ã??"
+
+diff -pruN po.orig/ja.po po/ja.po
+--- po.orig/es.po        2008-10-21 14:44:07.000000000 +0900
++++ po/ja.po    2008-10-21 14:49:03.000000000 +0900
+@@ -8,7 +8,7 @@
+ msgstr ""
+ "Project-Id-Version: update-notifier VERSION\n"
+ "Report-Msgid-Bugs-To: \n"
+-"POT-Creation-Date: 2008-01-08 17:40+0100\n"
++"POT-Creation-Date: 2008-10-21 12:53+0900\n"
+ "PO-Revision-Date: 2008-10-18 14:18+0000\n"
+ "Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
+ "Language-Team: <debian-japanese@lists.debian.org>\n"
+@@ -69,16 +69,16 @@
+ "\n"
+ "ã??ã??ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã?§é??ã??ã?¾ã??ã??ï¼?"
+ 
+-#: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+-#: ../src/update.c:29
++#: ../src/hal.c:59 ../src/hal.c:73 ../src/hal.c:89 ../src/hal.c:107
++#: ../src/update.c:28
+ msgid "Start package manager"
+ msgstr "ã??ã??ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??èµ·å??"
+ 
+-#: ../src/hal.c:64
++#: ../src/hal.c:65
+ msgid "Upgrade volume detected"
+ msgstr "ã?¢ã??ã??ã?°ã?¬ã?¼ã??ã??ã?ªã?¥ã?¼ã? ã??æ¤?å?ºã??ã??ã?¾ã??ã??"
+ 
+-#: ../src/hal.c:65
++#: ../src/hal.c:66
+ msgid ""
+ "<span weight=\"bold\" size=\"larger\">A distribution volume with software "
+ "packages has been detected.</span>\n"
+@@ -90,15 +90,15 @@
+ "\n"
+ "è?ªå??ã?§ã?¢ã??ã??ã?°ã?¬ã?¼ã??ã??è¡?ã??ã?¾ã??ã??ï¼? "
+ 
+-#: ../src/hal.c:74
++#: ../src/hal.c:75
+ msgid "Run upgrade"
+ msgstr "ã?¢ã??ã??ã?°ã?¬ã?¼ã??ã??å®?è¡?"
+ 
+-#: ../src/hal.c:80
++#: ../src/hal.c:81
+ msgid "Addon volume detected"
+ msgstr "追å? ã??ã?ªã?¥ã?¼ã? ã??èª?è­?ã??ã?¾ã??ã??"
+ 
+-#: ../src/hal.c:81
++#: ../src/hal.c:82
+ msgid ""
+ "<span weight=\"bold\" size=\"larger\">An addon volume with software "
+ "applications has been detected.</span>\n"
+@@ -110,15 +110,15 @@
+ "\n"
+ "ã??ã?ªã?¥ã?¼ã? ã?®ä¸­èº«ã??確èª?ã??ã??ã??ã??ã?¤ã?³ã?¹ã??ã?¼ã?«ã??ã??ã??ã??ã?¾ã??ã??ï¼? "
+ 
+-#: ../src/hal.c:90
++#: ../src/hal.c:91
+ msgid "Start addon installer"
+ msgstr "ã?¢ã??ã?ªã?³ã?¤ã?³ã?¹ã??ã?¼ã?©ã??é??å§?ã??ã?¾ã??"
+ 
+-#: ../src/hal.c:97
++#: ../src/hal.c:98
+ msgid "APTonCD volume detected"
+ msgstr "APTonCD ã??ã?ªã?¥ã?¼ã? ã??è¦?ã?¤ã??ã??ã?¾ã??ã??"
+ 
+-#: ../src/hal.c:98
++#: ../src/hal.c:99
+ msgid ""
+ "<span weight=\"bold\" size=\"larger\">A volume with unofficial software "
+ "packages has been detected.</span>\n"
+@@ -130,11 +130,11 @@
+ "\n"
+ "ã??ã??ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??ç?¨ã??ã?¦é??ã??ã?¾ã??ã??ï¼?"
+ 
+-#: ../src/hooks.c:46 ../src/hooks.c:513
++#: ../src/hooks.c:46 ../src/hooks.c:516
+ msgid "Information available"
+ msgstr "æ??å ±ã??ã??ã??ã?¾ã??"
+ 
+-#: ../src/hooks.c:514
++#: ../src/hooks.c:517
+ msgid "Click on the notification icon to show the available information.\n"
+ msgstr "é??ç?¥ã?¢ã?¤ã?³ã?³ã??ã?¯ã?ªã??ã?¯ã??ã?¦æ??å ±ã??表示ã??ã?¦ã??ã? ã??ã??ã??\n"
+ 
+@@ -152,50 +152,50 @@
+ "\n"
+ "é??ç?¥ã?¢ã?¤ã?³ã?³ã??ã?¯ã?ªã??ã?¯ã??ã?¦å??èµ·å??ã??å®?æ?½ã??ã?¦ã??ã? ã??ã??ã??"
+ 
+-#: ../src/update.c:21
++#: ../src/update.c:20
+ msgid "Show updates"
+ msgstr "ã?¢ã??ã??ã??ã?¼ã??ã?®è¡¨ç¤º"
+ 
+-#: ../src/update.c:25
++#: ../src/update.c:24
+ msgid "Install all updates"
+ msgstr "ã??ã?¹ã?¦ã?®ã?¢ã??ã??ã??ã?¼ã??ã??ã?¤ã?³ã?¹ã??ã?¼ã?«"
+ 
+-#: ../src/update.c:28
++#: ../src/update.c:27
+ msgid "Check for updates"
+ msgstr "ã?¢ã??ã??ã??ã?¼ã??ã?®ã??ã?§ã??ã?¯"
+ 
+-#: ../src/update.c:66
++#: ../src/update.c:67
+ #, c-format
+ msgid "There is %i update available"
+ msgid_plural "There are %i updates available"
+ msgstr[0] "%i å??ã?®ã?¢ã??ã??ã??ã?¼ã??ã??ã??ã??ã?¾ã??"
+ 
+-#: ../src/update.c:134
++#: ../src/update.c:135
+ msgid "Show notifications"
+ msgstr "é??ç?¥ã?®è¡¨ç¤º"
+ 
+ #. and update the tooltip
+-#: ../src/update.c:179
++#: ../src/update.c:180
+ msgid "A package manager is working"
+ msgstr "ã??ã??ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??èµ·å??中ã?§ã??"
+ 
+-#: ../src/update.c:220
++#: ../src/update.c:221
+ msgid "Software updates available"
+ msgstr "æ?°ã??ã??ã?¢ã??ã??ã??ã?¼ã??ã??ã??ã??ã?¾ã??"
+ 
+-#: ../src/update.c:221
++#: ../src/update.c:222
+ msgid "Click on the notification icon to show the available updates.\n"
+ msgstr "é??ç?¥ã?¢ã?¤ã?³ã?³ã??ã?¯ã?ªã??ã?¯ã??ã?¦ã?¢ã??ã??ã??ã?¼ã??ã??表示ã??ã?¦ã??ã? ã??ã??ã??\n"
+ 
+ #: ../src/update.c:259
+ msgid ""
+ "The update information is outdated. This may be caused by network problems. "
+-"Please update manually by click on this icon and then selecting 'Check'."
++"Please update manually by clicking on this icon and then selecting 'Check'."
+ msgstr ""
+-"æ?´æ?°æ??å ±ã??å?¤ã??ã?ªã?£ã?¦ã??ã?¾ã??ã??ã??ã??ã??ã?¯ã?¼ã?¯æ?¥ç¶?ã?«å??é¡?ã??ã??ã??ã??ã??ã??ã??ã?¾ã??ã??ã??"
+-"ã??ã?®ã?¢ã?¤ã?³ã?³ã??ã?¯ã?ªã??ã?¯ã??ã??ã??ã?®å¾?ã??å??ã??ã?§ã??ã?¯ã??ã??ã?¿ã?³ã??æ?¼ã??ã?¦ã??ã? ã??ã??ã??"
++"æ?´æ?°æ??å ±ã??å?¤ã??ã?ªã?£ã?¦ã??ã?¾ã??ã??ã??ã??ã??ã?¯ã?¼ã?¯æ?¥ç¶?ã?«å??é¡?ã??ã??ã??ã??ã??ã??ã??ã?¾ã??ã??ã??ã??ã?®"
++"ã?¢ã?¤ã?³ã?³ã??ã?¯ã?ªã??ã?¯ã??ã?¦ã??å??ã??ã?§ã??ã?¯ã??ã??ã?¿ã?³ã??æ?¼ã??ã?¦ã??ã? ã??ã??ã??"
+ 
+-#: ../src/update.c:292
++#: ../src/update.c:301
+ #, c-format
+ msgid ""
+ "An error occurred, please run Package Manager from the right-click menu or "
+@@ -206,7 +206,7 @@
+ "ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??èµ·å??ã??ã??ä½?ã??èµ·ã??ã?£ã??ã?®ã??確èª?ã??ã?¦ã??ã? ã??ã??ã??\n"
+ "ã?¨ã?©ã?¼ã?¡ã??ã?»ã?¼ã?¸ã?¯æ¬¡ã?®é??ã??ã?§ã??: '%s'"
+ 
+-#: ../src/update.c:299
++#: ../src/update.c:308
+ msgid ""
+ "An error occurred, please run Package Manager from the right-click menu or "
+ "apt-get in a terminal to see what is wrong."
+@@ -214,19 +214,19 @@
+ "ã?¨ã?©ã?¼ã??ç?ºç??ã??ã?¾ã??ã??ã??ã?¡ã??ã?¥ã?¼ã??å?³ã?¯ã?ªã??ã?¯ã??ã??ã??ã??端æ?«ã?§apt-getã??å®?è¡?ã??ã?¦ã??ã??"
+ "ã?±ã?¼ã?¸ã??ã??ã?¼ã?¸ã?£ã??èµ·å??ã??ã??ä½?ã??èµ·ã??ã?£ã??ã?®ã??確èª?ã??ã?¦ã??ã? ã??ã??ã??"
+ 
+-#: ../src/update.c:303
++#: ../src/update.c:312
+ msgid "This usually means that your installed packages have unmet dependencies"
+-msgstr "ã??ã??ã?¯ã?¤ã?³ã?¹ã??ã?¼ã?«ã??ã??ã??ã??ã?±ã?¼ã?¸ã?®ä¾?å­?æ?§ã??æº?ã??ã??ã?ªã??ç?¶æ??ã?¨æ?¨æ¸¬ã?§ã??ã?¾ã??"
++msgstr "大æ?µã?®å ´å??ã?¯ã?¤ã?³ã?¹ã??ã?¼ã?«ã??ã??ã??ã??ã?±ã?¼ã?¸ã?®ä¾?å­?é?¢ä¿?ã?«ä¸?æ?´å??ã??èµ·ã??ã?¦ã??ã?¾ã??ã??"
+ 
+-#: ../src/update.c:316
+-msgid "Error communicating with the backend. Please report this as a bug."
+-msgstr ""
++#: ../src/update.c:325
++msgid "A problem occurred when checking for the updates."
++msgstr "æ?´æ?°ã??確èª?ã??ã?¦ã??ã??é??ã?«ã?¨ã?©ã?¼ã??å??é¡?ã??ç?ºç??ã??ã?¾ã??ã??ã??"
+ 
+-#: ../src/update-notifier.c:260
++#: ../src/update-notifier.c:271
+ msgid "Internal error"
+ msgstr "å??é?¨ã?¨ã?©ã?¼"
+ 
+-#: ../src/update-notifier.c:403
++#: ../src/update-notifier.c:418
+ msgid "update-notifier"
+ msgstr "update-notifier"
+ 
+@@ -285,4 +285,3 @@
+ "If this is disabled, the user will not be notified about pending apport "
+ "crash reports."
+ msgstr "ã??ã??ã??ç?¡å?¹ã?«ã??ã??ã?¨ã??apport ã?¯ã?©ã??ã?·ã?¥ã?¬ã??ã?¼ã??ã?®å»¶æ??ã?®é??ç?¥ã??ã??ã?¾ã??ã??ã??"
+-
diff -urN update-notifier-0.70.7.debian.orig/debian/patches/04_fix_gksu_usage.diff update-notifier-0.70.7.debian/debian/patches/04_fix_gksu_usage.diff
--- update-notifier-0.70.7.debian.orig/debian/patches/04_fix_gksu_usage.diff	2008-10-21 19:02:04.000000000 +0900
+++ update-notifier-0.70.7.debian/debian/patches/04_fix_gksu_usage.diff	2008-10-21 18:58:35.000000000 +0900
@@ -41,471 +41,3 @@
  
  	g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
  }
-diff -urN update-notifier-0.70.7.debian/src/update-notifier.c.orig.rej update-notifier-0.70.7.debian.new/src/update-notifier.c.orig.rej
---- update-notifier-0.70.7.debian/src/update-notifier.c.orig.rej	1970-01-01 01:00:00.000000000 +0100
-+++ update-notifier-0.70.7.debian.new/src/update-notifier.c.orig.rej	2008-04-06 10:46:47.000000000 +0200
-@@ -0,0 +1,464 @@
-+***************
-+*** 0 ****
-+--- 1,461 ----
-++ /* update-notifier.c
-++  * Copyright (C) 2004 Lukas Lipka <lukas@pmad.net>
-++  *           (C) 2004 Michael Vogt <mvo@debian.org>
-++  *           (C) 2004 Michiel Sikkes <michiel@eyesopened.nl>
-++  *           (C) 2004-2006 Canonical
-++  *
-++  * This library is free software; you can redistribute it and/or
-++  * modify it under the terms of the GNU Lesser General Public
-++  * License as published by the Free Software Foundation; either
-++  * version 2 of the License, or (at your option) any later version.
-++  *
-++  * This library is distributed in the hope that it will be useful,
-++  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-++  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-++  * Lesser General Public License for more details.
-++  *
-++  * You should have received a copy of the GNU Lesser General Public
-++  * License along with this library; if not, write to the
-++  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-++  * Boston, MA 02111-1307, USA.
-++  */
-++ 
-++ #ifdef HAVE_CONFIG_H
-++ #include "config.h"
-++ #endif
-++ 
-++ #include <signal.h>
-++ #include <gnome.h>
-++ #include <grp.h>
-++ #include <pwd.h>
-++ #include <limits.h>
-++ #include <glib.h>
-++ #include <glib/gstdio.h>
-++ #include <gtk/gtk.h>
-++ #include <glade/glade.h>
-++ #include <libgnomevfs/gnome-vfs.h>
-++ #include <libgnomevfs/gnome-vfs-utils.h>
-++ #include <libgnomevfs/gnome-vfs-monitor.h>
-++ 
-++ #include "update-notifier.h"
-++ #include "hal.h"
-++ #include "update.h"
-++ #include "hooks.h"
-++ #include "reboot.h"
-++ #include "crash.h"
-++ #include "avahi.h"
-++ 
-++ /* some prototypes */
-++ extern gboolean up_get_clipboard (void);
-++ gboolean update_timer_finished(gpointer data);
-++ 
-++ // the time when we check for fam events
-++ #define TIMEOUT_FAM 1000*5 /* 5 sec */
-++ 
-++ // the timeout (in msec) for apt-get update (changes in 
-++ // /var/lib/apt/lists{/partial})
-++ #define TIMEOUT_APT_GET_UPDATE 1000*30 /* 30 sec */
-++ 
-++ // the timeout (in sec) when a further activity from dpkg/apt
-++ // causes the applet to "ungray"
-++ #define TIMEOUT_APT_RUN 120 /* 120 sec */
-++ 
-++ 
-++ void invoke(gchar *cmd, gchar *desktop, gboolean with_gksu)
-++ {
-++    if(with_gksu)
-++       invoke_with_gksu(cmd, desktop, FALSE);
-++    else
-++       g_spawn_command_line_async(cmd, NULL);
-++ }
-++ 
-++ void
-++ invoke_with_gksu(gchar *cmd, gchar *descr, gboolean whole_message)
-++ {
-++         //g_print("invoke_update_manager ()\n");
-++ 	gchar *argv[5];
-++ 	argv[0] = "/usr/bin/gksu";
-++ 	argv[1] = whole_message ? "--message" : "--desktop";
-++ 	argv[2] = descr;
-++ 	argv[3] = cmd;
-++ 	argv[4] = NULL;
-++ 
-++ 	g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
-++ }
-++ 
-++ 
-++ 
-++ gboolean
-++ trayapplet_create (TrayApplet *un, char *name)
-++ {
-++         //g_print("trayicon_create()\n");
-++ 
-++ 	/* setup widgets */
-++ 	un->tray_icon = gtk_status_icon_new_from_icon_name (name);
-++ 	un->name = name;
-++ 	gtk_status_icon_set_visible (un->tray_icon, FALSE);
-++ 
-++ 	return TRUE;
-++ }
-++ 
-++ 
-++ /* 
-++  the following files change:
-++  on "install":
-++   - /var/lib/dpkg/lock
-++   - /var/lib/dpkg/ *
-++   - /var/lib/update-notifier/dpkg-run-stamp
-++  on "update":
-++   - /var/lib/apt/lists/lock
-++   - /var/lib/apt/lists/ *
-++   - /var/lib/dpkg/lock
-++ */
-++ void
-++ monitor_cb(GnomeVFSMonitorHandle *handle,
-++ 	   const gchar *monitor_uri,
-++ 	   const gchar *info_uri,
-++ 	   GnomeVFSMonitorEventType event_type,
-++ 	   gpointer user_data)
-++ {
-++    UpgradeNotifier *un = (UpgradeNotifier*)user_data;
-++ 
-++ #if 0
-++    g_print("monitor_uri: %s\n", monitor_uri);
-++    g_print("info_uri: %s\n", info_uri);
-++    g_print("event_type: %i\n",event_type);
-++ #endif
-++ 
-++    // we ignore lock file events because we can only get 
-++    // when a lock was taken, but not when it was removed
-++    if(g_str_has_suffix(info_uri, "lock"))
-++       return;
-++ 
-++    // look for apt-get install/update
-++    if(g_str_has_prefix(info_uri,"file:///var/lib/apt/") 
-++       || g_str_has_prefix(info_uri,"file:///var/cache/apt/")
-++       || strcmp(info_uri,"file:///var/lib/dpkg/status") == 0) {
-++       un->apt_get_runing=TRUE;
-++    } 
-++    if(strstr(info_uri, "/var/lib/update-notifier/dpkg-run-stamp")) {
-++       un->dpkg_was_run = TRUE;
-++    } 
-++    if(strstr(info_uri, REBOOT_FILE)) {
-++       //g_print("reboot required\n");
-++       un->reboot_pending = TRUE;
-++    }
-++    if(strstr(info_uri, HOOKS_DIR)) {
-++       //g_print("new hook!\n");
-++       un->hook_pending = TRUE;
-++    }
-++    if(strstr(info_uri, CRASHREPORT_DIR)) {
-++       //g_print("crashreport found\n");
-++       un->crashreport_pending = TRUE;
-++    }
-++    if(strstr(info_uri, UNICAST_LOCAL_AVAHI_FILE)) {
-++       //g_print("avahi disabled due to unicast .local domain\n");
-++       un->unicast_local_avahi_pending = TRUE;
-++    }
-++ }
-++ 
-++ /*
-++  * We periodically check here what actions happend in this "time-slice". 
-++  * This can be:
-++  * - dpkg_was_run=TRUE: set when apt wrote the "dpkg-run-stamp" file
-++  * - apt_get_runing: set when apt/dpkg activity is detected (in the 
-++  *                   lists-dir, archive-cache, or /var/lib/dpkg/status
-++  * - hook_pending: we have new upgrade hoook information
-++  * - reboot_pending: we need to reboot
-++  * - crashreport_pending: we have a new crashreport
-++  * - unicast_local_avahi_pending: avahi got disabled due to a unicast .local domain
-++  *
-++  */
-++ gboolean file_monitor_periodic_check(gpointer data)
-++ 
-++ {
-++    UpgradeNotifier *un = (UpgradeNotifier *)data;
-++ 
-++    // we are not ready yet, wait for the next timeslice
-++    if((un->update == NULL) || (un->reboot == NULL) || (un->crashreport == NULL))
-++       return TRUE;
-++ 
-++    // DPkg::Post-Invoke has written a stamp file, that means a install/remove
-++    // operation finished, we can show hooks/reboot notifications then
-++    if(un->dpkg_was_run) {
-++ 
-++       // check updates
-++       update_check(un->update);
-++ 
-++       // any apt-get update  must be finished, otherwise 
-++       // apt-get install wouldn't be finished
-++       update_apt_is_running(un->update, FALSE);
-++       if(un->update_finished_timer > 0) 
-++ 	 g_source_remove(un->update_finished_timer);
-++       
-++       // show pending hooks/reboots
-++       if(un->hook_pending) {
-++ 	 //g_print("checking hooks now\n");
-++ 	 check_update_hooks(un->hook);
-++ 	 un->hook_pending = FALSE;
-++       }
-++       if(un->reboot_pending) {
-++ 	 //g_print("checking reboot now\n");
-++ 	 reboot_check (un->reboot);
-++ 	 un->reboot_pending = FALSE;
-++       }
-++ 
-++       // apt must be finished when a new stamp file was writen, so we
-++       // reset the apt_get_runing time-slice field because its not 
-++       // important anymore (it finished runing)
-++       //
-++       // This may leave a 5s race condition when a apt-get install finished
-++       // and something new (apt-get) was started
-++       un->apt_get_runing = FALSE;
-++       un->last_apt_action = 0;
-++    }
-++ 
-++    // apt-get update/install or dpkg is runing (and updates files in 
-++    // it's list/cache dir) or in /var/lib/dpkg/status
-++    if(un->apt_get_runing) 
-++       update_apt_is_running(un->update, TRUE);
-++ 
-++    // update time information for apt/dpkg
-++    time_t now = time(NULL);
-++    if(un->apt_get_runing) 
-++       un->last_apt_action = now;
-++ 
-++    // no apt operation for a long time
-++    if(un->last_apt_action > 0 &&
-++       (now - un->last_apt_action) >  TIMEOUT_APT_RUN) {
-++       update_apt_is_running(un->update, FALSE);
-++       update_check(un->update);
-++       un->last_apt_action = 0;
-++    }
-++ 
-++    if(un->crashreport_pending) {
-++       g_print("checking for valid crashreport now\n");
-++       crashreport_check (un->crashreport);
-++       un->crashreport_pending = FALSE;
-++    }
-++ 
-++    if(un->unicast_local_avahi_pending) {
-++       g_print("checking for disabled avahi due to unicast .local domain now\n");
-++       avahi_disabled_check ();
-++       un->unicast_local_avahi_pending = FALSE;
-++    }
-++ 
-++    // reset the bitfields (for the next "time-slice")
-++    un->dpkg_was_run = FALSE;
-++    un->apt_get_runing = FALSE;
-++ 
-++    return TRUE;
-++ }
-++ 
-++ 
-++ 
-++ 
-++ /* u_abort seems like an internal error notification.
-++  * End user might not understand the message at all */
-++ void u_abort(gchar *msg)
-++ {
-++    msg = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s\n", _("Internal error"), msg);
-++    gtk_dialog_run(GTK_DIALOG(gtk_message_dialog_new_with_markup(NULL,0,
-++ 						     GTK_MESSAGE_ERROR,
-++ 						     GTK_BUTTONS_CLOSE,
-++ 						     msg)));
-++    g_free(msg);
-++    exit(1);
-++ }
-++ 
-++ // FIXME: get the apt directories with apt-config or something
-++ gboolean monitor_init(UpgradeNotifier *un)
-++ {
-++    int i;
-++    GnomeVFSResult res;
-++    GnomeVFSMonitorHandle *monitor_handle;
-++ 
-++    // monitor thise dirs
-++    static const char *monitor_dirs[] = { 
-++       "/var/lib/apt/lists/", "/var/lib/apt/list/partial", 
-++       "/var/cache/apt/archives/", "/var/cache/apt/archives/partial", 
-++       HOOKS_DIR, 
-++       CRASHREPORT_DIR,
-++       NULL};
-++    for(i=0;monitor_dirs[i] != NULL;i++) {
-++       res = gnome_vfs_monitor_add(&monitor_handle,
-++ 				  monitor_dirs[i],
-++ 				  GNOME_VFS_MONITOR_DIRECTORY,
-++ 				  monitor_cb, un);
-++    }
-++ 
-++    // and those files
-++    static const char *monitor_files[] = { 
-++       "/var/lib/dpkg/status", 
-++       "/var/lib/update-notifier/dpkg-run-stamp", 
-++       REBOOT_FILE,
-++       UNICAST_LOCAL_AVAHI_FILE,
-++       NULL};
-++    for(i=0;monitor_files[i] != NULL;i++) {
-++       res = gnome_vfs_monitor_add(&monitor_handle,
-++ 				  monitor_files[i],
-++ 				  GNOME_VFS_MONITOR_FILE,
-++ 				  monitor_cb, un);
-++    }
-++ 
-++    g_timeout_add (TIMEOUT_FAM, (GSourceFunc)file_monitor_periodic_check, un);
-++ 
-++ 
-++    return TRUE;
-++ }
-++ 
-++ 
-++ 
-++ 
-++ static gboolean
-++ tray_icons_init(UpgradeNotifier *un)
-++ {
-++    //g_debug("tray_icons_init");
-++ 
-++    /* new upates tray icon */
-++    un->update = g_new0 (TrayApplet, 1);
-++ 
-++    trayapplet_create(un->update, "software-update-available");
-++    update_tray_icon_init(un->update);
-++ 
-++    /* update hook icon*/
-++    un->hook = g_new0 (TrayApplet, 1);
-++    trayapplet_create(un->hook, "hook-notifier");
-++    hook_tray_icon_init(un->hook);
-++ 
-++    /* reboot required icon */
-++    un->reboot = g_new0 (TrayApplet, 1);
-++    trayapplet_create(un->reboot, "reboot-notifier");
-++    reboot_tray_icon_init(un->reboot);
-++ 
-++    /* crashreport detected icon */
-++    un->crashreport = g_new0 (TrayApplet, 1);
-++    trayapplet_create(un->crashreport, "apport");
-++    crashreport_tray_icon_init(un->crashreport);
-++ 
-++    return FALSE; // for the tray_destroyed_cb
-++ }
-++ 
-++ // this function checks if the user is in the admin group
-++ // if there is no admin group, we return true becuase there
-++ // is no way to figure if the user is a admin or not
-++ gboolean
-++ in_admin_group()
-++ {
-++    int i, ng = 0;
-++    gid_t *groups = NULL;
-++ 
-++    struct group *grp = getgrnam("admin");
-++    if(grp == NULL) 
-++       return TRUE;
-++ 
-++    ng = getgroups (0, NULL);
-++    groups = (gid_t *) malloc (ng * sizeof (gid_t));
-++ 
-++    i = getgroups (ng, groups);
-++    if (i != ng) {
-++      free (groups);
-++      return TRUE;
-++    }
-++    
-++    for(i=0;i<ng;i++) {
-++       if(groups[i] == grp->gr_gid) {
-++         free(groups);
-++         return TRUE;
-++       }
-++    }
-++    
-++    if(groups != NULL)
-++       free(groups);
-++ 
-++    return FALSE;
-++ }
-++ 
-++ static GOptionEntry entries[] = 
-++ {
-++    { "debug-hooks", 0, 0, G_OPTION_ARG_NONE, &HOOK_DEBUG, "Enable hooks debugging"},
-++    { NULL }
-++ };
-++ 
-++ int 
-++ main (int argc, char *argv[])
-++ {
-++ 	GnomeClient *client;
-++ 	UpgradeNotifier *un;
-++ 
-++ 	// option parsing
-++ 	GOptionContext *context;
-++ 	context = g_option_context_new (" - inform about updates");
-++ 	g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
-++ 	gnome_program_init (PACKAGE, PACKAGE_VERSION, 
-++ 			    LIBGNOMEUI_MODULE,
-++ 			    argc, argv, 
-++ 			    GNOME_PARAM_GOPTION_CONTEXT, context,
-++ 			    GNOME_PARAM_NONE);
-++ 	notify_init("update-notifier");
-++         bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
-++         bind_textdomain_codeset(PACKAGE, "UTF-8");
-++         textdomain(PACKAGE);
-++ 
-++ 	g_set_application_name (_("update-notifier"));
-++ 	gtk_window_set_default_icon_name ("update-notifier");
-++ 
-++ 	//g_print("starting update-notifier\n");
-++ 	
-++ 	// check if we should run at all (see HideAdminTools spec
-++ 	// on https://wiki.ubuntu.com/HideAdminToolsToUsers)
-++ 	if(!in_admin_group()) {
-++ 	   g_warning("not starting because user is not in admin group\n");
-++ 	   exit(0);
-++ 	}
-++ 
-++ 	client = gnome_master_client ();
-++ 	if (up_get_clipboard ())
-++ 	  gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
-++ 	else {
-++ 	   gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
-++ 	   g_warning ("already running?\n");
-++ 	   return 1;
-++ 	}
-++ 
-++ 	/* Make sure we die when the session dies */
-++ 	g_signal_connect (G_OBJECT (client), "die",
-++ 			  G_CALLBACK (gtk_main_quit), NULL);
-++ 	
-++ 	/* Create the UpgradeNotifier object */
-++ 	un = g_new0 (UpgradeNotifier, 1);
-++ 
-++ 	// check for .update-notifier dir and create if needed
-++ 	gchar *dirname = g_strdup_printf("%s/.update-notifier",
-++ 					 g_get_home_dir());
-++ 	if(!g_file_test(dirname, G_FILE_TEST_IS_DIR))
-++ 	   g_mkdir(dirname, 0700);
-++ 	g_free(dirname);
-++ 
-++ 	// create the icons with a timeout
-++ 	//g_timeout_add(5000, (GSourceFunc)(tray_icons_init), un);
-++ 	tray_icons_init(un);
-++ 
-++         // initial check for avahi
-++         avahi_disabled_check();
-++ 
-++ 	// init hal (needs to be done _after_ the icons are created)
-++ 	/* setup hal so that inserted cdroms can be checked */
-++ 	LibHalContext *hal_ctx = up_do_hal_init();
-++ 	if (!hal_ctx) {
-++ 	   u_abort("failed to initialize HAL!\n");
-++ 	   return 1;
-++ 	}
-++ 	libhal_ctx_set_user_data(hal_ctx, un);
-++ 	
-++ 	// init fam
-++ 	monitor_init(un);
-++ 	
-++ 	/* Start the main gtk loop */
-++ 	gtk_main ();
-++ 
-++ 	return 0;
-++ }
diff -urN update-notifier-0.70.7.debian.orig/debian/update-notifier.install update-notifier-0.70.7.debian/debian/update-notifier.install
--- update-notifier-0.70.7.debian.orig/debian/update-notifier.install	2008-10-21 19:02:04.000000000 +0900
+++ update-notifier-0.70.7.debian/debian/update-notifier.install	2008-10-21 18:47:56.000000000 +0900
@@ -1,2 +1,13 @@
 usr/bin/update-notifier
 usr/lib/update-notifier/gdm-signal
+usr/lib/update-notifier/apt-cdrom-check
+usr/lib/update-notifier/apt-check
+usr/lib/update-notifier/cddistupgrader
+usr/share/icons/hicolor/16x16/apps/*
+usr/share/icons/hicolor/22x22/apps/*
+usr/share/icons/hicolor/24x24/apps/*
+usr/share/icons/hicolor/48x48/apps/*
+etc/xdg/autostart/update-notifier.desktop
+usr/share/update-notifier/glade/*.glade
+usr/share/gconf/schemas/update-notifier.schemas
+usr/share/locale/*/LC_MESSAGES/update-notifier.mo

Attachment: pgpo3sDWyfqIo.pgp
Description: PGP signature


Reply to: