public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sun Haiyong <sunhaiyong@zdbr.net>
To: git-commits@fedoraproject.org
Subject: [rpms/binutils] rawhide: Fix an incorrect pushd when the testsuite is disabled.
Date: Wed, 14 Oct 2026 08:54:06 GMT	[thread overview]
Message-ID: <179196804659.1.1471845352386953253.rpms-binutils-b7457c570465@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/binutils
            Branch : rawhide
            Commit : b7457c57046536e3290b0e71437e985d6571ef82
            Author : Sun Haiyong <sunhaiyong@zdbr.net>
            Date   : 2026-10-14T10:42:38+08:00
            Stats  : +6/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/binutils/c/b7457c57046536e3290b0e71437e985d6571ef82?branch=rawhide

            Log:
            Fix an incorrect pushd when the testsuite is disabled.

The following code exists:

    pushd $builddir

    echo "TESTING the binutils FOR TARGET $target (native ? $native)"

    # Do not use %%check as it is run after %%install where libbfd.so is rebuilt
    # with -fvisibility=hidden no longer being usable in its shared form.

%if %{without testsuite}
    echo ================ $target == TESTSUITE DISABLED ====================
    return
%endif

When the testsuite is enabled, no problem occurs.
However, when building binutils with --without testsuite,
the code does pushd $builddir and then returns directly without doing a popd.
This causes a path error when the run_target_configuration function is
subsequently executed, making it impossible to run ../configure and resulting in an error.

Signed-off-by: Sun Haiyong <sunhaiyong@zdbr.net>

---
diff --git a/binutils.spec b/binutils.spec
index d8810c7..6ffa11b 100644
--- a/binutils.spec
+++ b/binutils.spec
@@ -7,7 +7,7 @@ Name: binutils%{?_with_debug:-debug}
 # The variable %%{source} (see below) should be set to indicate which of these
 # origins is being used.
 Version: 2.47.50
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
 URL: https://sourceware.org/binutils
 
@@ -1096,8 +1096,6 @@ run_tests()
 	builddir=cross-build-$target
     fi
 
-    pushd $builddir
-
     echo "TESTING the binutils FOR TARGET $target (native ? $native)"
 
     # Do not use %%check as it is run after %%install where libbfd.so is rebuilt
@@ -1107,6 +1105,8 @@ run_tests()
     return
 %endif
 
+    pushd $builddir
+
     # FIXME:  I have not been able to find a way to capture a "failed" return
     # value from "make check" without having it also stop the build.  So in
     # order to obtain the logs from the test runs if a check fails I have to
@@ -1776,6 +1776,9 @@ exit 0
 
 #----------------------------------------------------------------------------
 %changelog
+* Tue Oct 13 2026 Sun Haiyong <sunhaiyong@zdbr.net> - 2.47.50-16
+- Fix an incorrect pushd when the testsuite is disabled.
+
 * Sat Oct 10 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-15
 - Rename cross-binutils-x86_64 to cross-binutils-i686 when built on an i686 host.
 

                 reply	other threads:[~2026-10-14  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=179196804659.1.1471845352386953253.rpms-binutils-b7457c570465@fedoraproject.org \
    --to=sunhaiyong@zdbr.net \
    --cc=git-commits@fedoraproject.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