dpkg provider and holding packages.

8 views
Skip to first unread message

Nigel Kersten

unread,
Nov 18, 2009, 7:07:34 PM11/18/09
to puppe...@googlegroups.com
We have a need for this feature:
http://projects.reductivelabs.com/issues/2836
namely to be able to hold dpkg packages in puppet manifests without
resorting to execs.


It's not entirely clear how we should best map the dpkg package model
into the puppet model, so I've sent this out to encourage
Debian/Ubuntu Puppet users to give their input.


I suggest commenting in this email thread is most useful, and I'll
collate it for the bug report, so here's my conversation with myself
in the bug report.



Description

I wasn't initially in favour of adding this to be yet another mode for
'ensure', but it does make sense as we already have installed, absent,
purged as ensure modes.

package { "bash": ensure => held }

To be consistent with the tense of "installed' and "purged" this will
be "held" rather than "hold.

Actually, this brings up an issue with how do you "unhold" a package?

Do you unhold anything that is specified to be installed ?

Do we switch to having a "hold => true/false" parameter instead?

The sane thing to do seems to be to treat "held" as a superset of
"installed", so it basically means "install and hold this package"

Given that, specifying "installed" for a package should remove any
holds in place. Does that seem reasonable? (I'll post this to the -dev
list for more comments)


--
nigel

Luke Kanies

unread,
Nov 18, 2009, 7:09:54 PM11/18/09
to puppe...@googlegroups.com
This is pretty much the model I was envisioning.


--
At my lemonade stand I used to give the first glass away free and charge
five dollars for the second glass. The refill contained the antidote.
-- Emo Phillips
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Christian Hofstaedtler

unread,
Nov 19, 2009, 2:39:40 AM11/19/09
to puppe...@googlegroups.com
* Nigel Kersten <nig...@google.com> [091119 01:08]:
> We have a need for this feature:
> http://projects.reductivelabs.com/issues/2836
[...]
> The sane thing to do seems to be to treat "held" as a superset of
> "installed", so it basically means "install and hold this package"
>
> Given that, specifying "installed" for a package should remove any
> holds in place. Does that seem reasonable? (I'll post this to the -dev
> list for more comments)

This sounds like a good way to map the states. dpkg itself has these
"desired" states:
Desired=Unknown/Install/Remove/Purge/Hold

I /guess/ you could hold an uninstalled package, but I'm not sure if
this is even a valid use case for "hold".


Christian

--
christian hofstaedtler

Nigel Kersten

unread,
Nov 19, 2009, 12:20:55 PM11/19/09
to puppe...@googlegroups.com
Excellent. Given how aptitude appears to be completely batshit insane
and not respect dpkg holds correctly for dist-upgrades... I have
little inclination to implement this for aptitude....

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=146207

We stopped using the aptitude provider due to these sort of
inconsistencies, but I have no sense whatsoever of how popular this
provider is for Puppet/Debian folks...




>
>
>  Christian
>
> --
> christian hofstaedtler
>
> --
>
> You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
> To post to this group, send email to puppe...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=.
>
>
>



--
nigel

Christian Hofstaedtler

unread,
Nov 19, 2009, 12:36:32 PM11/19/09
to puppe...@googlegroups.com
* Nigel Kersten <nig...@google.com> [091119 18:21]:
> On Thu, Nov 19, 2009 at 1:39 AM, Christian Hofstaedtler <c...@zeha.at> wrote:
> > * Nigel Kersten <nig...@google.com> [091119 01:08]:
> >> We have a need for this feature:
> >> http://projects.reductivelabs.com/issues/2836
> > [...]
> >> The sane thing to do seems to be to treat "held" as a superset of
> >> "installed", so it basically means "install and hold this package"
> >>
> >> Given that, specifying "installed" for a package should remove any
> >> holds in place. Does that seem reasonable? (I'll post this to the -dev
> >> list for more comments)
> >
> > This sounds like a good way to map the states. dpkg itself has these
> > "desired" states:
> > Desired=Unknown/Install/Remove/Purge/Hold
> >
> > I /guess/ you could hold an uninstalled package, but I'm not sure if
> > this is even a valid use case for "hold".
>
> Excellent. Given how aptitude appears to be completely batshit insane
> and not respect dpkg holds correctly for dist-upgrades... I have
> little inclination to implement this for aptitude....
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=146207
>
> We stopped using the aptitude provider due to these sort of
> inconsistencies, but I have no sense whatsoever of how popular this
> provider is for Puppet/Debian folks...

We were never using it on Debian, and on the first Ubuntu box I had
to disable it early.

OTOH, ignoring it for *dist*-upgrades is probably less batshit than
ignoring it for upgrades. If you have to dist-upgrade during normal
operation there is something wrong anyway. (But then I didn't look
at the aptitude provider, maybe it needs to do just that.)


Christian

--
christian hofstaedtler
Reply all
Reply to author
Forward
0 new messages