Your message dated Tue, 02 Feb 2010 11:47:06 +0000
with message-id <[email protected]>
and subject line Bug#566112: fixed in gnome-codec-install 0.4.3
has caused the Debian Bug report #566112,
regarding gnome-codec-install: [patch] Check if /var/lib/apt/lists is complete 
if no codecs are found
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
566112: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566112
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gnome-codec-install
Version: 0.4.2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu lucid ubuntu-patch


I ran accross a issue on a install when the package list information
was only partly there, the attached patch adds a check for this.

In Ubuntu, we've applied the attached patch to achieve the following:

  * GnomeCodecInstall/MainWindow.py:
    - if no codecs are found, check if the apt package lists
      are complete and if not ask if the user wants to perform
      a update and redo the search (LP: #510033)

We thought you might be interested in doing the same. 

Thanks,
 Michael

-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 
'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-15-generic (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru gnome-codec-install-0.4.2ubuntu1/debian/changelog gnome-codec-install-0.4.2ubuntu2/debian/changelog
diff -Nru gnome-codec-install-0.4.2ubuntu1/GnomeCodecInstall/MainWindow.py gnome-codec-install-0.4.2ubuntu2/GnomeCodecInstall/MainWindow.py
--- gnome-codec-install-0.4.2ubuntu1/GnomeCodecInstall/MainWindow.py	2010-01-21 12:02:51.000000000 +0100
+++ gnome-codec-install-0.4.2ubuntu2/GnomeCodecInstall/MainWindow.py	2010-01-21 12:05:32.000000000 +0100
@@ -9,6 +9,8 @@
 import gst
 import gst.pbutils
 import apt
+import apt_pkg
+import os
 import PackageWorker
 
 # the list columns
@@ -421,16 +423,56 @@
       self._return_code = gst.pbutils.INSTALL_PLUGINS_ERROR
     gtk.main_quit()
 
+  def _apt_lists_dir_has_missing_files(self):
+    """ check if sources.list contains entries that are not in
+        /var/lib/apt/lists - this can happen if the lists/ dir
+        is not fresh
+
+        Returns True if there is a file missing
+    """
+    for metaindex in self.cache._list.List:
+      for m in metaindex.IndexFiles:
+        if m.Label == "Debian Package Index" and not m.Exists:
+          print "Missing package list: ", m
+          return True
+    return False
+          
+  def _ask_perform_update(self):
+    dlg = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
+                            gtk.MESSAGE_QUESTION, gtk.BUTTONS_CANCEL,
+                            _("Update package list?"))
+    dlg.format_secondary_text(_("The package information is incomplete "
+                                "and needs to be updated."))
+    btn = dlg.add_button(_("_Update"), gtk.RESPONSE_YES)
+    btn.grab_focus()
+    dlg.set_title("")
+    dlg.set_transient_for(self._window)
+    res = dlg.run()
+    dlg.destroy()
+    return res == gtk.RESPONSE_YES
+
+  def _show_no_codecs_error(self):
+    plugins = ""
+    for request in self._requests:
+      plugins += "\n" + request.description
+    self.modal_dialog(gtk.MESSAGE_WARNING,
+                      _("No packages with the requested plugins found"),
+                      _("The requested plugins are:\n") + plugins)
+
   def main(self):
     npackages = self._populate_list()
     if npackages == 0:
-      plugins = ""
-      for request in self._requests:
-        plugins += "\n" + request.description
-      self.modal_dialog(gtk.MESSAGE_WARNING,
-                        _("No packages with the requested plugins found"),
-                        _("The requested plugins are:\n") + plugins)
-      return gst.pbutils.INSTALL_PLUGINS_NOT_FOUND
+      if self._apt_lists_dir_has_missing_files():
+        if self._ask_perform_update():
+          worker = PackageWorker.PackageWorker()
+          worker.perform_update(self._window)
+          npackages = self._populate_list()
+          if npackages == 0:
+            self._show_no_codecs_error()
+            return gst.pbutils.INSTALL_PLUGINS_NOT_FOUND
+      else:
+        self._show_no_codecs_error()
+        return gst.pbutils.INSTALL_PLUGINS_NOT_FOUND
     gtk.main()
     return self._return_code
 
