Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 591669 Details for
Bug 827269
ksflatten ignoring nested includes
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
0001-Allow-include-in-pre-and-post-827269.patch (text/plain), 2.95 KB, created by
Brian Lane
on 2012-06-13 23:27:35 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Brian Lane
Created:
2012-06-13 23:27:35 UTC
Size:
2.95 KB
patch
obsolete
>From c58f8c02e2c81d34e8ce0c4ca94c8dfd17bab31a Mon Sep 17 00:00:00 2001 >From: "Brian C. Lane" <bcl@redhat.com> >Date: Wed, 13 Jun 2012 15:21:05 -0700 >Subject: [pykickstart] Allow %include in %pre and %post (#827269) > >The %pre and %post sections could contain %include. This restores that >functionality and adds a couple of tests. >--- > pykickstart/parser.py | 3 +- > tests/parser/include.py | 52 +++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 54 insertions(+), 1 deletions(-) > >diff --git a/pykickstart/parser.py b/pykickstart/parser.py >index 531e639..f59b694 100644 >--- a/pykickstart/parser.py >+++ b/pykickstart/parser.py >@@ -535,7 +535,8 @@ class KickstartParser: > # valid for that script. So, don't do the split below unless > # we're sure. > possibleSectionStart = line.split()[0] >- if not self._validState(possibleSectionStart) and possibleSectionStart != "%end": >+ if not self._validState(possibleSectionStart) \ >+ and possibleSectionStart not in ("%end", "%include"): > obj.handleLine(line) > continue > >diff --git a/tests/parser/include.py b/tests/parser/include.py >index a454b99..efc14a8 100644 >--- a/tests/parser/include.py >+++ b/tests/parser/include.py >@@ -85,5 +85,57 @@ ls /tmp > # Also verify the body, which is the most important part. > self.assertEqual(script.script.rstrip(), "ls /tmp") > >+class Include_Post_TestCase(Base_Include): >+ ks = """ >+%%post >+%%include %s >+%%end >+""" >+ >+ includeKS = """ >+ls /tmp >+""" >+ >+ def runTest(self): >+ self.parser.readKickstartFromString(self.ks % self._path) >+ self.assertEqual(len(self.handler.scripts), 1) >+ >+ # Verify the script defaults. >+ script = self.handler.scripts[0] >+ self.assertEqual(script.interp, "/bin/sh") >+ self.assertTrue(script.inChroot) >+ self.assertEqual(script.lineno, 2) >+ self.assertFalse(script.errorOnFail) >+ self.assertEqual(script.type, constants.KS_SCRIPT_POST) >+ >+ # Also verify the body, which is the most important part. >+ self.assertEqual(script.script.rstrip(), "ls /tmp") >+ >+class Include_Pre_TestCase(Base_Include): >+ ks = """ >+%%pre >+%%include %s >+%%end >+""" >+ >+ includeKS = """ >+ls /tmp >+""" >+ >+ def runTest(self): >+ self.parser.readKickstartFromString(self.ks % self._path) >+ self.assertEqual(len(self.handler.scripts), 1) >+ >+ # Verify the script defaults. >+ script = self.handler.scripts[0] >+ self.assertEqual(script.interp, "/bin/sh") >+ self.assertFalse(script.inChroot) >+ self.assertEqual(script.lineno, 2) >+ self.assertFalse(script.errorOnFail) >+ self.assertEqual(script.type, constants.KS_SCRIPT_PRE) >+ >+ # Also verify the body, which is the most important part. >+ self.assertEqual(script.script.rstrip(), "ls /tmp") >+ > if __name__ == "__main__": > unittest.main() >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 827269
:
588226
|
588227
| 591669