Bug#279232: What about perl-bug #279232?

2005-05-07 Thread Colin Watson
# let's have this on both
reassign 279232 perl,doc-base
thanks

On Wed, May 04, 2005 at 09:25:06PM +1000, Brendan O'Dea wrote:
 On Fri, Apr 08, 2005 at 08:36:05AM +0200, Henning Glawe wrote:
 it could be fixed by introducing a versioned pre-dependency of 
 perl-modules on perl-base while letting perl-base conflict with too old
 perl-modules, which forces apt to update both packages together; this
 combination may be highly unstable (conflicts+pre-depends is a loop-like
 construct), but results in the right behaviour.
 
 Given an alternate option I'd really rather not do this.  It seems
 fragile at best, disasterous at worst.

I would be terrified of accepting a change like this into sarge. It
seems to me that it would have very complex and probably undesirable
effects on upgrades, causing large swathes of packages to be
deconfigured.

 Given the recent freeze announcement, I'd suggest that regardless of
 what other fixes are made, a good first step would be to get a fixed
 doc-base (i.e. one that works with the current stable perl-base only)
 package into stable-proposed-updates *now*.
 
 If nothing else, this reduces the size of the problem if there's a point
 release prior to sarge.

I agree. Also, having a doc-base in sarge that's fixed in the way you
describe means that we shouldn't have this particular incarnation of the
problem again, and it would mean that at least we could tell people in
the release notes to upgrade doc-base first. I think that would be
acceptable as far as sarge is concerned.

On Fri, 29 Apr 2005 at 11:11:38PM +0200, Frank Lichtenheld wrote:
 On Fri, Apr 29, 2005 at 02:03:23PM -0500, Bill Allombert wrote:
  install-docs should be shipped not executable in  doc-base .deb and
  doc-base postinst should a+x it. (and prerm should a-x it).
 
 This wouldn't help. doc-base doesn't need to be touched at all for the
 bug to appear. Perl gets itself in a non-working state...

You've said this a couple of times, but I don't think that's true at
all. Everything here seems to be working exactly the way it's been told
to work, and certainly perl appears to be doing nothing wrong.