diff -Nru gnome-codec-install-0.4.2ubuntu1/GnomeCodecInstall/PackageWorker.py gnome-codec-install-0.4.2ubuntu2/GnomeCodecInstall/PackageWorker.py
--- gnome-codec-install-0.4.2ubuntu1/GnomeCodecInstall/PackageWorker.py	2010-01-21 12:02:51.000000000 +0100
+++ gnome-codec-install-0.4.2ubuntu2/GnomeCodecInstall/PackageWorker.py	2010-01-21 12:05:32.000000000 +0100
@@ -59,7 +59,21 @@
         lock.release()
         f.close()
 
-   
+    def perform_update(self, window_main):
+        window_main.set_sensitive(False)
+        if window_main.window:
+          window_main.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        lock = thread.allocate_lock()
+        lock.acquire()
+        t = thread.start_new_thread(self.run_synaptic,(window_main.window.xid,lock, [], [], self.UPDATE))
+        while lock.locked():
+            while gtk.events_pending():
+                gtk.main_iteration()
+            time.sleep(0.05)
+        window_main.set_sensitive(True)
+        if window_main.window:
+          window_main.window.set_cursor(None)
+
     def perform_action(self, window_main, to_add=None, to_rm=None):
         """ 
         install/remove the given set of packages 

--- End Message ---
--- Begin Message ---
Source: gnome-codec-install
Source-Version: 0.4.3

We believe that the bug you reported is fixed in the latest version of
gnome-codec-install, which is due to be installed in the Debian FTP archive:

gnome-codec-install_0.4.3.dsc
  to main/g/gnome-codec-install/gnome-codec-install_0.4.3.dsc
gnome-codec-install_0.4.3.tar.gz
  to main/g/gnome-codec-install/gnome-codec-install_0.4.3.tar.gz
gnome-codec-install_0.4.3_all.deb
  to main/g/gnome-codec-install/gnome-codec-install_0.4.3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Dröge <[email protected]> (supplier of updated gnome-codec-install 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 02 Feb 2010 12:26:59 +0100
Source: gnome-codec-install
Binary: gnome-codec-install
Architecture: source all
Version: 0.4.3
Distribution: unstable
Urgency: low
Maintainer: Sebastian Dröge <[email protected]>
Changed-By: Sebastian Dröge <[email protected]>
Description: 
 gnome-codec-install - GStreamer codec installer
Closes: 566112
Changes: 
 gnome-codec-install (0.4.3) unstable; urgency=low
 .
   * GnomeCodecInstall/PackageWorker.py,
     GnomeCodecInstall/MainWindow.py:
     + If no codecs are found, check if the apt package lists
       are complete and if not ask if the user wants to perform
       a update and redo the search (Closes: #566112).
       Thanks to Michael Vogt for the patch.
Checksums-Sha1: 
 d394c1fa76511e7664de8d65936d153c47166db4 991 gnome-codec-install_0.4.3.dsc
 818c005c6165651053ba3f167e024dc44af3fbd5 51906 gnome-codec-install_0.4.3.tar.gz
 b618907818c886e0f24b9dc5ffe828c9f8e73cbc 43694 
gnome-codec-install_0.4.3_all.deb
Checksums-Sha256: 
 a1bbbf20d560da0ab3aee26903248fbe1b5e754a62d62bdde7467331fce4b289 991 
gnome-codec-install_0.4.3.dsc
 7c7c4bccaa654756c628ffdc1d79c9aca3592eff03bdb4c516ccd7473d48de2d 51906 
gnome-codec-install_0.4.3.tar.gz
 dd6a5c9b6d1c973f9882dc10e92cdb776e29e1ef3f6890654a856d014c7cc2ee 43694 
gnome-codec-install_0.4.3_all.deb
Files: 
 41bcb402b5b4f2f28331bebe865244c3 991 gnome optional 
gnome-codec-install_0.4.3.dsc
 7fc4f784df5685c913c828d64a101f72 51906 gnome optional 
gnome-codec-install_0.4.3.tar.gz
 0a3a9406ed1de3f7c066e088352b3ada 43694 gnome optional 
gnome-codec-install_0.4.3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAktoDQcACgkQBsBdh1vkHyFhfwCfZARVjYfqi1xZnP3OkPx1OxFf
1ycAniXaDu9FoiLCgxwxeC1w6pXpbOTJ
=Yim8
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to