Package handling¶
Package list¶
-
class
bootstrapvz.base.pkg.packagelist.
PackageList
(manifest_vars, source_lists)¶ Represents a list of packages
-
class
Local
(path)¶ A local package
-
class
Remote
(name, target)¶ A remote package with an optional target
-
add
(name, target=None)¶ Adds a package to the install list
Parameters: - name (str) – The name of the package to install, may contain manifest vars references
- target (str) – The name of the target release for the package, may contain manifest vars references
Raises: - PackageError – When a package of the same name but with a different target has already been added.
- PackageError – When the specified target release could not be found.
-
add_local
(package_path)¶ Adds a local package to the installation list
Parameters: package_path (str) – Path to the local package, may contain manifest vars references
-
class
Sources list¶
-
class
bootstrapvz.base.pkg.sourceslist.
Source
(line)¶ Represents a single source line
-
class
bootstrapvz.base.pkg.sourceslist.
SourceLists
(manifest_vars)¶ Represents a list of sources lists for apt
-
add
(name, line)¶ Adds a source to the apt sources list
Parameters: - name (str) – Name of the file in sources.list.d, may contain manifest vars references
- line (str) – The line for the source file, may contain manifest vars references
-
target_exists
(target)¶ Checks whether the target exists in the sources list
Parameters: target (str) – Name of the target to check for, may contain manifest vars references Returns: Whether the target exists Return type: bool
-
Preferences list¶
-
class
bootstrapvz.base.pkg.preferenceslist.
Preference
(preference)¶ Represents a single preference
-
class
bootstrapvz.base.pkg.preferenceslist.
PreferenceLists
(manifest_vars)¶ Represents a list of preferences lists for apt
-
add
(name, preferences)¶ Adds a preference to the apt preferences list
Parameters: - name (str) – Name of the file in preferences.list.d, may contain manifest vars references
- preferences (object) – The preferences
-