/usr/bin/perl is working just fine (it's essential, and works even when
unconfigured the way it's supposed to). All modules in perl-base work
fine too. However, File::Basename is in perl-modules, which is not
essential, and therefore in order to ensure that it is usable you *must*
declare a dependency on it (or just on perl, as would be more usual).
This is all perfectly normal and in accordance with policy.

The problem is that the packages that call install-docs do so
opportunistically (only if it's available), and so they do not declare a
dependency on perl or doc-base. Thus, there is *no way* for them to make
sure that install-docs is actually usable; it may be unpacked but not
configured. Once the doc-base package enters the configured state, dpkg
will have made sure that perl is configured too (as per the definition
of Depends) and so install-docs will work fine. Bill's suggestion would
therefore fix this bug, although I haven't quite decided whether it's
more complicated than just making doc-base work with only essential
packages. I could go either way.

The following patch to doc-base avoids the use of File::Basename, so it
should work with only perl-base. I've tested the substituted functions
independently, but I have not yet tested the resulting package. Caveat
emptor. Bill's suggestion should definitely be tried out too, since it
would probably involve less code.

diff -Nru /tmp/At5JVh70EG/doc-base-0.7.18/debian/changelog 
/tmp/KqzthCt2IB/doc-base-0.7.18.1/debian/changelog
--- /tmp/At5JVh70EG/doc-base-0.7.18/debian/changelog2003-03-30 
18:14:12.0 +0100
+++ /tmp/KqzthCt2IB/doc-base-0.7.18.1/debian/changelog  2005-05-07 
14:49:49.0 +0100
@@ -1,3 +1,11 @@
+doc-base (0.7.18.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Avoid File::Basename, in order to work even when perl is unconfigured
+(closes: #278495).
+
+ -- Colin Watson [EMAIL PROTECTED]  Sat,  7 May 2005 14:49:47 +0100
+
 doc-base (0.7.18) unstable; urgency=low
 
   * postinst: don't die if /usr/lib/menu doesn't exist; closes: #186707
diff -Nru /tmp/At5JVh70EG/doc-base-0.7.18/install-docs 
/tmp/KqzthCt2IB/doc-base-0.7.18.1/install-docs
--- /tmp/At5JVh70EG/doc-base-0.7.18/install-docs2003-03-15 
22:08:38.0 +
+++ /tmp/KqzthCt2IB/doc-base-0.7.18.1/install-docs  2005-05-07 
14:49:45.0 +0100
@@ -16,7 +16,28 @@
 
 # ---end-of-configuration-part---
 
-use File::Basename;
+# This would normally be just 'use File::Basename;'. However, install-docs
+# often gets called opportunistically by packages if it's present, and
+# there's no way for those packages to make sure that perl is configured
+# when doing so, so it's possible that standard modules will not be usable.
+
+sub basename {
+  (my $basename = $_[0]) =~ s#.*/##s;
+  return $basename;
+}
+
+sub dirname {
+  my ($dirname, $basename) 

Bug#278495: Bug#279232: What about perl-bug #279232?

2005-05-07 Thread Steve Langasek
On Sat, May 07, 2005 at 03:12:54PM +0100, Colin Watson wrote:

  Given the recent freeze announcement, I'd suggest that regardless of
  what other fixes are made, a good first step would be to get a fixed
  doc-base (i.e. one that works with the current stable perl-base only)
  package into stable-proposed-updates *now*.

  If nothing else, this reduces the size of the problem if there's a point
  release prior to sarge.

 I agree. Also, having a doc-base in sarge that's fixed in the way you
 describe means that we shouldn't have this particular incarnation of the
 problem again, and it would mean that at least we could tell people in
 the release notes to upgrade doc-base first. I think that would be
 acceptable as far as sarge is concerned.

I agree that requiring upgrade of doc-base first (along with the handful of
other packages we currently recommend upgrading first) is acceptable.

  This wouldn't help. doc-base doesn't need to be touched at all for the
  bug to appear. Perl gets itself in a non-working state...

 You've said this a couple of times, but I don't think that's true at
 all. Everything here seems to be working exactly the way it's been told
 to work, and certainly perl appears to be doing nothing wrong.

Well, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279232msg=44
provided a pointer back to Bill's upgrade test at
http://lists.debian.org/debian-devel/2005/04/msg01110.html, suggesting
that this problem also hits defoma.

FWIW, gs-common in both sarge and woody depends on defoma, and defoma
depends on perl; and the problematic call to defoma-app happens in the prerm
script, which means that perl *should* still be in a configured state at
this point.

For gsfonts, the failure happens in the postrm script of the woody package.
In the sarge version, the font unregistering is (correctly) done in the
prerm, so this should not be an issue -- if we can figure out why File::Copy
isn't being found in the prerm.

 The problem is that the packages that call install-docs do so
 opportunistically (only if it's available), and so they do not declare a
 dependency on perl or doc-base. Thus, there is *no way* for them to make
 sure that install-docs is actually usable; it may be unpacked but not
 configured. Once the doc-base package enters the configured state, dpkg
 will have made sure that perl is configured too (as per the definition
 of Depends) and so install-docs will work fine. Bill's suggestion would
 therefore fix this bug, although I haven't quite decided whether it's
 more complicated than just making doc-base work with only essential
 packages. I could go either way.

IMHO, Bill's fix is more complicated.  Most packages (i.e., those using
debhelper) do check for executability of install-docs via which, but at
least some of them use command -v, which means either finding and fixing
those packages or creating a wrapper script; and using such a wrapper script
would then make it impossible for packages or other scripts to directly
handle errors from install-docs if this was their intent.

Since either fix would require woody users to upgrade doc-base before
dist-upgrading to sarge, I would prefer the more robust solution of making
install-docs work with only essential packages installed.

 The following patch to doc-base avoids the use of File::Basename, so it
 should work with only perl-base. I've tested the substituted functions
 independently, but I have not yet tested the resulting package. Caveat
 emptor. Bill's suggestion should definitely be tried out too, since it
 would probably involve less code.

All things considered, I think the amount of code involved is about the
same. :)

 Long-term, it would be nice if there were a way for a package to have a
 simple way to test whether another package is configured, to supersede
 all these 'test -x' calls; perhaps a trivial wrapper around dpkg-query
 provided by dpkg in order that everyone does it the same way.

Hmm, yes, agreed...

-- 
Steve Langasek
postmodern programmer


signature.asc
Description: Digital signature


Bug#279232: What about perl-bug #279232?

2005-05-04 Thread Brendan O'Dea
On Fri, Apr 08, 2005 at 08:36:05AM +0200, Henning Glawe wrote:
it could be fixed by introducing a versioned pre-dependency of 
perl-modules on perl-base while letting perl-base conflict with too old
perl-modules, which forces apt to update both packages together; this
combination may be highly unstable (conflicts+pre-depends is a loop-like
construct), but results in the right behaviour.

Given an alternate option I'd really rather not do this.  It seems
fragile at best, disasterous at worst.

Given the recent freeze announcement, I'd suggest that regardless of
what other fixes are made, a good first step would be to get a fixed
doc-base (i.e. one that works with the current stable perl-base only)
package into stable-proposed-updates *now*.

If nothing else, this reduces the size of the problem if there's a point
release prior to sarge.

--bod


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#279232: What about perl-bug #279232?

2005-05-04 Thread Henning Glawe
On Wed, May 04, 2005 at 09:25:06PM +1000, Brendan O'Dea wrote:
 it could be fixed by introducing a versioned pre-dependency of 
 perl-modules on perl-base while letting perl-base conflict with too old
 perl-modules, which forces apt to update both packages together; this
 combination may be highly unstable (conflicts+pre-depends is a loop-like
 construct), but results in the right behaviour.
 
 Given an alternate option I'd really rather not do this.  It seems
 fragile at best, disasterous at worst.

thats what I also said in the comments...

 Given the recent freeze announcement, I'd suggest that regardless of
 what other fixes are made, a good first step would be to get a fixed
 doc-base (i.e. one that works with the current stable perl-base only)
 package into stable-proposed-updates *now*.

won't help:
Message-ID: [EMAIL PROTECTED]
Date: Fri, 29 Apr 2005 19:48:00 +0200
To: debian-devel@lists.debian.org
Subject: woody-to-sarge test upgrade
From: Bill Allombert [EMAIL PROTECTED]

seems like he's been bitten by this bug in connection with defoma

 If nothing else, this reduces the size of the problem if there's a point
 release prior to sarge.

maybe, maybe not: perl itself is in an unusable state during the update...

-- 
c u
henning


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#279232: What about perl-bug #279232

2005-04-29 Thread Bill Allombert
On Fri, Apr 29, 2005 at 08:09:31PM +0200, Henning Glawe wrote:
 Moin,
 bug #279232 is assigned to doc-base, though it is (as to my analysis) a perl
 problem (see the thread in the BTS). This prevents clean dist-upgrades from
 woody to sarge.
 what do you think about the solution (using pre-depends and conflicts)?

install-docs should be shipped not executable in  doc-base .deb and
doc-base postinst should a+x it. (and prerm should a-x it).

This way packages will not be able to use it before it is configured 
properly.

If some package do not check if install-docs is executable before calling it
we will need to divert it to install-docs.real and add a script
/usr/sbin/install-docs like:

#! /bin/sh

if test -x /usr/sbin/install-docs.real; then
  exec /usr/sbin/install-docs $@
fi

Cheers
-- 
Bill. [EMAIL PROTECTED]

Imagine a large red swirl here.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#279232: What about perl-bug #279232

2005-04-29 Thread Frank Lichtenheld
On Fri, Apr 29, 2005 at 02:03:23PM -0500, Bill Allombert wrote:
 On Fri, Apr 29, 2005 at 08:09:31PM +0200, Henning Glawe wrote:
  Moin,
  bug #279232 is assigned to doc-base, though it is (as to my analysis) a perl
  problem (see the thread in the BTS). This prevents clean dist-upgrades from
  woody to sarge.
  what do you think about the solution (using pre-depends and conflicts)?
 
 install-docs should be shipped not executable in  doc-base .deb and
 doc-base postinst should a+x it. (and prerm should a-x it).

This wouldn't help. doc-base doesn't need to be touched at all for the
bug to appear. Perl gets itself in a non-working state...

/me will now finally reassign the bug to prevent more confusion

Gruesse,
-- 
Frank Lichtenheld [EMAIL PROTECTED]
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]