Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] common/travis/xlint: make xlint only fatal for new templates
Date: Sun, 09 Jul 2023 00:44:58 +0200	[thread overview]
Message-ID: <20230708224458.aPl_mHgxr28S3GFmvLxZBPL4NDQqRQcNbKl1QGGBkRk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44930@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages ci/xlint-nonfatal
https://github.com/void-linux/void-packages/pull/44930

common/travis/xlint: make xlint only fatal for new templates
per discussion on irc, to help updates and other changes go more smoothly, xlint should only cause a CI failure if the linted template is new.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**



A patch file from https://github.com/void-linux/void-packages/pull/44930.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/xlint-nonfatal-44930.patch --]
[-- Type: text/x-diff, Size: 5326 bytes --]

From e53feff4d3d0a864925558da3d422beb74f09463 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 18:19:43 -0400
Subject: [PATCH 1/5] common/travis/xlint: make xlint only fatal for new
 templates

to help updates and other changes go more smoothly, xlint should only
cause a CI failure if the linted template is new.
---
 common/travis/changed_templates.sh | 15 ++++++++++++++-
 common/travis/xlint.sh             |  7 ++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 91af1f1a3c1a..124ede1b1746 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -20,9 +20,22 @@ base="$(git merge-base origin/HEAD "$tip")"
 echo "$base $tip" >/tmp/revisions
 
 /bin/echo -e '\x1b[32mChanged packages:\x1b[0m'
-git diff-tree -r --no-renames --name-only --diff-filter=AM \
+git diff-tree -r --no-renames --name-only --diff-filter=M \
 	"$base" "$tip" \
 	-- 'srcpkgs/*/template' |
 	cut -d/ -f 2 |
 	tee /tmp/templates |
 	sed "s/^/  /" >&2
+/bin/echo -e '\x1b[32mNew packages:\x1b[0m'
+git diff-tree -r --no-renames --name-only --diff-filter=A \
+	"$base" "$tip" \
+	-- 'srcpkgs/*/template' |
+	cut -d/ -f 2 |
+	tee -a /tmp/templates |
+	tee /tmp/new-templates |
+	sed "s/^/  /" >&2
+
+set -x
+cat /tmp/templates
+cat /tmp/new-templates
+set +x
diff --git a/common/travis/xlint.sh b/common/travis/xlint.sh
index 790791ef1733..2f0ab673a10a 100755
--- a/common/travis/xlint.sh
+++ b/common/travis/xlint.sh
@@ -11,7 +11,12 @@ common/scripts/lint-commits $base $tip || EXITCODE=$?
 
 for t in $(awk '{ print "srcpkgs/" $0 "/template" }' /tmp/templates); do
 	/bin/echo -e "\x1b[32mLinting $t...\x1b[0m"
-	xlint "$t" > /tmp/xlint_out || EXITCODE=$?
+	if grep -q "srcpkgs/$t/template" /tmp/new-templates; then
+		# only fatal if xlint fails for new templates
+		xlint "$t" > /tmp/xlint_out || EXITCODE=$?
+	else
+		xlint "$t" > /tmp/xlint_out || true
+	fi
 	common/scripts/lint-version-change "$t" $base $tip > /tmp/vlint_out || EXITCODE=$?
 	awk -f common/scripts/lint2annotations.awk /tmp/xlint_out /tmp/vlint_out
 done

From 6b2490cdc5cff5c6aac854548212afabbd989f8d Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 18:28:42 -0400
Subject: [PATCH 2/5] chezmoi: temp

---
 srcpkgs/chezmoi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index 074ef8b8c602..8d2d18be6757 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
-# Template file for 'chezmoi'
+# Template file for 'chezmoiasdfsdf'
 pkgname=chezmoi
 version=2.34.3
-revision=1
+revision=2
 build_style=go
 go_import_path="github.com/twpayne/chezmoi/v2"
 go_build_tags="noembeddocs noupgrade"

From 2fe908fee3e0bfafb95e857086420f5230b09793 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 18:29:12 -0400
Subject: [PATCH 3/5] New package: foobar-. this is a test

---
 srcpkgs/foobar/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/foobar/template

diff --git a/srcpkgs/foobar/template b/srcpkgs/foobar/template
new file mode 100644
index 000000000000..9550ea3e72de
--- /dev/null
+++ b/srcpkgs/foobar/template
@@ -0,0 +1,22 @@
+# Template file for 'foobar'
+pkgname=foobar
+version=1
+revision=1
+#archs="i686 x86_64"
+#build_wrksrc=
+build_style=meta
+#configure_args=""
+#make_build_args=""
+#make_install_args=""
+#conf_files=""
+#make_dirs="/var/log/dir 0755 root root"
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc=""
+maintainer="classabbyamp <void@placeviolette.net>"
+license="GPL-3.0-or-later"
+homepage=""
+#changelog=""
+distfiles=""
+checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb

From ed80d74f241b7aac472f0a14a1257c6f1a0696c3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 18:42:40 -0400
Subject: [PATCH 4/5] tmp

---
 common/travis/xlint.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/travis/xlint.sh b/common/travis/xlint.sh
index 2f0ab673a10a..397a5c99354f 100755
--- a/common/travis/xlint.sh
+++ b/common/travis/xlint.sh
@@ -4,6 +4,7 @@
 
 [ "$XLINT" ] || exit 0
 
+set -x
 EXITCODE=0
 read base tip < /tmp/revisions
 

From f0cde73b21c8666e1c53b0347315bfe7ddbd266f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 8 Jul 2023 18:44:46 -0400
Subject: [PATCH 5/5] tmp

---
 srcpkgs/foobar/template | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/foobar/template b/srcpkgs/foobar/template
index 9550ea3e72de..bb27fee2a740 100644
--- a/srcpkgs/foobar/template
+++ b/srcpkgs/foobar/template
@@ -10,13 +10,13 @@ build_style=meta
 #make_install_args=""
 #conf_files=""
 #make_dirs="/var/log/dir 0755 root root"
-hostmakedepends=""
-makedepends=""
-depends=""
-short_desc=""
+# hostmakedepends=""
+# makedepends=""
+# depends=""
+short_desc="Blah"
 maintainer="classabbyamp <void@placeviolette.net>"
 license="GPL-3.0-or-later"
-homepage=""
+homepage="a"
 #changelog=""
-distfiles=""
+# distfiles=""
 checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb

  parent reply	other threads:[~2023-07-08 22:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-08 22:28 [PR PATCH] " classabbyamp
2023-07-08 22:29 ` [PR PATCH] [Updated] " classabbyamp
2023-07-08 22:41 ` classabbyamp
2023-07-08 22:42 ` classabbyamp
2023-07-08 22:44 ` classabbyamp [this message]
2023-07-08 22:51 ` classabbyamp
2023-07-08 22:53 ` classabbyamp
2023-07-08 22:55 ` classabbyamp
2023-07-08 22:58 ` classabbyamp
2023-07-08 23:00 ` classabbyamp
2023-07-08 23:02 ` classabbyamp
2023-10-07  1:45 ` github-actions
2023-10-22  1:46 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230708224458.aPl_mHgxr28S3GFmvLxZBPL4NDQqRQcNbKl1QGGBkRk@z \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).