Bug 257363 - net/gitup not cleaning stale patches in ports tree
Summary: net/gitup not cleaning stale patches in ports tree
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords: dogfood, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2021-07-23 18:58 UTC by Marek Zarychta
Modified: 2021-09-13 07:40 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (eduardo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Zarychta 2021-07-23 18:58:32 UTC
net/gitup with this config:

        "ports" : {
                "repository" : "/ports.git",
                "branch"     : "main",
                "target"     : "/usr/ports",
                "ignores"    : [
                        "distfiles",
                        "packages",
                ],
        },

is leaving stale patches, for example after recent texinfo update after running "gitup ports" it has left /usr/ports/texinfo/files/patch-tp-Texinfo-XS-parsetexi-Parser-5556.pm and patch-tp-Texinfo-XS-parsetexi-errors.c which both should have been deleted. Such a mess leads usually only to breakage at the patching stage (see below), but could probably lead to more pessimistic endings.

===>  Patching for texinfo-6.8,1
===>  Applying FreeBSD patches for texinfo-6.8,1 from /usr/ports/print/texinfo/files
File to patch: ^C===>  FAILED Applying FreeBSD patch-tp-Texinfo-XS-parsetexi-Parser-5556.pm
===> FAILED to apply cleanly FreeBSD patch(es)  patch-tp-Texinfo-XS-parsetexi-Parser-5556.pm
*** Error code 1
*** Signal 2

It's only an example, I have fallen into this many times, especially while updating python modules.
Comment 1 Marek Zarychta 2021-07-24 09:11:21 UTC
I see people subscribing to this bug. Are you affected too?
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2021-07-24 11:19:55 UTC
(In reply to Marek Zarychta from comment #1)

> … Are you affected too?

I don't know, I rarely use gitup, I did find myself bugged by <https://github.com/johnmehr/gitup/issues/69> on a test machine.
Comment 3 dougs@dawnsign.com 2021-07-24 14:55:46 UTC
(In reply to Marek Zarychta from comment #1)
Yes.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-07-25 13:28:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89e756a683a7d889937202036bfb9f13eab220f1

commit 89e756a683a7d889937202036bfb9f13eab220f1
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2021-07-25 13:23:35 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2021-07-25 13:23:35 +0000

    net/gitup: Update to 0.95

    ChangeLog: https://github.com/johnmehr/gitup/releases/tag/0.95

    PR:             257363

 net/gitup/Makefile | 2 +-
 net/gitup/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2021-07-25 13:33:03 UTC
Hello,

I've updated port to latest version and I'm starting doing tests to see if I get same errors as listed.

Please let me know if problem continues so we could open an issue at upsream based on this PR.

Cheers
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2021-07-25 13:39:22 UTC
(In reply to Nuno Teixeira from comment #5)
And my gitup.conf is a fresh one:

"ports" : {
                "repository_path"  : "/ports.git",
                "branch"           : "main",
                "target_directory" : "/usr/ports",
                "ignores"          : [
                        "distfiles",
                        "packages",
                        "INDEX-11",
                        "INDEX-12",
                        "INDEX-13",
                        "INDEX-14",
               ],
        },
Comment 7 Marek Zarychta 2021-07-25 18:37:11 UTC
Thank you for taking care of this. I will test and let you know if it helped.
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2021-09-13 07:40:57 UTC
I will close this PR since there is no issues at gitup site.