| |
@@ -0,0 +1,32 @@
|
| |
+ # -*- coding: utf-8 -*-
|
| |
+
|
| |
+ from pungi.paths import LogPaths # noqa
|
| |
+ from pungi.paths import WorkPaths # noqa
|
| |
+ from pungi.paths import ComposePaths as OriginalComposePaths
|
| |
+
|
| |
+
|
| |
+ # Put ISOs from one variant and put them into another place. The value in the
|
| |
+ # mapping should be a variant UID. However, no such variant needs to exist, but
|
| |
+ # the paths will be used as if was a regular variant.
|
| |
+ #
|
| |
+ # The metadata will contain correct path to the ISO, but the image will be
|
| |
+ # listed under its real variant.
|
| |
+ MAPPING = {
|
| |
+ 'KDE': 'Live',
|
| |
+ }
|
| |
+
|
| |
+
|
| |
+ class DummyVariant(object):
|
| |
+ def __init__(self, uid):
|
| |
+ self.uid = uid
|
| |
+ self.type = 'variant'
|
| |
+
|
| |
+
|
| |
+ class ComposePaths(OriginalComposePaths):
|
| |
+ def iso_dir(self, arch, variant, symlink_to=None, create_dir=True, relative=False):
|
| |
+ try:
|
| |
+ variant = DummyVariant(MAPPING[variant.uid])
|
| |
+ except KeyError:
|
| |
+ pass
|
| |
+ return super(ComposePaths, self).iso_dir(
|
| |
+ arch, variant, symlink_to=symlink_to, create_dir=create_dir, relative=relative)
|
| |