You are not logged in.
Pages: 1
Hello. I wanted to patch scrollback into suckless terminal from the AUR. I followed the guide here: https://wiki.archlinux.org/index.php/Patching_packages
I'm not really sure why, but makepkg fails in prepare() function.
patching file st.c
Hunk #2 FAILED in 43.
...
1 out of 21 hunks FAILED -- saving rejects to file st.c.rej
patching file st.h
==> ERROR: A failure occurred in prepare().
Aborting...I'm not sure what to do, could anyone please help. I tried looking into the rejects file, but what am I supposed to do with it, anyway.
Also, my PKGBUILD prepare function:
prepare() {
# user is supposed to maintain config.h him/herself
cd $srcdir/$pkgname-$pkgver
patch --strip=1 --input=$srcdir/st-scrollback-20190331-21367a9.diffLast edited by kibartas (2019-04-11 13:12:13)
Offline
Which st source are you using? Where did you get the patch? Is the patch for the same vesion you are patching? What's in the rejected file? Why aren't you just using the st-scrollback-git package already available in the aur?
Why am I asking so many questions?
EDIT: I just glanced at your previous threads - you seem to have a habbit of abandoning threads as soon as anyone tries offering any help. This is a bit demoralizing to would-be helpers. Please break that habbit.
Last edited by Trilby (2019-04-11 13:33:06)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Please provide the patch you are trying to apply and the content of st.c.rej.
Edit: Ninja'd.
Last edited by schard (2019-04-11 13:32:19)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Which st source are you using? Where did you get the patch? Is the patch for the same vesion you are patching? What's in the rejected file? Why aren't you just using the st-scrollback-git package already available in the aur?
I got st from https://aur.archlinux.org/packages/st/
The patch I got from the st webpage https://st.suckless.org/patches/scrollback/
The rejected file content:
--- st.c
+++ st.c
@@ -43,6 +44,9 @@
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
#define ISDELIM(u) (u && wcschr(worddelimiters, u))
+#define TLINE(y) ((y) < term.scr ? term.hist[((y) + term.histi - \
+ term.scr + HISTSIZE + 1) % HISTSIZE] : \
+ term.line[(y) - term.scr])
enum term_mode {
MODE_WRAP = 1 << 0,About the version: I'm not sure? I mean, the patch just has the date. The four patches which I could apply are
st-scrollback-0.7.diff
st-scrollback-0.8.diff
st-scrollback-0.8.1.diff
st-scrollback-20190331-21367a0.diff
My st version is 0.8.2 though. Does that mean that this patch doesn't exist for the version of st I'm using?
Not sure about the last one, could you elaborate?
Quick edit: I'm trying to apply the st-scrollback-20190331-21367a0.diff patch.
Last edited by kibartas (2019-04-11 13:53:00)
Offline
You might be more lucky w/ st-scrollback-0.8.1.diff - st-scrollback-20190331-21367a0.diff should™ apply to the current git master (though I didn't try)
Offline
You might be more lucky w/ st-scrollback-0.8.1.diff - st-scrollback-20190331-21367a0.diff should™ apply to the current git master (though I didn't try)
st-scrollback-0.8.1.diff throws the same error
==> ERROR: A failure occured in prepare().
Aborting...Offline
With the same patch rejection??
Offline
With the same patch rejection??
patching file st.c
Hunk #2 succeeded at 43 with fuzz 2 (offset -1 lines).
Hunk #3 succeeded at 121 (offset -4 lines).
Hunk #4 succeeded at 191 (offset -4 lines).
Hunk #5 succeeded at 434 (offset -4 lines).
Hunk #6 succeeded at 546 (offset -4 lines).
Hunk #7 succeeded at 561 (offset -4 lines).
Hunk #8 succeeded at 589 (offset -4 lines).
Hunk #9 succeeded at 627 (offset -4 lines).
Hunk #10 succeeded at 856 (offset 7 lines).
Hunk #11 succeeded at 1070 (offset 7 lines).
Hunk #12 succeeded at 1130 (offset 7 lines).
Hunk #13 succeeded at 1195 (offset 7 lines).
Hunk #14 succeeded at 1360 (offset 7 lines).
Hunk #15 succeeded at 1797 (offset 8 lines).
Hunk #16 succeeded at 2303 (offset -14 lines).
Hunk #17 succeeded at 2316 (offset -14 lines).
Hunk #18 succeeded at 2535 (offset -14 lines).
Hunk #19 succeeded at 2572 (offset -14 lines).
Hunk #20 succeeded at 2637 (offset -14 lines).
Hunk #21 succeeded at 2658 (offset -14 lines).
patching file st.h
Hunk #1 FAILED at 80.
1 out of 1 hunk FAILED -- saving rejects to file st.h.rej
==> ERROR: A failure occurred in prepare().I should also note, that another patch (st-clipboard) patched normally. It has the same version as does the terminal, though.
Edit: st.h.rej content
--- st.h
+++ st.h
@@ -80,6 +80,8 @@ void die(const char *, ...);
void redraw(void);
void draw(void);
+void kscrolldown(const Arg *);
+void kscrollup(const Arg *);
void iso14755(const Arg *);
void printscreen(const Arg *);
void printsel(const Arg *);Last edited by kibartas (2019-04-11 20:03:29)
Offline
Either apply the changes yourself manually, or just use the -git source for which the patch was written.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Different reject, seems no available patch version is compatible w/ 0.8.2
You could build the git master of st, though. Or add the two function declarations from the patch by hand (the "iso14755" is gone, thus likely the patch failure. printscreen and printsel are still there, though.)
Edit: Parrot ninja'd
Last edited by seth (2019-04-11 20:12:31)
Offline
I thought about changing my avatar to this, though I cant find any listing of permissions to reuse the image.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Seems lifted from https://yt3.ggpht.com/a-/AAuE7mCNCdlNI3 … ff-rj-k-no - there's a signature on the lower right, but that could mean anything :-(
Offline
Thanks guys! Solved it by applying the patch manually.
Last edited by kibartas (2019-04-14 22:03:35)
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline
Pages: 1