Re: [PATCH] Don't fail on missing %includes during loader kickstart processing (#676940).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If this really affects the loader parsing only, then Ack and couple of bonus points too for the design that allowed such nice and simple patch.

--
Martin SivÃk
msivak@xxxxxxxxxx
Red Hat Czech
Anaconda team / Brno, CZ

----- Original Message -----
> Lots of people rely on the fact that a %pre script can generate a file
> that will
> later be %included. Proper kickstart processing involves first making
> a pass over
> the file looking for any %pre scripts, ignoring all %include lines.
> Then another
> pass is made that handles all the %includes, which will pick up and
> that were
> generated.
> 
> With the pykickstart integration, I made it so reboot and other
> loader-handled
> kickstart commands can be in a %include file. However, this also made
> a missing
> %include a fatal error, which breaks the %pre-generated include trick.
> 
> This fix makes it so any %includes that do exist will be processed in
> loader, but
> missing ones will not be a fatal error. It will only be much later
> during
> anaconda proper that a missing include will cause an error.
> ---
> loader/kickstart.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/loader/kickstart.c b/loader/kickstart.c
> index 298b3bb..69bb8f1 100644
> --- a/loader/kickstart.c
> +++ b/loader/kickstart.c
> @@ -153,8 +153,8 @@ static PyObject *makeParser(PyObject *parserClass,
> PyObject *handler) {
> PyDict_SetItemString(kwargs, "followIncludes", Py_True);
> Py_INCREF(Py_True);
> PyDict_SetItemString(kwargs, "errorsAreFatal", Py_True);
> - Py_INCREF(Py_True);
> - PyDict_SetItemString(kwargs, "missingIncludeIsFatal", Py_True);
> + Py_INCREF(Py_False);
> + PyDict_SetItemString(kwargs, "missingIncludeIsFatal", Py_False);
> 
> parser = PyObject_Call(parserClass, args, kwargs);
> 
> --
> 1.7.1.1
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux