Kaydet (Commit) 5f39c757 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Building method for RFP packages have been added.

RFP safety switch have been added. RFP packages will just be installed with inary em.
üst 31a69e2c
......@@ -36,6 +36,7 @@ tmp_dir = /var/inary
architecture = aarch64
autoclean = False
bandwidth_limit = 0
allowrfp=False
destinationdirectory = /
distribution = Sulin ARM64
distribution_release = 0.1
......
......@@ -36,6 +36,7 @@ tmp_dir = /var/inary
architecture = armv7h
autoclean = False
bandwidth_limit = 0
allowrfp=False
destinationdirectory = /
distribution = Sulin ARM
distribution_release = 0.1
......
......@@ -36,6 +36,7 @@ tmp_dir = /var/inary
architecture = i686
autoclean = False
bandwidth_limit = 0
allowrfp=False
destinationdirectory = /
distribution = SulinOS
distribution_release = 2019
......
......@@ -37,6 +37,7 @@ tmp_dir = /var/inary
architecture = x86_64
autoclean = False
bandwidth_limit = 0
allowrfp=False
allow_docs=False
allow_pages=False
allow_dbginfo=False
......
......@@ -76,6 +76,7 @@ class GeneralDefaults:
distribution_release = "2019"
distribution_id = "s19"
architecture = "x86_64"
allowrfp = False
http_proxy = os.getenv("HTTP_PROXY") or None
https_proxy = os.getenv("HTTPS_PROXY") or None
ftp_proxy = os.getenv("FTP_PROXY") or None
......
......@@ -57,6 +57,7 @@ class Package(specfile.Package, xmlfile.XmlFile, metaclass=autoxml.autoxml):
t_PackageURI = [autoxml.String, autoxml.optional]
t_DeltaPackages = [[Delta], autoxml.optional]
t_PackageFormat = [autoxml.String, autoxml.optional]
t_Rfp = [autoxml.String, autoxml.optional]
t_Source = [Source, autoxml.optional]
......@@ -108,6 +109,7 @@ class MetaData(xmlfile.XmlFile, metaclass=autoxml.autoxml):
self.source.homepage = src.homepage
self.source.packager = src.packager
self.package.source = self.source # FIXME: I know that replication sucks here, but this is the easiest for now
self.package.rfp = src.rfp
self.package.name = pkg.name
self.package.summary = pkg.summary
self.package.description = pkg.description
......
......@@ -171,6 +171,7 @@ class Source(metaclass=autoxml.autoxml):
t_Name = [autoxml.String, autoxml.mandatory]
t_Homepage = [autoxml.String, autoxml.optional]
t_Packager = [Packager, autoxml.mandatory]
t_Rfp = [autoxml.String, autoxml.optional]
t_ExcludeArch = [[autoxml.String], autoxml.optional]
t_License = [[autoxml.String], autoxml.mandatory]
t_IsA = [[autoxml.String], autoxml.optional]
......
......@@ -224,6 +224,16 @@ class Builder:
# Don't wait until creating .inary file for complaining about versioning
# scheme errors
self.package_rfp=None
if self.spec.source.rfp:
ctx.ui.info(util.colorize(_("[ !!! ] Building RFP for {}").format(self.spec.source.rfp),
color="purple"))
if ctx.ui.confirm(_("Would you like to compile this RFP package?")):
self.package_rfp=self.spec.source.rfp
else:
raise Error(_("Didn't permit build RFP package."))
self.check_versioning(self.spec.getSourceVersion(),
self.spec.getSourceRelease())
......@@ -256,6 +266,7 @@ class Builder:
self.has_ccache = False
self.has_icecream = False
def set_spec_file(self, specuri):
if not specuri.is_remote_file():
# FIXME: doesn't work for file://
......@@ -284,8 +295,12 @@ class Builder:
distro_id,
package_info.architecture))
if self.package_rfp:
package_extension = ".rfp" + ctx.const.package_suffix
else:
package_extension = ctx.const.package_suffix
if with_extension:
fn += ctx.const.package_suffix
fn += package_extension
return fn
......@@ -324,7 +339,6 @@ class Builder:
def build(self):
"""Build the package in one shot."""
architecture = ctx.config.values.general.architecture
if architecture in self.spec.source.excludeArch:
raise ExcludedArchitectureException(
......
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