NetBSD Problem Report #46687

From Wolfgang.Stukenbrock@nagler-company.com Wed Jul 11 11:16:59 2012
Return-Path: <Wolfgang.Stukenbrock@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id A01CF63B85F
for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Jul 2012 11:16:59 +0000 (UTC)
Message-Id: <20120711111651.6210A1E80A9@test-s0.nagler-company.com>
Date: Wed, 11 Jul 2012 13:16:51 +0200 (CEST)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: www/ruby-erubis failed to install into multiple ruby-version
X-Send-Pr-Version: 3.95
>Number: 46687
>Category: pkg
>Synopsis: www/ruby-erubis failed to install into multiple ruby-version
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 11 11:20:00 +0000 2012
>Last-Modified: Wed Jul 11 15:00:04 +0000 2012
>Originator: Wolfgang Stukenbrock
>Release: NetBSD 5.1.2
>Organization:
Dr. Nagler & Company GmbH
>Environment:
System: NetBSD test-s0 4.0 NetBSD 4.0 (NSW-WS) #0: Tue Aug 17 17:28:09 CEST 2010 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
>Description:
Due to a back compartility check, the www/ruby-erubis package
cannot be installed into multiple ruby-version.
It is also affected by the problem reported in PR 46685 affecting
the bin/erubis in the PLIST.
>How-To-Repeat:
Try to install it into multiple versions
>Fix:
The following patch will solve the incorrect conflict check.
Remark: the problem with the duplicate binary is not fixed with
this patch here - see PR 46685
--- Makefile.orig 2012-07-11 12:56:14.000000000 +0200
+++ Makefile 2012-07-11 12:56:29.000000000 +0200
@@ -11,7 +11,7 @@
DEPENDS+= ${RUBY_PKGPREFIX}-abstract>=1.0.0:../../devel/ruby-abstract
-CONFLICTS+= ruby[1-9][0-9]-erubis-[0-9]* erubis-[0-9]*
+CONFLICTS+= ${RUBY_PKGPREFIX}-erubis-[0-9]* erubis-[0-9]*
.include "../../lang/ruby/gem.mk"
.include "../../mk/bsd.pkg.mk"
>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/46687: www/ruby-erubis failed to install into multiple
ruby-version
Date: Wed, 11 Jul 2012 20:27:15 +0900
On Wed, 11 Jul 2012 20:20:01 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
> -CONFLICTS+= ruby[1-9][0-9]-erubis-[0-9]* erubis-[0-9]*
> +CONFLICTS+= ${RUBY_PKGPREFIX}-erubis-[0-9]* erubis-[0-9]*
It's wrong, just marked as CONFLISTS to itself.
Now, Ruby-1.9.3 is using ruby193 for ${RUBY_PKGPREFIX}, so it will not
matched ruby[1-9][0-9], it's a problem.
--
OBATA Akio / obache@NetBSD.org
From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/46687: www/ruby-erubis failed to install into multiple ruby-version
Date: Wed, 11 Jul 2012 14:14:37 +0200
Hi,
sorry but I don't understand your point.
Nearly everything from the gem-packages is installed into subdirctories
that have the ruby version (1.g. 1.8 or 1.9.3) as name.
So there may be never a conflict with the gems-files in different
ruby-versions.
Therefore the check with the ruby-version just building is correct and
already done by lot of other ruby packages.
A conflict only arises with different erubis version installed for the
same ruby version.
There are only problems with installed scripts in /usr/pkg/bin, because
there arises a conflict with duplicate files to be installed.
There is one in this packge to, but this problems hits some more
packages too and is currently reported in pkg/46685 - see there.
Best reguards
W. Stukenbrock
OBATA Akio wrote:
> The following reply was made to PR pkg/46687; it has been noted by GNATS.
>
> From: "OBATA Akio" <obache@netbsd.org>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/46687: www/ruby-erubis failed to install into multiple
> ruby-version
> Date: Wed, 11 Jul 2012 20:27:15 +0900
>
> On Wed, 11 Jul 2012 20:20:01 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
>
> > -CONFLICTS+= ruby[1-9][0-9]-erubis-[0-9]* erubis-[0-9]*
> > +CONFLICTS+= ${RUBY_PKGPREFIX}-erubis-[0-9]* erubis-[0-9]*
>
> It's wrong, just marked as CONFLISTS to itself.
>
> Now, Ruby-1.9.3 is using ruby193 for ${RUBY_PKGPREFIX}, so it will not
> matched ruby[1-9][0-9], it's a problem.
>
> --
> OBATA Akio / obache@NetBSD.org
>
>
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/46687: www/ruby-erubis failed to install into multiple
ruby-version
Date: Wed, 11 Jul 2012 21:55:23 +0900
On Wed, 11 Jul 2012 21:15:07 +0900, Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com> wrote:
> sorry but I don't understand your point.
With your patch, installed ruby193-erubis-2.7.0 will be marked as CONFLICTS
with just ruby193-erubis-[0-9]*, ruby19-erubis-2.7.0 with ruby19-erubis-[0-9]*,
and ruby18-erubis-2.7.0 with ruby18-erubis-[0-9]*.
ruby193-erubis-2.7.0 will not be marked as CONFLISTS neither ruby19-erubis-2.7.0
nor ruby18-erubis-2.7.0.
It should not match the situation you expected.
--
OBATA Akio / obache@NetBSD.org
From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/46687: www/ruby-erubis failed to install into multiple ruby-version
Date: Wed, 11 Jul 2012 16:56:44 +0200
Hi,
yes - that is what this patch should do.
Due to the fact that the gems of ruby193 are installted in different
directories as for ruby19 and/or ruby18 this is the correct behaviour as
far as I see.
Or is there something that I've overlooked?
There still is the problem with the "binaries" installed in /usr/pkg/bin
without a version indication.
This is inconsistent to the way ruby itself is installed.
If there will be lots of binaries for the different version, we should
think about subdirectories for the binaries without version extension.
This may eliminate lots of problems and allos application to access all
binaries of a specific version without specifying a version number in
the binary name. The version can be selected by setting up the PATH
environment variable.
If such directories are introduced, it will be some kind of religion if
the main binary is installed in /usr/pkg/bin with a version number and
the version-less reference will be a symlink, or if hard-links should be
used.
Example:
currently ruby is installed the following way:
/usr/pkg/bin/ruby18 - binary of ruby-1.8.7 from lang/ruby18-base
/usr/pkg/bin/ruby193 - binary of ruby-1.9.3 from lang/ruby193-base
/usr/pkg/bin/ruby - symlink to the default version from lant/ruby
(ruby193 in 2012Q1 as long as RUBY_VERSION_DEFAULT is not set ...)
Gems are currently installed like this: (here is a conflict !!!)
/usr/pkg/bin/tt - script for ruby-treetop
It woud be better to do it the following way - my oppinion:
/usr/pkg/bin/tt18 - script fro ruby-treetop based on ruby-1.8.7
/usr/pkg/bin/tt193 - script fro ruby-treetop based on ruby-1.9.3
And in the "new" directory
/usr/pkg/ruby18/bin/tt - link (hard or soft) to /usr/pkg/bin/tt18
...
The path for this directory is just a suggestion - there may be better
choises ... (should be discussed with the people processing PR 46685)
best regards
W. Stukenbrock
OBATA Akio wrote:
> The following reply was made to PR pkg/46687; it has been noted by GNATS.
>
> From: "OBATA Akio" <obache@netbsd.org>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/46687: www/ruby-erubis failed to install into multiple
> ruby-version
> Date: Wed, 11 Jul 2012 21:55:23 +0900
>
> On Wed, 11 Jul 2012 21:15:07 +0900, Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com> wrote:
>
> > sorry but I don't understand your point.
>
> With your patch, installed ruby193-erubis-2.7.0 will be marked as CONFLICTS
> with just ruby193-erubis-[0-9]*, ruby19-erubis-2.7.0 with ruby19-erubis-[0-9]*,
> and ruby18-erubis-2.7.0 with ruby18-erubis-[0-9]*.
> ruby193-erubis-2.7.0 will not be marked as CONFLISTS neither ruby19-erubis-2.7.0
> nor ruby18-erubis-2.7.0.
> It should not match the situation you expected.
>
> --
> OBATA Akio / obache@NetBSD.org
>
>Unformatted: