Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jul 2024 13:40:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        pkg@FreeBSD.org
Subject:   [Bug 280275] ports-mgmt/pkg: Wrong exit code in periodic script 490.status-pkg-changes
Message-ID:  <bug-280275-32340-JxKXYAkisO@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-280275-32340@https.bugs.freebsd.org/bugzilla/>
References:  <bug-280275-32340@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280275

Andre Stoebe <andrestoebe@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Affects Only Me             |Affects Some People

--- Comment #1 from Andre Stoebe <andrestoebe@gmail.com> ---
Actually, I think this whole list_rc dance is not needed and the original c=
ode
is fine.

The only change with my diff would be that the exit code of pkg and cmp is
passed-through and the periodic script might return > 2.

Here's a minimal diff for the original issue:

--- /usr/local/etc/periodic/daily/490.status-pkg-changes        2024-05-23
03:05:49.000000000 +0200
+++ 490.status-pkg-changes      2024-07-14 15:38:50.344033000 +0200
@@ -20,7 +20,8 @@
     rc=3D$?

     cmp -sz $bak/$bak_file $bak/${bak_file}2
-    if [ $? -eq 1 ]; then
+    rc=3D$?
+    if [ $rc -eq 1 ]; then
        diff -U 0 $bak/${bak_file}2 $bak/${bak_file} | \
            grep '^[-+][^-+]' | sort -k 1.2
     fi

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280275-32340-JxKXYAkisO>