BobBuildTool/basement

glibc patch file not working

Closed this issue · 3 comments

diff -Nurp a/po/Makefile b/po/Makefile
--- a/po/Makefile 2015-08-05 08:42:21.000000000 +0200
+++ b/po/Makefile 2016-05-08 21:33:15.939665392 +0200
@@ -50,7 +50,7 @@ generated += $(ALL_LINGUAS:%=%.mo)
include ../Rules
# Generate the translation template from all the source files.
-libc.pot: pot.header libc.pot.files
+libc.pot: pot.header $(objpfx)libc.pot.files
@rm -f $@.new
set `date -R`; disp="$$6"; \
sed -e 's/VERSION/$(version)/' \
@@ -74,7 +74,7 @@ po-sed-cmd = \
'/\/tst-/d;$(foreach S,[ch] cxx sh ksh bash,$(subst .,\.,/.$S\(.in\)*$$/p;))'
# Omit tst-* files, and get only files with the given suffixes.
-libc.pot.files: FORCE
+$(objpfx)libc.pot.files: FORCE
$(..)scripts/list-sources.sh .. | sed -n $(po-sed-cmd) > $@.new
mv -f $@.new $@

i have no idea why, but this patch file doesn't works for me.

+ patch -p 1 -F 0 -f
patching file po/Makefile
Hunk #1 FAILED at 50.
Hunk #2 FAILED at 74.
2 out of 2 hunks FAILED -- saving rejects to file po/Makefile.rej
++ bob_handle_error 1

it seems like the compat one is different to the non-compat one. the non-compat-one fails currently!

i recreated the patch file, this is the diff:

index 2acfc7b..3bc575a 100644
--- a/recipes/libs/compat/glibc/0001-glibc-po-files-out-of-tree.diff
+++ b/recipes/libs/compat/glibc/0001-glibc-po-files-out-of-tree.diff
@@ -1,20 +1,20 @@
-diff -Nurp a/po/Makefile b/po/Makefile
---- a/po/Makefile      2022-04-08 12:26:47.970319042 +0200
-+++ b/po/Makefile      2022-04-08 12:29:53.611030632 +0200
-@@ -50,7 +50,7 @@ generated += $(ALL_LINGUAS:%=%.mo)
+--- workspace/po/Makefile      2018-02-01 17:17:18.000000000 +0100
++++ workspace/po/Makefile      2022-06-03 11:43:13.540082700 +0200
+@@ -50,7 +50,7 @@
  include ../Rules
-
+
  # Generate the translation template from all the source files.
 -libc.pot: pot.header libc.pot.files
 +libc.pot: pot.header $(objpfx)libc.pot.files
        @rm -f $@.new
        set `date -R`; disp="$$6"; \
        sed -e 's/VERSION/$(version)/' \
-@@ -74,7 +74,7 @@ po-sed-cmd = \
+@@ -74,7 +74,7 @@
    '/\/tst-/d;$(foreach S,[ch] cxx sh ksh bash,$(subst .,\.,/.$S\(.in\)*$$/p;))'
-
+
  # Omit tst-* files, and get only files with the given suffixes.
 -libc.pot.files: FORCE
 +$(objpfx)libc.pot.files: FORCE
        $(..)scripts/list-sources.sh .. | sed -n $(po-sed-cmd) > $@.new
        mv -f $@.new $@
+
diff --git a/recipes/libs/glibc/0001-glibc-po-files-out-of-tree.diff b/recipes/libs/glibc/0001-glibc-po-files-out-of-tree.diff
index 74ec9a8..3bc575a 100644
--- a/recipes/libs/glibc/0001-glibc-po-files-out-of-tree.diff
+++ b/recipes/libs/glibc/0001-glibc-po-files-out-of-tree.diff
@@ -1,7 +1,6 @@
-diff -Nurp a/po/Makefile b/po/Makefile
---- a/po/Makefile      2015-08-05 08:42:21.000000000 +0200
-+++ b/po/Makefile      2016-05-08 21:33:15.939665392 +0200
-@@ -50,7 +50,7 @@ generated += $(ALL_LINGUAS:%=%.mo)
+--- workspace/po/Makefile      2018-02-01 17:17:18.000000000 +0100
++++ workspace/po/Makefile      2022-06-03 11:43:13.540082700 +0200
+@@ -50,7 +50,7 @@
  include ../Rules

  # Generate the translation template from all the source files.
@@ -10,7 +9,7 @@ diff -Nurp a/po/Makefile b/po/Makefile
        @rm -f $@.new
        set `date -R`; disp="$$6"; \
        sed -e 's/VERSION/$(version)/' \
-@@ -74,7 +74,7 @@ po-sed-cmd = \
+@@ -74,7 +74,7 @@
    '/\/tst-/d;$(foreach S,[ch] cxx sh ksh bash,$(subst .,\.,/.$S\(.in\)*$$/p;))'

  # Omit tst-* files, and get only files with the given suffixes.

maybe missing spaces at beginning of the line are the issue?

I don't understand what's failing here. Why is the patch not applying any more? What package is exactly failing?