Bug 1799042 - part 1: Make deb dependencies customizable r=gabriel

Differential Revision: https://phabricator.services.mozilla.com/D162225
This commit is contained in:
Johan Lorenzo 2023-03-07 19:28:21 +00:00
Родитель 8dafc4cf82
Коммит 46cf83184f
3 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -5,6 +5,6 @@ Section: web
Build-Depends: debhelper (>= 9)
Package: ${DEB_PKG_NAME}
Architecture: i386 amd64
Depends: $${shlibs:Depends},
Architecture: ${DEB_ARCH_NAME}
Depends: ${DEB_DEPENDS}
Description: ${DEB_DESCRIPTION}

Просмотреть файл

@ -58,7 +58,11 @@ def repackage_deb(infile, output, template_dir, arch, version, build_number):
mozfile.extract_tarball(infile, source_dir)
application_ini_data = _extract_application_ini_data(source_dir)
build_variables = _get_build_variables(
application_ini_data, arch, version, build_number
application_ini_data,
arch,
version,
build_number,
depends="${shlibs:Depends},",
)
_copy_plain_deb_config(template_dir, source_dir)
@ -110,6 +114,7 @@ def _get_build_variables(
arch,
version_string,
build_number,
depends,
):
version = GeckoVersion.parse(version_string)
# Nightlies don't have build numbers
@ -125,6 +130,7 @@ def _get_build_variables(
"DEB_PKG_VERSION": deb_pkg_version,
"DEB_CHANGELOG_DATE": format_datetime(application_ini_data["timestamp"]),
"DEB_ARCH_NAME": _DEB_ARCH[arch],
"DEB_DEPENDS": depends,
}

Просмотреть файл

@ -61,12 +61,14 @@ def test_get_build_variables(version, build_number, expected_deb_pkg_version):
"x86",
version,
build_number,
depends="${shlibs:Depends},",
) == {
"DEB_DESCRIPTION": "Mozilla Firefox",
"DEB_PKG_NAME": "firefox-nightly-try",
"DEB_PKG_VERSION": expected_deb_pkg_version,
"DEB_CHANGELOG_DATE": "Wed, 22 Feb 2023 00:00:00 -0000",
"DEB_ARCH_NAME": "i386",
"DEB_DEPENDS": "${shlibs:Depends},",
}