Update pungi-make-ostree to supourt sub-command 'tree', which is just as the original feature of pungi-make-ostree to compose OSTree tree. With the change we can add other sub commands later to build other OSTree artifacts, like the installer image. Inaddtional to the change, now the the 'tree' command can accept an optional '--extra-config' parameter to update the original tree configuration with extra configurations specified in a json file before composing the OSTree tree. Example: pungi-make-ostree tree --repo=/ostree --treefile=/path/to/treefile \ --log-dir=/path/to/log --extra-config=/path/to/extra-config.json The extra-config file can contains the same configuration as OSTree phase, the difference is it doesn't understand variant UID as source repo since it's not ran in the chain of phases. A valid configuration can be like: { "source_repo_from": "http://example.com/repo/x86_64/Server", "extra_source_repos": [ { "name": "optional", "baseurl": "http://example.com/repo/x86_64/optional", "exclude": "systemd-container", "gpgcheck": False }, { "name": "extra", "baseurl": "http://example.com/repo/x86_64/extra", } ], "keep_original_sources": True } The OSTree phase is updated to move out the task of updating treefile, instead of that, it writes the extra configurations to a json file, then 'pungi-make-ostree tree' will take it by option '--extra-config'. Signed-off-by: Qixiang Wan <qwan@redhat.com>
20 lines
695 B
Python
20 lines
695 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Library General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, see <https://gnu.org/licenses/>.
|
|
|
|
|
|
class OSTree(object):
|
|
def set_args(self, args):
|
|
self.args = args
|