NetBSD Problem Report #48244

From www@NetBSD.org  Wed Sep 25 15:31:39 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0EC4F725E8
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 25 Sep 2013 15:31:39 +0000 (UTC)
Message-Id: <20130925153137.3401972658@mollari.NetBSD.org>
Date: Wed, 25 Sep 2013 15:31:37 +0000 (UTC)
From: smstone@gmail.com
Reply-To: smstone@gmail.com
To: gnats-bugs@NetBSD.org
Subject: ruby193-puppet-3.1.1 pkgin provider "versionable" not honoring ensure => version
X-Send-Pr-Version: www-1.0

>Number:         48244
>Category:       pkg
>Synopsis:       ruby193-puppet-3.1.1 pkgin provider "versionable" not honoring ensure => version
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 15:35:00 +0000 2013
>Closed-Date:    
>Last-Modified:  Wed Dec 06 01:14:31 +0000 2017
>Originator:     Steven Stone
>Release:        
>Organization:
>Environment:
SunOS smartbox1.joyent.conde.io 5.11 joyent_20130322T181205Z i86pc i386 i86pc Solaris
>Description:
The pkgin provider shipped with the ruby193-puppet-3.1.1 package has the feature "versionable", however when you instruct the provider to ensure => "<version_number>", it does not install the provided version number and will only install the lastest version available.

Although the official puppet docs say the pkgin provider does not provide "versionable", listed here: http://docs.puppetlabs.com/references/latest/type.html#package-provider-pkgin , the patch here adds versionable feature to the ruby193-puppet-3.1.1 package: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/puppet/patches/patch-ad?annotate=1.3

Thank you for your time.

>How-To-Repeat:
Set any package where multiple version numbers are available in pkgin to ensure => "<version_number>", as in this example:

package { "nodejs":
  ensure => "0.10.11",
  provider => 'pkgin',
}

Available nodejs packages on this box before running puppet:

# pkgin search nodejs
nodejs-0.8.25        V8 JavaScript for clients and servers
nodejs-0.6.21        Evented I/O for V8 javascript
nodejs-0.10.7        V8 JavaScript for clients and servers
nodejs-0.10.18       V8 JavaScript for clients and servers
nodejs-0.10.11       V8 JavaScript for clients and servers

Run puppet agent -t --debug to see the following output (if the package is not installed, it will show the following):

Debug: Executing '/opt/local/bin/pkgin list'
Debug: Executing '/opt/local/bin/pkgin search nodejs'
Debug: Executing '/opt/local/bin/pkgin -y install nodejs'
Notice: /<snip>/Package[nodejs]/ensure: created

Now, check which version of the package installed shows it installs the latest, not what was set to ensure => "<version_number>":
# node -v
v0.10.18

Run puppet agent -t --debug again:

Debug: Executing '/opt/local/bin/pkgin list'
Debug: Executing '/opt/local/bin/pkgin -y install nodejs'
Notice: /<snip>/Package[nodejs]/ensure: ensure changed 'present' to '0.10.11'

However, still at the latest package:
# node -v
v0.10.18

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tonnerre
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Thu, 03 Oct 2013 12:48:44 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "Tonnerre Lombard" <tonnerre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48244 CVS commit: pkgsrc/sysutils/puppet
Date: Thu, 2 Jan 2014 01:41:48 +0000

 Module Name:	pkgsrc
 Committed By:	tonnerre
 Date:		Thu Jan  2 01:41:48 UTC 2014

 Modified Files:
 	pkgsrc/sysutils/puppet: distinfo
 	pkgsrc/sysutils/puppet/patches: patch-ad

 Log Message:
 Remove the versionable feature of the pkgin provider for now.
 This doesn't really fix PR pkg/48244 but it's a bit more honest.
 A better fix may come in later.


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 pkgsrc/sysutils/puppet/distinfo
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/puppet/patches/patch-ad

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->suspended
State-Changed-By: tonnerre@NetBSD.org
State-Changed-When: Thu, 02 Jan 2014 01:45:56 +0000
State-Changed-Why:
I'll have to invest some Ruby time into this at some later point.


State-Changed-From-To: suspended->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 23 Jun 2016 18:43:19 +0000
State-Changed-Why:
"developer doesn't have time this year" is not a reason to suspend PRs :-/


Responsible-Changed-From-To: tonnerre->pkg-manager
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 06 Dec 2017 01:14:31 +0000
Responsible-Changed-Why:
Update responsible field for retired developer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.