Which class gets applied first?
Ryan Steele
ryans at aweber.com
Wed Nov 26 15:56:56 CET 2008
Thomas Lange wrote:
>>>>>> On Tue, 25 Nov 2008 11:56:03 -0500, Ryan Steele <ryans at aweber.com> said:
>>>>>>
>
> > at the package level. E.g., I could have an option to specify a list of
> > packages that should be installed before the rest and in the order that
> > they are specified, but don't necessarily (or logically) belong in a
> > class all their own. Currently, our only recourse for doing so is a
> > hook to task_instsoft, which doesn't strike me as being a particularly
> A hook is a good solution for this. :-)
>
I guess it works, but it still seems like an afterthought. Although, I
would definitely like more flexibility than DEFAULT, $HOSTNAME, and
LAST. I think any class that is assigned to a host should be able to
have a hook, otherwise, I have no way specify which hooks get run at
which time. For example, if my host gets assigned to the following classes:
DEFAULT, CLASS1, CLASS2, CLASS3, hostname, LAST
...and I need to ensure that a hook for CLASS2 gets run before CLASS1,
but after CLASS3? And to that end, what if I need multiple hooks for
$HOSTNAME? Do I have any way to ensure that one gets run before the
other? Or is my only recourse to mash every task in to one hook? Maybe
it'd be nice to have the same scheme we use for scripts, e.g.
10-hookprefix.classname.
Unless I'm reading section 7.11 wrong, I don't see much flexibility with
the current hook implementation.
> I will not add an additional option to install_packages if
> there's no real need for this. IMO it seems that currently we do not
> need this, and the package tools should handle the order.
>
Well, the packages might not always handle the order. Using the locale
example again, a package might not 'require' locales to be configured,
if it can use 'POSIX' or 'C' - how is the package to know that you don't
want those? It can't read your mind - it's going to use whatever is
there. This is just one case where the package cannot predict
everything the user might want.
> > expect things to work, since apt/aptitude should be smart enough to
> > figure out which packages need to get installed before others (assuming
> > the package maintainers have done their job in specifying the Depends,
> > which as mentioned above, doesn't always happen ^_^).
> Yes, the package tools should know in which order to install the
> packages.
>
Well, as I mentioned, we do have some workarounds, like using hooks or
installing packages via custom scripts, so it's not like this feature
request was a deal-breaker. It was just a suggestion for a way to add
some flexibility, nothing more, nothing less :)
>
> P.S: additional hint. The variable MAXPACKAGES determines how many
> packages gets installed in one run. Means how many packages are
> appended to the aptitude or apt-get call. This may add additional
> packages because of dependencies. Setting MAXAPCKAGES=1 would install
> one package with one apt-get/aptitude call. But this slooooows down
> the installation.
>
Half the fun of performing FAI installations is the speed. If I set
MAXPACKAGES, I wouldn't be able to put racing stripes on my FAI server. ;)
--
Ryan Steele ryans at aweber.com
Systems Administrator +1 215-825-2196 x758
AWeber Communications http://www.aweber.com
More information about the linux-fai
mailing list