Russell Jackson
2007-Oct-01 00:27 UTC
freebsd ports provider patch to use ports tree directly
The included patch is what I''ve been able to throw together in a few hours after studying the pkgtools code. All I''m using the library for at the moment is to resolve the proper base location of the ports tree, but at least by invoking make directly instead of through portupgrade it works *a lot* better. Is there a proper way to include/require a third party ruby library? The way it is now, if ports.rb was invoked, puppetd will blow up. Is there some check somewhere to determine if portupgrade is installed? -- Russell A. Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield Revolution, n: A form of government abroad.
Russell Jackson
2007-Oct-01 00:29 UTC
Re: freebsd ports provider patch to use ports tree directly
Russell Jackson wrote:> The included patch is what I''ve been able to throw together in a few > hours after studying the pkgtools code. All I''m using the library for at > the moment is to resolve the proper base location of the ports tree, but > at least by invoking make directly instead of through portupgrade it > works *a lot* better. > > Is there a proper way to include/require a third party ruby library? The > way it is now, if ports.rb was invoked, puppetd will blow up. Is there > some check somewhere to determine if portupgrade is installed? >It''d help if I attached it. -- Russell A. Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield Revolution, n: A form of government abroad. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Russell Jackson
2007-Oct-01 06:09 UTC
Re: freebsd ports provider patch to use ports tree directly
Russell Jackson wrote:> The included patch is what I''ve been able to throw together in a few > hours after studying the pkgtools code. All I''m using the library for at > the moment is to resolve the proper base location of the ports tree, but > at least by invoking make directly instead of through portupgrade it > works *a lot* better. > > Is there a proper way to include/require a third party ruby library? The > way it is now, if ports.rb was invoked, puppetd will blow up. Is there > some check somewhere to determine if portupgrade is installed? >I meant to say that it would blow up if both portupgrade wasn''t installed and ports.rb was invoked. -- Russell A. Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield Revolution, n: A form of government abroad.
Luke Kanies
2007-Oct-01 14:35 UTC
Re: freebsd ports provider patch to use ports tree directly
On Sep 30, 2007, at 7:27 PM, Russell Jackson wrote:> Is there a proper way to include/require a third party ruby > library? The > way it is now, if ports.rb was invoked, puppetd will blow up. Is there > some check somewhere to determine if portupgrade is installed?Yeah -- define a feature in lib/puppet/features/, and then do: confine :true => Puppet.features.port_libs? Is this really what you want, though, to make this provider only work if the library is available? Shouldn''t you instead use that ability if it''s available, otherwise use the old stuff? Also, can you attach your code to a ticket, rather than an email? -- To have a right to do a thing is not at all the same as to be right in doing it. -- G. K. Chesterton --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Russell Jackson
2007-Oct-01 18:35 UTC
Re: freebsd ports provider patch to use ports tree directly
Luke Kanies wrote:> On Sep 30, 2007, at 7:27 PM, Russell Jackson wrote: > >> Is there a proper way to include/require a third party ruby >> library? The >> way it is now, if ports.rb was invoked, puppetd will blow up. Is there >> some check somewhere to determine if portupgrade is installed? > > Yeah -- define a feature in lib/puppet/features/, and then do: > > confine :true => Puppet.features.port_libs? > > Is this really what you want, though, to make this provider only work > if the library is available? > > Shouldn''t you instead use that ability if it''s available, otherwise > use the old stuff?The way things are now, puppet won''t use the ports provider unless portupgrade is installed. It probably would be better to degrade in functionality rather than not work at all. In that case, would I check for the library in the provider or would I still use lib/puppet/features?> > Also, can you attach your code to a ticket, rather than an email? >I was just kinda letting everyone know I was working on the problem. I don''t think the current patch is worthy of being considered for anything yet. -- Russell A. Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield Life is an exciting business, and most exciting when it is lived for others. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Luke Kanies
2007-Oct-02 18:09 UTC
Re: freebsd ports provider patch to use ports tree directly
On Oct 1, 2007, at 1:35 PM, Russell Jackson wrote:> The way things are now, puppet won''t use the ports provider unless > portupgrade is > installed. It probably would be better to degrade in functionality > rather than not work at > all. In that case, would I check for the library in the provider or > would I still use > lib/puppet/features?You''d do both -- define the feature in lib/puppet/features, but check for it in the provider. Your provider would be something like: provide(:ports) do confine :true => Puppet.features.ports? ... end> I was just kinda letting everyone know I was working on the > problem. I don''t think the > current patch is worthy of being considered for anything yet.Ah, ok. Thanks. -- If all the world''s a stage, I want to operate the trap door. -- Paul Beatty --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com