FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 02-14-2011, 06:27 PM
Chris Lumens
 
Default Don't fail on missing %includes during loader kickstart processing (#676940).

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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-14-2011, 06:39 PM
Martin Sivak
 
Default Don't fail on missing %includes during loader kickstart processing (#676940).

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@redhat.com
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@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

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

Thread Tools




All times are GMT. The time now is 02:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org