pkgdev icon indicating copy to clipboard operation
pkgdev copied to clipboard

pkgcheck auto-detects "update DESCRIPTION, HOMEPAGE, LICENSE" wrongly

Open juippis opened this issue 3 years ago • 6 comments

Hey, so here's the patch I was pushing:

diff --git a/app-forensics/aide/aide-0.17.4-r3.ebuild b/app-forensics/aide/aide-0.17.4-r3.ebuild
index 4623eda866f..0684f472885 100644
--- a/app-forensics/aide/aide-0.17.4-r3.ebuild
+++ b/app-forensics/aide/aide-0.17.4-r3.ebuild
@@ -12,9 +12,10 @@ SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 x86"
-IUSE="acl audit curl e2fs mhash selinux xattr zlib"
+IUSE="acl audit curl e2fs mhash selinux xattr"
 
 DEPEND="dev-libs/libpcre
+       sys-libs/zlib
        acl? ( virtual/acl )
        audit? ( sys-process/audit )
        curl? ( net-misc/curl )
@@ -25,8 +26,7 @@ DEPEND="dev-libs/libpcre
        )
        mhash? ( app-crypt/mhash )
        selinux? ( sys-libs/libselinux )
-       xattr? ( sys-apps/attr )
-       zlib? ( sys-libs/zlib )"
+       xattr? ( sys-apps/attr )"
 RDEPEND="${DEPEND}
        selinux? ( sec-policy/selinux-aide )"
 BDEPEND="sys-devel/bison
@@ -73,7 +73,8 @@ src_configure() {
                --without-locale
 
                --without-prelink
-               $(use_with zlib)
+
+               --with-zlib
                $(use_with curl)
                $(use_with acl posix-acl)
                $(use_with selinux)

And pkgcheck auto-detected commit summary for me:

app-forensics/aide: update DESCRIPTION, HOMEPAGE, LICENSE

Here's the whole git log thing:

commit 7931d9409fce2bde3754b71cc874c18469cace31 (HEAD -> master)
Author: Joonas Niilola <[email protected]>
Date:   Sun Jan 8 09:07:58 2023 +0200

    app-forensics/aide: update DESCRIPTION, HOMEPAGE, LICENSE
    
    Signed-off-by: Joonas Niilola <[email protected]>

diff --git a/app-forensics/aide/aide-0.17.4-r3.ebuild b/app-forensics/aide/aide-0.17.4-r3.ebuild
index 4623eda866f..0684f472885 100644
--- a/app-forensics/aide/aide-0.17.4-r3.ebuild
+++ b/app-forensics/aide/aide-0.17.4-r3.ebuild
@@ -12,9 +12,10 @@ SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 x86"
-IUSE="acl audit curl e2fs mhash selinux xattr zlib"
+IUSE="acl audit curl e2fs mhash selinux xattr"
 
 DEPEND="dev-libs/libpcre
+       sys-libs/zlib
        acl? ( virtual/acl )
        audit? ( sys-process/audit )
        curl? ( net-misc/curl )
@@ -25,8 +26,7 @@ DEPEND="dev-libs/libpcre
        )
        mhash? ( app-crypt/mhash )
        selinux? ( sys-libs/libselinux )
-       xattr? ( sys-apps/attr )
-       zlib? ( sys-libs/zlib )"
+       xattr? ( sys-apps/attr )"
 RDEPEND="${DEPEND}
        selinux? ( sec-policy/selinux-aide )"
 BDEPEND="sys-devel/bison
@@ -73,7 +73,8 @@ src_configure() {
                --without-locale
 
                --without-prelink
-               $(use_with zlib)
+
+               --with-zlib
                $(use_with curl)
                $(use_with acl posix-acl)
                $(use_with selinux)

$ pkgcheck --version pkgcheck 0.10.19

juippis avatar Jan 08 '23 07:01 juippis

Not that it really matters, but I wanted to make sure I didn't misunderstand - you mean the auto-generated commit title by pkgdev commit, right?

arthurzam avatar Jan 09 '23 18:01 arthurzam

Ah yes indeed. $ pkgdev --version pkgdev 0.2.4

I forgot these are different tools since I've aliased the commands :)

juippis avatar Jan 09 '23 19:01 juippis

Thanks, I was actually going to ask if an issue can be moved - was gonna report it under pkgdev I swear!

juippis avatar Jan 09 '23 20:01 juippis

Hmm, something isn't logical here.

I was trying to reproduce by doing:

  1. git checkout 31991cf623421898a80026fda9594903ad4b5604 (commit at tree that contains the changes here)
  2. git reset --soft HEAD~1 (to undo changes)
  3. pkgdev commit app-forensics/aide

And it always failed in finding a good summary, meaning forcing to show the editor for commit title. I notice that you did here a revbump, on which the code doesn't do the selecting of this title variant. I've tried to perform it without revbump, and still same result - no summary found. I've traversed the code around those selections, and I can't guess how it could mistake it.

arthurzam avatar Jan 13 '23 21:01 arthurzam

Indeed I can't reproduce this either :\

juippis avatar Jan 14 '23 07:01 juippis

Oh, I got it!

$ git checkout 0a1e76962418bcdf85ba32984bccce07d1d7aa67 $ cd app-forensics/aide/ $ edit aide-0.17.4-r3.ebuild $ git add aide-0.17.4-r3.ebuild $ pkgdev commit [detached HEAD 8a49531dbd5b] app-forensics/aide: update DESCRIPTION, HOMEPAGE, LICENSE 1 file changed, 5 insertions(+), 4 deletions(-)

So checkout to a commit before the aide change, manually edit exactly the changes as above, git add and commit (no revbumping).

juippis avatar Jan 14 '23 11:01 juippis