Skip to content

Commit

Permalink
setup_rpm_repo/create_repo: "Arch dependent binaries in noarch packag…
Browse files Browse the repository at this point in the history
…e" (#83108)

This fixes "Arch dependent binaries in noarch package" error cause by
including files created by make_elf function in noarch packages. While the
error only manifests itself on EL 7 and 8 it is better to use files
suitable for noarch packages to prevent the error potentially
re-occuring in the future.

(cherry picked from commit 87bead3)
  • Loading branch information
mkrizek committed Apr 22, 2024
1 parent dd1c7ed commit f9252d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/integration/targets/dnf/tasks/repo.yml
Expand Up @@ -320,7 +320,7 @@
- present

- dnf:
name: /foo.so
name: /foo.gif
state: present
register: dnf_result

Expand Down
10 changes: 5 additions & 5 deletions test/integration/targets/setup_rpm_repo/library/create_repo.py
Expand Up @@ -15,11 +15,11 @@
HAS_RPMFLUFF = True
can_use_rpm_weak_deps = None
try:
from rpmfluff import SimpleRpmBuild, GeneratedSourceFile, make_elf
from rpmfluff import SimpleRpmBuild, GeneratedSourceFile, make_gif
from rpmfluff import YumRepoBuild
except ImportError:
try:
from rpmfluff.make import make_elf
from rpmfluff.make import make_gif
from rpmfluff.sourcefile import GeneratedSourceFile
from rpmfluff.rpmbuild import SimpleRpmBuild
from rpmfluff.yumrepobuild import YumRepoBuild
Expand Down Expand Up @@ -50,8 +50,8 @@
RPM('dinginessentail-with-weak-dep', '1.0', '1', None, ['dinginessentail-weak-dep'], None, None),
RPM('dinginessentail-weak-dep', '1.0', '1', None, None, None, None),
RPM('noarchfake', '1.0', '1', None, None, None, 'noarch'),
RPM('provides_foo_a', '1.0', '1', None, None, 'foo.so', 'noarch'),
RPM('provides_foo_b', '1.0', '1', None, None, 'foo.so', 'noarch'),
RPM('provides_foo_a', '1.0', '1', None, None, 'foo.gif', 'noarch'),
RPM('provides_foo_b', '1.0', '1', None, None, 'foo.gif', 'noarch'),
RPM('number-11-name', '11.0', '1', None, None, None, None),
RPM('number-11-name', '11.1', '1', None, None, None, None),
RPM('epochone', '1.0', '1', '1', None, None, "noarch"),
Expand All @@ -77,7 +77,7 @@ def create_repo(arch='x86_64'):
pkg.add_installed_file(
"/" + spec.file,
GeneratedSourceFile(
spec.file, make_elf()
spec.file, make_gif()
)
)

Expand Down

0 comments on commit f9252d5

Please sign in to comment.