3
\me] @ s U d Z ddlZddlZddlmZ ddlZddlmZ ddlm Z ddl
mZ ddlm
Z
mZ ddlmZ d d
ddd
ddgZdZdddeeedgedgdZe
eeZ ejeZdd Zdd Zdd Zdd Zdd Zeee edd!d"d#ZdS )$z6zypper_add_repo: Add zypper repositories to the system N)dedent)util)Cloud)Config)
MetaSchemaget_meta_doc)
PER_ALWAYSZopensusezopensuse-microoszopensuse-tumbleweedz
opensuse-leapZsle_hpcz sle-microZslesa Zypper behavior can be configured using the ``config`` key, which will modify
``/etc/zypp/zypp.conf``. The configuration writer will only append the
provided configuration options to the configuration file. Any duplicate
options will be resolved by the way the zypp.conf INI file is parsed.
.. note::
Setting ``configdir`` is not supported and will be skipped.
The ``repos`` key may be used to add repositories to the system. Beyond the
required ``id`` and ``baseurl`` attributions, no validation is performed
on the ``repos`` entries. It is assumed the user is familiar with the
zypper repository file format. This configuration is also applicable for
systems with transactional-updates.
Zcc_zypper_add_repozZypper Add Repoz5Configure zypper behavior and add zypper repositoriesa zypper:
repos:
- id: opensuse-oss
name: os-oss
baseurl: http://dl.opensuse.org/dist/leap/v/repo/oss/
enabled: 1
autorefresh: 1
- id: opensuse-oss-update
name: os-oss-up
baseurl: http://dl.opensuse.org/dist/leap/v/update
# any setting per
# https://en.opensuse.org/openSUSE:Standards_RepoInfo
# enable and autorefresh are on by default
config:
reposdir: /etc/zypp/repos.dir
servicesdir: /etc/zypp/services.d
download.use_deltarpm: true
# any setting in /etc/zypp/zypp.conf
zypper)idnametitledescriptiondistrosZexamplesZ frequencyZactivate_by_schema_keysc C s | j dd} | S )N _)replace)repo_id r (/usr/lib/python3.6/cc_zypper_add_repo.py_canonicalize_idT s r c C sN t | tr| rdS dS t | ttfr8djdd | D S t | tsJt| S | S )N r z
c S s g | ]}t |qS r )_format_repo_value).0vr r r