Skip to content

Commit

Permalink
Write LICENSE before SLOT in create_ebuild()
Browse files Browse the repository at this point in the history
Better matches the order defined in skel.ebuild

A prerequisite for pkgcore/pkgcheck#645
  • Loading branch information
anthonyryan1 committed Jan 13, 2024
1 parent 0081f41 commit 39fc410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pkgcore/pytest/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ def create_ebuild(self, cpvstr, data=None, **kwargs):
f.write(f"EAPI={eapi}\n\n")
f.write(f'DESCRIPTION="{desc}"\n')
f.write(f'HOMEPAGE="{homepage}"\n')
f.write(f'SLOT="{slot}"\n')

if license:
f.write(f'LICENSE="{license}"\n')
# create a fake license
os.makedirs(pjoin(self.path, "licenses"), exist_ok=True)
touch(pjoin(self.path, "licenses", license))

f.write(f'SLOT="{slot}"\n')

for k, v in kwargs.items():
# handle sequences such as KEYWORDS and IUSE
if isinstance(v, (tuple, list)):
Expand Down

0 comments on commit 39fc410

Please sign in to comment.