[PATCH 1/2] getcode -> status_code in a live payload error message.
by Chris Lumens
---
pyanaconda/packaging/livepayload.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index 5056fed..4864e19 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -287,7 +287,7 @@ class LiveImageKSPayload(LiveImagePayload):
# If it is a http request we need to check the code
method = self.data.method.url.split(":", 1)[0]
if method.startswith("http") and response.status_code != 200:
- error = "http request returned %s" % response.getcode()
+ error = "http request returned %s" % response.status_code
return error
--
2.4.3
8 years, 8 months
[PATCH 1/3] Add the ability to mark kickstart tests with a type.
by Chris Lumens
You add TESTTYPE="..." to your .sh file. This can include just one word
or it can include multiple words if your test falls into multiple
categories. Then just pass -t <type>. If no tests exist with that
type, run_kickstart_test.sh will fail.
---
tests/kickstart_tests/run_kickstart_tests.sh | 29 ++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/tests/kickstart_tests/run_kickstart_tests.sh b/tests/kickstart_tests/run_kickstart_tests.sh
index 630813c..0b03a2f 100755
--- a/tests/kickstart_tests/run_kickstart_tests.sh
+++ b/tests/kickstart_tests/run_kickstart_tests.sh
@@ -57,7 +57,9 @@ IMAGE="${TEST_BOOT_ISO}"
# 2 - Keep log files and disk images (will take up a lot of space)
KEEPIT=${KEEPIT:-0}
-while getopts ":i:k:" opt; do
+TESTTYPE=""
+
+while getopts ":i:k:t:" opt; do
case $opt in
i)
# If this wasn't set from the environment, set it from the command line
@@ -71,6 +73,12 @@ while getopts ":i:k:" opt; do
KEEPIT=$OPTARG
;;
+ t)
+ # Only run tests that have TESTTYPE=<this value> in them. Tests can have
+ # more than one type. We'll do a pretty stupid test for it.
+ TESTTYPE=$OPTARG
+ ;;
+
*)
echo "Usage: run_kickstart_tests.sh [-i boot.iso] [-k 0|1|2] [tests]"
exit 1
@@ -98,12 +106,29 @@ env_args=$(printenv | while read line; do
# We get the list of tests from one of two places:
# (1) From the command line, all the other arguments.
-# (2) From finding all scripts in kickstart_tests/ that are executable and are
+# (2) By applying any TESTTYPE given on the command line.
+# (3) From finding all scripts in kickstart_tests/ that are executable and are
# not support files.
if [[ $# != 0 ]]; then
tests="$*"
else
tests=$(find kickstart_tests -name '*sh' -a -perm -o+x -a \! -wholename 'kickstart_tests/run_*.sh')
+
+ newtests=""
+ if [[ "$TESTTYPE" != "" ]]; then
+ for f in ${tests}; do
+ if [[ "$(grep "TESTTYPE=" ${f})" =~ "${TESTTYPE}" ]]; then
+ newtests+="${f} "
+ fi
+ done
+
+ tests="${newtests}"
+ fi
+fi
+
+if [[ "${tests}" == "" ]]; then
+ echo "No tests provided; skipping."
+ exit 77
fi
if [[ "$TEST_REMOTES" != "" ]]; then
--
2.4.3
8 years, 8 months
[initial-setup][rhel7-branch][PATCH] Move gui scriptlets to the gui subpackage (#1181209)
by Martin Kolman
The gui related systemd scriptlets should be called when the gui
subpackage is being manipulated, not the main package.
Related: rhbz#1181209
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
initial-setup.spec | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/initial-setup.spec b/initial-setup.spec
index 8c8cd0e..08908e1 100644
--- a/initial-setup.spec
+++ b/initial-setup.spec
@@ -71,17 +71,23 @@ make install-po-files
%find_lang %{name}
%post
-%systemd_post initial-setup-graphical.service
%systemd_post initial-setup-text.service
%preun
-%systemd_preun initial-setup-graphical.service
%systemd_preun initial-setup-text.service
%postun
-%systemd_postun_with_restart initial-setup-graphical.service
%systemd_postun_with_restart initial-setup-text.service
+%post gui
+%systemd_post initial-setup-graphical.service
+
+%preun gui
+%systemd_preun initial-setup-graphical.service
+
+%postun gui
+%systemd_postun_with_restart initial-setup-graphical.service
+
%files -f %{name}.lang
%doc COPYING README
%{python_sitelib}/initial_setup*
--
2.4.3
8 years, 8 months
New: [rhinstaller/lorax/pulls/41 master] Kill fedup
by dashea
These patches make lorax stop building `upgrade.img` and stop requiring `fedup-dracut` and friends.
For backward-compatibility, the API and CLI have been left unchanged. `--noupgrade` is still accepted and `doupgrade` still gets passed into the templates. It just doesn't do anything.
This is intended for f23-branch and master, so it might need backporting.
_NOTE_: there's one place in `pylorax/__init__.py` that might want some tweaking:
```python
# ppc64 cannot boot an initrd > 32MiB so remove some drivers
if self.arch.basearch in ("ppc64", "ppc64le"):
dracut_args.extend(["--omit-drivers", REMOVE_PPC64_DRIVERS])
# Only omit dracut modules from the initrd so that they're kept for
# upgrade.img
anaconda_args.extend(["--omit", REMOVE_PPC64_MODULES])
```
As far as I can tell, though, that shouldn't hurt anything
--
To view this pull request on github, visit https://github.com/rhinstaller/lorax/pull/41
8 years, 8 months