commit:     1cf6d7caf82fc92aa72e4cd0d9c5815b160db5d3
Author:     Anthony Ryan <anthonyryan1 <AT> gmail <DOT> com>
AuthorDate: Sat Jan 13 04:27:03 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 15 06:32:50 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=1cf6d7ca

Write LICENSE before SLOT in create_ebuild()

Better matches the order defined in skel.ebuild

A prerequisite for https://github.com/pkgcore/pkgcheck/pull/645

Signed-off-by: Anthony Ryan <anthonyryan1 <AT> gmail.com>
Closes: https://github.com/pkgcore/pkgcore/pull/425
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgcore/pytest/plugin.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pkgcore/pytest/plugin.py b/src/pkgcore/pytest/plugin.py
index 6578050e2..0579a45ad 100644
--- a/src/pkgcore/pytest/plugin.py
+++ b/src/pkgcore/pytest/plugin.py
@@ -263,14 +263,14 @@ class EbuildRepo:
             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)):

Reply via email to