|
|
|
@ -3,8 +3,21 @@
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from collections import namedtuple
|
|
|
|
|
import rpmfluff
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from rpmfluff import SimpleRpmBuild
|
|
|
|
|
from rpmfluff import YumRepoBuild
|
|
|
|
|
except ImportError:
|
|
|
|
|
from rpmfluff.rpmbuild import SimpleRpmBuild
|
|
|
|
|
from rpmfluff.yumrepobuild import YumRepoBuild
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from rpmfluff import can_use_rpm_weak_deps
|
|
|
|
|
except ImportError:
|
|
|
|
|
try:
|
|
|
|
|
from rpmfluff.utils import can_use_rpm_weak_deps
|
|
|
|
|
except ImportError:
|
|
|
|
|
can_use_rpm_weak_deps = None
|
|
|
|
|
|
|
|
|
|
RPM = namedtuple('RPM', ['name', 'version', 'release', 'epoch', 'recommends'])
|
|
|
|
|
|
|
|
|
@ -30,12 +43,12 @@ def main():
|
|
|
|
|
|
|
|
|
|
pkgs = []
|
|
|
|
|
for spec in SPECS:
|
|
|
|
|
pkg = rpmfluff.SimpleRpmBuild(spec.name, spec.version, spec.release, [arch])
|
|
|
|
|
pkg = SimpleRpmBuild(spec.name, spec.version, spec.release, [arch])
|
|
|
|
|
pkg.epoch = spec.epoch
|
|
|
|
|
|
|
|
|
|
if spec.recommends:
|
|
|
|
|
# Skip packages that require weak deps but an older version of RPM is being used
|
|
|
|
|
if not hasattr(rpmfluff, "can_use_rpm_weak_deps") or not rpmfluff.can_use_rpm_weak_deps():
|
|
|
|
|
if not can_use_rpm_weak_deps or not can_use_rpm_weak_deps():
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
for recommend in spec.recommends:
|
|
|
|
@ -43,7 +56,7 @@ def main():
|
|
|
|
|
|
|
|
|
|
pkgs.append(pkg)
|
|
|
|
|
|
|
|
|
|
repo = rpmfluff.YumRepoBuild(pkgs)
|
|
|
|
|
repo = YumRepoBuild(pkgs)
|
|
|
|
|
repo.make(arch)
|
|
|
|
|
|
|
|
|
|
for pkg in pkgs:
|
|
|
|
|