Commit Graph

21 Commits

Author SHA1 Message Date
Marcus Schäfer
bdb7123fa1
Refactor use of logging facility
Use getLogger method instead of a global log object
Also use caplog fixture to capture log messages in
unit tests. This Fixes #1244
2019-10-23 17:54:27 +02:00
Dan Čermák
b015b91679
Stop inheriting from object
This is no longer required in Python3
2019-08-22 15:43:27 +02:00
Marcus Schäfer
3a066551c9
Warn on Modifications to intermediate config files
Some files are taken from the host and managed as intermediate
config files during the build of the image. Changes to those
files during the build run by e.g a script will not become
effective because the file gets restored. With this patch we
detect the modification condition and throw a warning message
such that the author of the image can adapt the description
as suggested in the message. This Fixes #817
2018-10-26 15:17:59 +02:00
Marcus Schäfer
7cee86cf18
Cleanup code to make flake8 happy
The new version of flake8 is more strict on code checking and
complained at several places. This commit fixes the code smells
such that flake8 is happy again
2018-10-25 15:52:17 +02:00
Marcus Schäfer
6b9e321048
Fixed overlay of intermediate config files
Some config files e.g etc/hosts needs to be temporary copied
from the buildsystem host to the image root system. This is
done by a custom copy with the .kiwi extension and a symlink
to that file. During the installation process the package
manager either overwrites the file or creates a .rpmnew variant.
In case a .rpmnew variant exists there is code in kiwi which
restores that .rpmnew variant to become the real file. However
that _restore_intermediate_config_rpmnew_variants() method
runs after overlay files has been applied to the system because
it's part of the final cleanup step. In order to preserve
an eventual overlay version of the file the .rpmnew variant
gets only restored if the real file does not exist.
This Fixes #807
2018-09-12 17:27:28 +02:00
Marcus Schäfer
48d552200e
Cleanup misleading error message
In root_bind if the cleanup failed to remove a directory
hierarchy the error message was just displaying the path
as it would be on the host root and not based on the root
of the image root tree.
2018-07-25 16:37:33 +02:00
Marcus Schäfer
d60926f6b7
Fixup move_to_root method
move_to_root is called to check each element of a given list
and changes any path specification to a valid path if the given
root path would be it's root(/). This tranformation implied the
creation of paths containing double slashes like //foo which
was considered harmless. However it has turned out that the dnf
package manager makes a difference here which requires to fix
the resulting paths. This Fixes #761
2018-06-05 12:22:38 +02:00
David Cassany
294e25f411 system API docs cleanup 2018-04-19 12:02:12 +02:00
David Cassany
cc5da88c73 Bypass bootstrap procedure if no bootstrap packages section
This commit updates kiwi to bypass bootstrap procedure in case
there is no bootstrap packages section.

It also adds extra validation in root_bind.
2017-04-11 16:02:27 +02:00
Marcus Schäfer
1a5257a0e8 Prevent use of project relative import statements
For details on the motivation of this change please visit:
https://wiki.python.org/moin/FutureProofPython
2017-03-07 11:23:37 +01:00
Marcus Schäfer
cd7bb5fd19
Fixup cleanup of intermediate config files
kiwi uses e.g etc/hosts from the host system for proper name
resolution during the build. The temporary variant of that
file will be deleted by kiwi at the end of the installation
process. However depending on the package manager and the
distribution it could happen that the intermediate config
file added by kiwi is treated as existing config variant.
In case of rpm a .rpmnew file variant of the config file
is created and that needs to be handled by kiwi. Therefore
this patch adds a private restore method for the .rpmnew
case. It might be needed to add other restore methods to
deal with this issue depending on how other (non rpm) based
package managers handles the situation. Fixes #104
2016-07-01 11:26:15 +02:00
Marcus Schäfer
319fb9e6e4
Adapt to common python style
Private methods should start with _f() not __f()
2016-06-15 16:27:45 +02:00
Marcus Schäfer
e0c83d6516 Merge pull request #73 from SUSE/runtime-checker
Runtime checker
2016-05-08 19:47:06 +02:00
Marcus Schäfer
400468a455 Cleanup use of temporary directories
All mkdtemp created directories are created with the 'kiwi_'
prefix. In addition all code parts which leaves tmpdirs in
the system after kiwi is done were fixed
2016-05-04 11:05:03 +02:00
Marcus Schäfer
685c830e45 Add shared cache location to Defaults 2016-04-29 14:30:15 +00:00
Marcus Schäfer
18d9d8ada1
Fixed shared local repository mounts 2016-04-29 09:24:58 +02:00
Marcus Schäfer
6b1211b8dd Added evaluation of imageincluded repositories
repositories marked as imageinclude needs to be added
permanently to the image. Fixes #56
2016-04-28 16:54:06 +02:00
Marcus Schäfer
ccf1ce6c7c
Make sure shared mount directories exists
Create shared directory path on the host _and_ in the
new root directory to make sure the bind mount works
2016-04-18 17:06:17 +02:00
Marcus Schäfer
98b8018af1
Update system inline API documentation
References #49
2016-04-15 10:34:00 +02:00
Marcus Schäfer
cc5638faa8
Fixed normalizing paths between host and image 2016-03-11 16:09:54 +01:00
Marcus Schäfer
612c574148
Continue Refactor into subpackage
system install, update, size, users, result should have their own namespace
2016-03-07 17:33:39 +01:00