#!/usr/bin/python3
#
# Copyright (c) 2026 Virtuozzo International GmbH. All rights reserved.
#
# This file is part of OpenVZ. OpenVZ 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;
# either version 2 of the License, or (at your option) any later
# version.
#
# 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
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# Our contact details: Virtuozzo International GmbH, Vordergasse 59, 8200
# Schaffhausen, Switzerland.
#
# Manage packages of a container that has no network access

"""Run vzpkg-guest: the code is the vzpkg_guest package in vztt/ here.

The package is installed next to this program (install-libexec in the top
Makefile), so the directory is found from where this file really lives.
Nothing is compiled to disk: the package belongs to the rpm, which installs
no byte code there, and a __pycache__ written as root would outlive it.
"""

import os
import sys

sys.dont_write_bytecode = True
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)),
                                "vztt"))

from vzpkg_guest.cli import main  # noqa: E402

if __name__ == "__main__":
    sys.exit(main(sys.argv[1:]))
