Commit f3b0d588 authored by Nicolas Dufresne's avatar Nicolas Dufresne

package: Special case -t option for Android Universal

Currently, using -t with Android Universal fails, because the
DistTarball packager does not work for that platform. The
AndroidPackager though is base on DistTarball so sepcial case the -t
option to make this option work.
parent b78c3f77
Pipeline #14380 passed with stages
in 64 minutes and 15 seconds
......@@ -18,7 +18,7 @@
import os
from cerbero.config import Platform
from cerbero.config import Platform, Architecture
from cerbero.commands import Command, register_command, build
from cerbero.utils import _, N_, ArgparseArgument
from cerbero.utils import messages as m
......@@ -26,6 +26,7 @@ from cerbero.errors import PackageNotFoundError, UsageError
from cerbero.packages.packager import Packager
from cerbero.packages.packagesstore import PackagesStore
from cerbero.packages.disttarball import DistTarball
from cerbero.packages.android import AndroidPackager
class Package(Command):
......@@ -79,7 +80,11 @@ class Package(Command):
if p is None:
raise PackageNotFoundError(args.package[0])
if args.tarball:
pkg = DistTarball(config, p, self.store)
if config.target_platform == Platform.ANDROID and \
config.target_arch == Architecture.UNIVERSAL:
pkg = AndroidPackager(config, p, self.store)
else:
pkg = DistTarball(config, p, self.store)
else:
pkg = Packager(config, p, self.store)
m.action(_("Creating package for %s") % p.name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment