Hi David,

I've seen a setup that has an exec which fires apt-get update. This exec
has refreshonly => true. All Apt::Source resources are instantiated via a
profile class kicking off create_resources. All Apt::Source resources
notify the apt-get update exec.

I think something similar to that should give you the ability to have a
class/package require the apt-get update exec, and achieve the behavior you
desire.


On Sat, Jul 5, 2014 at 9:22 PM, David Mohl <m...@dave.cx> wrote:

> Hello,
>
> I am scratching my head on this one. For a project, I need to compile a
> package from source that depends on a apt source package. Since I am
> managing package sources with puppet, I need apt-get builddep to be
> executed *after* sources have been added.
>
> All my sources are managed inside the class 'sources' through apt::source.
> However, when I require that class for builddep, I am falling into a huge
> dependency cycle: (Anchor[apt::source::puppetlabs] =>
> Apt::Source[puppetlabs] => Class[Sources] => Apt::Builddep[something] =>
> Exec[apt-builddep-something] => Exec[apt_update] => Class[Apt::Update] =>
> Anchor[apt::source::puppetlabs])
>
> When I omit the requirement, puppet executes builddep before the sources
> have been added and the command fails.
>
> After a lot of debugging, trying and reading through the apt source, I
> came to the conclusion that this is a problem inside apt. I am out of
> ideas.
> Does anyone here have a idea for this problem or should I start patching
> apt?
>
> (Related serverfault:
> http://serverfault.com/questions/610356/puppet-class-node-dependencies)
>
>
> Cheers,
> David
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d22156cf-87e9-4ff1-951f-e6e6038aeb21%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/d22156cf-87e9-4ff1-951f-e6e6038aeb21%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC1UU3fKfmU%2Bv-KM6v9mZS5_hpaqrrBNXFYWQ1OYLOPcjdbLiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to