Package: synaptic
Version: 0.70~pre1+b1
Severity: normal

Hi there. This is not a current problem in debian but i was hoping you could
take a look at this anyway as it may become one in future.

The issue is that synaptic will ftbfs with newer versions of vte that have
VTE_SEAL_ENABLE defined. This happens when code tries to access the adjustment
variable of a _VteTerminal struct which isnt allowed with seals.

So in gtk/rgdebinstallprogress.cc and gtk/rgterminstallprogress.cc, lines like

-   GtkAdjustment *a = GTK_ADJUSTMENT (VTE_TERMINAL(me->_term)->adjustment);

will lead to build errors with -DVTE_SEAL_ENABLE like

        error: ‘struct _VteTerminal’ has no member named ‘adjustment’

Attached is a patch that uses a vte_terminal_get_adjustment call instead

+   GtkAdjustment *a = GTK_ADJUSTMENT (
                        vte_terminal_get_adjustment (VTE_TERMINAL(me->_term)));

Hopefully this is a sane way to go about things. The patch builds and seems to
run fine on sid. This is a current issue in Ubuntu with synaptic-0.63.1ubuntu13
and vte 0.25.91
Thanks




-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages synaptic depends on:
ii  apt [libapt-pkg4.10]    0.8.5            Advanced front-end for dpkg
ii  apt-utils [libapt-inst1 0.8.5            APT utility programs
ii  hicolor-icon-theme      0.12-1           default fallback theme for FreeDes
ii  libatk1.0-0             1.30.0-1         The ATK accessibility toolkit
ii  libc6                   2.11.2-6         Embedded GNU C Library: Shared lib
ii  libcairo2               1.8.10-6         The Cairo 2D vector graphics libra
ii  libept1                 1.0.3+b1         High-level library for managing De
ii  libfontconfig1          2.8.0-2.1        generic font configuration library
ii  libfreetype6            2.4.2-2          FreeType 2 font engine, shared lib
ii  libgcc1                 1:4.4.4-14       GCC support library
ii  libglade2-0             1:2.6.4-1        library to load .glade files at ru
ii  libglib2.0-0            2.24.2-1         The GLib library of C routines
ii  libgtk2.0-0             2.20.1-1+b1      The GTK+ graphical user interface 
ii  libpango1.0-0           1.28.1-1         Layout and rendering of internatio
ii  libstdc++6              4.4.4-14         The GNU Standard C++ Library v3
ii  libvte9                 1:0.24.3-1       Terminal emulator widget for GTK+ 
ii  libx11-6                2:1.3.3-3        X11 client-side library
ii  libxapian22             1.2.3-2          Search engine library
ii  libxml2                 2.7.7.dfsg-4     GNOME XML library
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages synaptic recommends:
ii  apt-xapian-index         0.39            maintenance and search tools for a
ii  gksu                     2.0.2-3         graphical frontend to su
ii  libgnome2-perl           1.042-2         Perl interface to the GNOME librar
ii  rarian-compat            0.8.1-5         Documentation meta-data library (c
ii  software-properties-gtk  0.60.debian-1.1 manage the repositories that you i

Versions of packages synaptic suggests:
pn  deborphan                     <none>     (no description available)
pn  dwww                          <none>     (no description available)
ii  menu                          2.1.44     generates programs menu for all me

-- no debconf information
#! /bin/sh /usr/share/dpatch/dpatch-run
## 15_vte-terminal-seals-enabled-fix.dpatch by Niall Creech <niallcre...@gmail.com>
## Author: Niall Creech <niallcre...@gmail.com>
## Description: Replace direct access to adjustment variable in VteTerminal's to allow for newer 
##  vte versions with VTE_SEAL_ENABLE defined and fix FTBFS in this case
## Ubuntu-Bug: https://bugs.edge.launchpad.net/ubuntu/+source/synaptic/+bug/642121

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' synaptic-0.63.1ubuntu13~/gtk/rgdebinstallprogress.cc synaptic-0.63.1ubuntu13/gtk/rgdebinstallprogress.cc
--- synaptic-0.63.1ubuntu13~/gtk/rgdebinstallprogress.cc	2010-07-30 13:03:02.000000000 +0100
+++ synaptic-0.63.1ubuntu13/gtk/rgdebinstallprogress.cc	2010-09-18 17:43:32.893607740 +0100
@@ -334,7 +334,7 @@
    // it when run hidden. this workaround will scroll to the end of
    // the current buffer
    gtk_widget_realize(GTK_WIDGET(me->_term));
-   GtkAdjustment *a = GTK_ADJUSTMENT (VTE_TERMINAL(me->_term)->adjustment);
+   GtkAdjustment *a = GTK_ADJUSTMENT (vte_terminal_get_adjustment (VTE_TERMINAL(me->_term)));
    gtk_adjustment_set_value(a, a->upper - a->page_size);
    gtk_adjustment_value_changed(a);
 
@@ -394,7 +394,7 @@
    _term = vte_terminal_new();
    vte_terminal_set_size(VTE_TERMINAL(_term),80,23);
    GtkWidget *scrollbar = 
-      gtk_vscrollbar_new (GTK_ADJUSTMENT (VTE_TERMINAL(_term)->adjustment));
+      gtk_vscrollbar_new (GTK_ADJUSTMENT (vte_terminal_get_adjustment (VTE_TERMINAL(_term))));
    GTK_WIDGET_UNSET_FLAGS (scrollbar, GTK_CAN_FOCUS);
    vte_terminal_set_scrollback_lines(VTE_TERMINAL(_term), 10000);
    if(_config->FindB("Synaptic::useUserTerminalFont")) {
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' synaptic-0.63.1ubuntu13~/gtk/rgterminstallprogress.cc synaptic-0.63.1ubuntu13/gtk/rgterminstallprogress.cc
--- synaptic-0.63.1ubuntu13~/gtk/rgterminstallprogress.cc	2010-07-30 13:03:02.000000000 +0100
+++ synaptic-0.63.1ubuntu13/gtk/rgterminstallprogress.cc	2010-09-18 17:43:32.893607740 +0100
@@ -62,7 +62,7 @@
    setTitle(_("Applying Changes"));
 
    _term = vte_terminal_new();
-   _scrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (VTE_TERMINAL(_term)->adjustment));
+   _scrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (vte_terminal_get_adjustment (VTE_TERMINAL(_term))));
    GTK_WIDGET_UNSET_FLAGS (_scrollbar, GTK_CAN_FOCUS);
    vte_terminal_set_scrollback_lines(VTE_TERMINAL(_term), 10000);
    if(_config->FindB("Synaptic::useUserTerminalFont")) {

Reply via email to