Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56856 closed defect (fixed)

qbs cannot find patch

Reported by: mouse07410 (Mouse) Owned by: joerg.bornemann@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: qbs

Description

It looks like several Macports ports have been hit by the "cannot find/download or apply a patch file" problem.

First clang-6.0 (see the bug reported for clang), and now qbs:

$ sudo port upgrade qbs
--->  Computing dependencies for qbs
--->  Fetching archive for qbs
--->  Attempting to fetch qbs-1.12.0_0.darwin_17.x86_64.tbz2 from https://packages.macports.org/qbs
--->  Attempting to fetch qbs-1.12.0_0.darwin_17.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/qbs
--->  Attempting to fetch qbs-1.12.0_0.darwin_17.x86_64.tbz2 from http://lil.fr.packages.macports.org/qbs
--->  Fetching distfiles for qbs
--->  Verifying checksums for qbs
--->  Extracting qbs
--->  Applying patches to qbs
Error: Failed to patch qbs: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_qbs/qbs/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
$

Here's the log:

:debug:patch Environment:
:debug:patch CC_PRINT_OPTIONS='YES'
:debug:patch CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_qbs/qbs/work/.CC_PRINT_OPTIONS'
:debug:patch CPATH='/opt/local/include'
:debug:patch LIBRARY_PATH='/opt/local/lib'
:debug:patch MACOSX_DEPLOYMENT_TARGET='10.13'
:info:patch Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_qbs/qbs/work/qbs-src-1.12.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/qbs/files/patch-headers.diff'
:debug:patch system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_qbs/qbs/work/qbs-src-1.12.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/qbs/files/patch-headers.diff'
:info:patch patching file src/lib/corelib/tools/tools.pri
:info:patch Hunk #1 FAILED at 124.
:info:patch 1 out of 1 hunk FAILED -- saving rejects to file src/lib/corelib/tools/tools.pri.rej
:info:patch Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_qbs/qbs/work/qbs-src-1.12.0" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/qbs/files/patch-headers.diff'
:info:patch Exit code: 1
:error:patch Failed to patch qbs: command execution failed

This is the content of src/lib/corelib/tools/tools.pri.rej:

***************
*** 124,129 ****
          $$PWD/generateoptions.h \
          $$PWD/generatorpluginmanager.h \
          $$PWD/installoptions.h \
          $$PWD/qbspluginmanager.h \
          $$PWD/setupprojectparameters.h \
          $$PWD/toolchains.h \
--- 124,130 ----
          $$PWD/generateoptions.h \
          $$PWD/generatorpluginmanager.h \
          $$PWD/installoptions.h \
+       $$PWD/projectgeneratormanager.h \
          $$PWD/qbspluginmanager.h \
          $$PWD/setupprojectparameters.h \
          $$PWD/toolchains.h \

Change History (7)

comment:1 Changed 2 years ago by mf2k (Frank Schima)

Cc: joerg.bornemann@… removed
Owner: set to joerg.bornemann@…
Status: newassigned

comment:2 Changed 2 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:3 Changed 2 years ago by mouse07410 (Mouse)

Further investigation showed that this patch fails because it's bad - it should not be applied, because the original file already contains it.

I showed above the content of the src/lib/corelib/tools/tools.pri.rej. Here's what the relevant lines of the src/lib/corelib/tools/tools.pri are, starting with line 120:

        $$PWD/buildoptions.h \
        $$PWD/cleanoptions.h \
        $$PWD/codelocation.h \
        $$PWD/commandechomode.h \
        $$PWD/error.h \
        $$PWD/generateoptions.h \
        $$PWD/installoptions.h \
        $$PWD/preferences.h \
        $$PWD/processresult.h \
        $$PWD/profile.h \
        $$PWD/projectgeneratormanager.h \
        $$PWD/qbs_export.h \
        $$PWD/settings.h \
        $$PWD/settingsmodel.h \
        $$PWD/setupprojectparameters.h \
        $$PWD/toolchains.h \
        $$PWD/version.h

You can see that $$PWD/projectgeneratormanager.h \ line is already there.

comment:4 Changed 2 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

There is a pull request that attempts to fix the problem.

comment:5 Changed 2 years ago by mouse07410 (Mouse)

I think this PR will fix it. When would it be merged?

comment:6 Changed 2 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

comment:7 Changed 2 years ago by mouse07410 (Mouse)

Fix confirmed. Thanks!

Note: See TracTickets for help on using tickets.