Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian dpkg (http://www.linux-archive.org/debian-dpkg/)
-   -   Assumptions when processing triggers (was Bug#671711: monodoc-browser: fails to upgrade) from 'testing' (http://www.linux-archive.org/debian-dpkg/664773-assumptions-when-processing-triggers-bug-671711-monodoc-browser-fails-upgrade-testing.html)

Iain Lane 05-09-2012 03:12 PM

Assumptions when processing triggers (was Bug#671711: monodoc-browser: fails to upgrade) from 'testing'
 
Greetings,

[ @ debian-dpkg, there is a question for you below ]

Thanks for the report.

On Sun, May 06, 2012 at 10:37:53AM +0200, Andreas Beckmann wrote:
> […]
> Hi,
>
> during a test with piuparts I noticed your package fails to upgrade from
> 'testing'.
> It installed fine in 'testing', then the upgrade to 'sid' fails.
>
> >From the attached log (scroll to the bottom...):
>
> Preparing to replace monodoc-clutter-manual 1.0.0~alpha3~git20090817.r1.349dba6-7 (using .../monodoc-clutter-manual_1.0.0~alpha3~git20090817.r1.349dba6-8_all.deb) ...
> Unpacking replacement monodoc-clutter-manual ...
> Processing triggers for monodoc-browser ...
> generating monodoc search index...
> grep: /etc/gre.d/*.conf: No such file or directory
>
> Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
> File name: 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'
> [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
> File name: 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'
> dpkg: error processing monodoc-browser (--unpack):
> subprocess installed post-installation script returned error exit status 1
> configured to not write apport reports
> Errors were encountered while processing:
> monodoc-browser

It's because libgtk2.0-cil (on which monodoc-browser depends) has been
unpacked but not configured at this point. I thought (from reading
/usr/share/doc/dpkg-dev/triggers.txt.gz):

,----
| Packages in t-awaited and t-pending demand satisfaction of their
| dependencies just like packages in installed.
`----

that I could assume this would be the case when running the trigger, but
apparently not. What am I guaranteed here? I spoke to Colin Watson about
this yesterday and he suggested that perhaps the postinst trigger could
register gtk-sharp into the GAC itself, which would be somewhat
unfortunate but would probably work if it is guaranteed that
libgtk2.0-cil will be unpacked or better when the trigger is activated.

In general, what assumptions is it valid to make about the state of
depended-on packages of a package in t-pending when the trigger is
finally processed?

Cheers,

--
Iain Lane [ iain@orangesquash.org.uk ]
Debian Developer [ laney@debian.org ]
Ubuntu Developer [ laney@ubuntu.com ]
PhD student [ ial@cs.nott.ac.uk ]

Iain Lane 05-22-2012 10:37 PM

Assumptions when processing triggers (was Bug#671711: monodoc-browser: fails to upgrade) from 'testing'
 
Greetings,

[ I already asked this on d-dpkg, but go no response, so am "re-posting"
this question to -devel. The original report along with full log is in
#671711 ]

On Sun, May 06, 2012 at 10:37:53AM +0200, Andreas Beckmann wrote:
> […]
> Hi,
>
> during a test with piuparts I noticed your package fails to upgrade from
> 'testing'.
> It installed fine in 'testing', then the upgrade to 'sid' fails.
>
> >From the attached log (scroll to the bottom...):
>
> Preparing to replace monodoc-clutter-manual 1.0.0~alpha3~git20090817.r1.349dba6-7 (using .../monodoc-clutter-manual_1.0.0~alpha3~git20090817.r1.349dba6-8_all.deb) ...
> Unpacking replacement monodoc-clutter-manual ...
> Processing triggers for monodoc-browser ...
> generating monodoc search index...
> grep: /etc/gre.d/*.conf: No such file or directory
>
> Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
> File name: 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'
> [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
> File name: 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'
> dpkg: error processing monodoc-browser (--unpack):
> subprocess installed post-installation script returned error exit status 1
> configured to not write apport reports
> Errors were encountered while processing:
> monodoc-browser

It's because libgtk2.0-cil (on which monodoc-browser depends) has been
unpacked but not configured at this point. I thought (from reading
/usr/share/doc/dpkg-dev/triggers.txt.gz):

,----
| Packages in t-awaited and t-pending demand satisfaction of their
| dependencies just like packages in installed.
`----

that I could assume this would be the case when running the trigger, but
apparently not. What am I guaranteed here? I spoke to Colin Watson about
this at UDS and he suggested that perhaps the postinst trigger could
register gtk-sharp into the GAC itself, which would be somewhat
unfortunate but would probably work if it is guaranteed that
libgtk2.0-cil will be unpacked or better when the trigger is activated.

In general, what assumptions is it valid to make about the state of
depended-on packages of a package in t-pending when the trigger is
finally processed? Or, can anyone suggest a nice solution to this bug?
:-)

Cheers,

--
Iain Lane [ iain@orangesquash.org.uk ]
Debian Developer [ laney@debian.org ]
Ubuntu Developer [ laney@ubuntu.com ]
PhD student [ ial@cs.nott.ac.uk ]

Ian Jackson 05-23-2012 01:05 PM

Assumptions when processing triggers (was Bug#671711: monodoc-browser: fails to upgrade) from 'testing'
 
Iain Lane writes ("Assumptions when processing triggers (was [pkg-mono-group] Bug#671711: monodoc-browser: fails to upgrade) from 'testing'"):
> Greetings,
>
> [ I already asked this on d-dpkg, but go no response, so am "re-posting"
> this question to -devel. The original report along with full log is in
> #671711 ]
>
> On Sun, May 06, 2012 at 10:37:53AM +0200, Andreas Beckmann wrote:
> > […]
> > Hi,
> >
> > during a test with piuparts I noticed your package fails to upgrade from
> > 'testing'.
> > It installed fine in 'testing', then the upgrade to 'sid' fails.
> >
> > >From the attached log (scroll to the bottom...):
> >
> > Preparing to replace monodoc-clutter-manual 1.0.0~alpha3~git20090817.r1.349dba6-7 (using .../monodoc-clutter-manual_1.0.0~alpha3~git20090817.r1.349dba6-8_all.deb) ...
> > Unpacking replacement monodoc-clutter-manual ...
> > Processing triggers for monodoc-browser ...
> > generating monodoc search index...
> > grep: /etc/gre.d/*.conf: No such file or directory
> >
> > Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
...
> > dpkg: error processing monodoc-browser (--unpack):
> > subprocess installed post-installation script returned error exit status 1
...
> It's because libgtk2.0-cil (on which monodoc-browser depends) has been
> unpacked but not configured at this point. I thought (from reading
> /usr/share/doc/dpkg-dev/triggers.txt.gz):

I think this is a bug.

> ,----
> | Packages in t-awaited and t-pending demand satisfaction of their
> | dependencies just like packages in installed.
> `----

This is true, but doesn't help you. The unpack of libgtk2.0-cil can
be started, moving it from installed to (eventually) unpacked, without
causing monodoc-browser to be deconfigured, and this is nothing to do
with triggers.

But as you point out there is an additional requirement (perhaps not
specified in the docs) that all the dependencies should be satisfied
when the postinst is run.

Would you like me to try to look into it and prepare a patch for dpkg ?
(Do you need this to be fixed in squeeze or will wheezy/sid do?)

Ian.


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20412.57480.903694.845564@chiark.greenend.org.uk"> http://lists.debian.org/20412.57480.903694.845564@chiark.greenend.org.uk

Ian Jackson 05-23-2012 01:05 PM

Assumptions when processing triggers (was Bug#671711: monodoc-browser: fails to upgrade) from 'testing'
 
Iain Lane writes ("Assumptions when processing triggers (was [pkg-mono-group] Bug#671711: monodoc-browser: fails to upgrade) from 'testing'"):
> Greetings,
>
> [ I already asked this on d-dpkg, but go no response, so am "re-posting"
> this question to -devel. The original report along with full log is in
> #671711 ]
>
> On Sun, May 06, 2012 at 10:37:53AM +0200, Andreas Beckmann wrote:
> > […]
> > Hi,
> >
> > during a test with piuparts I noticed your package fails to upgrade from
> > 'testing'.
> > It installed fine in 'testing', then the upgrade to 'sid' fails.
> >
> > >From the attached log (scroll to the bottom...):
> >
> > Preparing to replace monodoc-clutter-manual 1.0.0~alpha3~git20090817.r1.349dba6-7 (using .../monodoc-clutter-manual_1.0.0~alpha3~git20090817.r1.349dba6-8_all.deb) ...
> > Unpacking replacement monodoc-clutter-manual ...
> > Processing triggers for monodoc-browser ...
> > generating monodoc search index...
> > grep: /etc/gre.d/*.conf: No such file or directory
> >
> > Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.
...
> > dpkg: error processing monodoc-browser (--unpack):
> > subprocess installed post-installation script returned error exit status 1
...
> It's because libgtk2.0-cil (on which monodoc-browser depends) has been
> unpacked but not configured at this point. I thought (from reading
> /usr/share/doc/dpkg-dev/triggers.txt.gz):

I think this is a bug.

> ,----
> | Packages in t-awaited and t-pending demand satisfaction of their
> | dependencies just like packages in installed.
> `----

This is true, but doesn't help you. The unpack of libgtk2.0-cil can
be started, moving it from installed to (eventually) unpacked, without
causing monodoc-browser to be deconfigured, and this is nothing to do
with triggers.

But as you point out there is an additional requirement (perhaps not
specified in the docs) that all the dependencies should be satisfied
when the postinst is run.

Would you like me to try to look into it and prepare a patch for dpkg ?
(Do you need this to be fixed in squeeze or will wheezy/sid do?)

Ian.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20412.57480.903694.845564@chiark.greenend.org.uk"> http://lists.debian.org/20412.57480.903694.845564@chiark.greenend.org.uk


All times are GMT. The time now is 04:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.