Opened 7 years ago

Closed 7 years ago

#55275 closed defect (fixed)

gtk3 +quartz: patches fail to apply

Reported by: skymoo (Adam Mercer) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: mojca (Mojca Miklavec), springermac (Jonathan Springer), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), neilt (Neil Tiffin), mopihopi, jjstickel (Jonathan Stickel), Polyergic (Shad Sterling), olupton (Olli Lupton), p-bro
Port: gtk3

Description

Trying to install gtk3-3.22.26_0 and it fails in the Applying patches phase

:debug:patch system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_
sources_rsync.macports.org_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22
.26" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org
/release/tarballs/ports/gnome/gtk3/files/patch-browser-demo-revert-add-copy-to-c
lipboard-button.diff'
:info:patch patching file demos/icon-browser/iconbrowserwin.c
:info:patch patching file demos/icon-browser/window.ui
:info:patch Reversed (or previously applied) patch detected!  Assume -R? [n]
:info:patch Apply anyway? [n]
:info:patch Skipping patch.
:info:patch 1 out of 1 hunk ignored -- saving rejects to file demos/icon-browser/window.ui.rej

Full build log is attached

Attachments (4)

main.log (10.7 KB) - added by skymoo (Adam Mercer) 7 years ago.
patch-browser-demo-revert-add-copy-to-clipboard-button.diff (1.8 KB) - added by mojca (Mojca Miklavec) 7 years ago.
New patch for gtk3 +quartz
main.2.log (88.1 KB) - added by yabba (YabbaⓇ) 7 years ago.
gtk3_Portfile.diff (592 bytes) - added by jjstickel (Jonathan Stickel) 7 years ago.

Download all attachments as: .zip

Change History (23)

Changed 7 years ago by skymoo (Adam Mercer)

Attachment: main.log added

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: gtk3: patches fail to applygtk3 +quartz: patches fail to apply

comment:2 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:3 Changed 7 years ago by mojca (Mojca Miklavec)

Judging from this commit I assume that the patch needs to be adapted, even though it would be better to submit a proper patch (or at least bug report) upstream.

Please don't commit anything until dbevans confirms. At some point I even commented out the patch, but I'm no longer sure which one I built, with or without the patch.

Last edited 7 years ago by mojca (Mojca Miklavec) (previous) (diff)

Changed 7 years ago by mojca (Mojca Miklavec)

New patch for gtk3 +quartz

Changed 7 years ago by yabba (YabbaⓇ)

Attachment: main.2.log added

comment:4 Changed 7 years ago by yabba (YabbaⓇ)

I attached the log. I checked if I got the patch. Yes, the patch from mojca (Mojca Miklavec) has been applied to my system.

The update still stops with:

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
The following installed ports are outdated:
gtk3                           3.22.25_0 < 3.22.26_0     
--->  Computing dependencies for gtk3.
--->  Applying patches to gtk3
--->  Applying nawk.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.26" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/gnome/gtk3/files/nawk.patch'
patching file configure
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file configure.rej
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.26" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/gnome/gtk3/files/nawk.patch'
Exit code: 1
Error: Failed to patch gtk3: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
--->  Computing dependencies for gtk3.
--->  Applying patches to gtk3
--->  Applying nawk.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.26" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/gnome/gtk3/files/nawk.patch'
patching file configure
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file configure.rej
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.26" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/gnome/gtk3/files/nawk.patch'
Exit code: 1
Error: Failed to patch gtk3: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: No ports matched the given expression

Last edited 7 years ago by yabba (YabbaⓇ) (previous) (diff)

comment:5 Changed 7 years ago by raimue (Rainer Müller)

After you edited the patches in the files directory next to the Portfile, you need to sudo port clean gtk3 before trying again to remove the previous build attempt.

comment:6 Changed 7 years ago by springermac (Jonathan Springer)

Cc: springermac added

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

Cc: MarcusCalhoun-Lopez added

comment:8 Changed 7 years ago by neilt (Neil Tiffin)

Cc: neilt added

comment:9 Changed 7 years ago by mopihopi

Cc: mopihopi added

comment:10 Changed 7 years ago by jjstickel (Jonathan Stickel)

Cc: jjstickel added

comment:11 Changed 7 years ago by Polyergic (Shad Sterling)

After downloading @mojca's patched patch, I got the update installed with these commands:

sudo cp $HOME/Downloads/patch-browser-demo-revert-add-copy-to-clipboard-button.diff /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/gnome/gtk3/files/patch-browser-demo-revert-add-copy-to-clipboard-button.diff
sudo port clean gtk3
sudo port install gtk3 +quartz

What can I do to get this update into the distribution?

comment:12 Changed 7 years ago by Polyergic (Shad Sterling)

Cc: Polyergic added

comment:13 Changed 7 years ago by olupton (Olli Lupton)

Cc: olupton added

comment:14 Changed 7 years ago by p-bro

Cc: p-bro added

comment:15 Changed 7 years ago by gthb (Gunnlaugur Thor Briem)

Yep, works for me too with that revised patch.

comment:16 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

The changes to the patchfile look straightforward enough. Probably safe to commit.

comment:17 Changed 7 years ago by mojca (Mojca Miklavec)

I double checked and the port compiles just fine without that patch. That is, if I remove

patchfiles-append patch-browser-demo-revert-add-copy-to-clipboard-button.diff

from the Portfile. I assume that this has been fixed upstream in the meantime and that the comment:

# icon browser demo: revert addition of copy-to-clipboard button
# https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=51b1445cd1b1df7abb8f11a0cd9bcef9a3e41825
# breaks quartz build due to unconditional use of X11 API
# introduced in 3.22.16

might no longer be relevant.

But that's a bit of guessing. The comment says: breaks quartz build.

Changed 7 years ago by jjstickel (Jonathan Stickel)

Attachment: gtk3_Portfile.diff added

comment:18 Changed 7 years ago by jjstickel (Jonathan Stickel)

As per Mojca's observation, simply not applying the patch "patch-browser-demo-revert-add-copy-to-clipboard-button.diff" seems to fix the problem. I am able to run gtk3-demo and a couple other ports that use gtk3. I've attached a patch to the Portfile.

comment:19 Changed 7 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

In 2a98b06e7f181029f14eee836b2c7ff8d44681a6/macports-ports:

gtk3: remove outdated patch for +quartz

Closes: #55275

Note: See TracTickets for help on using tickets.