You are not logged in.
1. You make any manual changes after patching.
Okay, so is it standard that after compiling the program that the config.h doesn't include the changes made to the config.def.h from the bstack patch? Am I meant to always make those changes manually to config.h? (And just to be sure I understand correctly, I should just be running makepkg -efi now to avoid re-downloading the original code?)
2. Eventually, you want to run makepkg once: the PKGBUILD is just a script to automate the build. For incremental patching, you'll need to alter the PKGBUILD between builds so as not to reapply already added patches.
Do you mean that I now just add the next patch to the prepare() function after having successfully applied one patch and then re-compile (makepkg -efi)?
For example:
prepare() {
cd $srcdir/$pkgname-$pkgver
cp $srcdir/$pkgname-$pkgver/config.def.h config.h
patch -Np1 -i "${srcdir}/dwm-bottomstack-$pkgver.diff"
patch -Np1 -i "${srcdir}/dwm-uselessgap-$pkgver.diff"
}Last edited by roisoleil (2018-12-28 04:02:23)
Offline
jasonwryan wrote:1. You make any manual changes after patching.
Okay, so is it standard that after compiling the program that the config.h doesn't include the changes made to the config.def.h from the bstack patch?
No. The patched changes will be present, you need to make manual changes not included in the patches at that point. I'm pretty sure I was clear on that.
jasonwryan wrote:2. Eventually, you want to run makepkg once: the PKGBUILD is just a script to automate the build. For incremental patching, you'll need to alter the PKGBUILD between builds so as not to reapply already added patches.
Do you mean that I now just add the next patch to the prepare() function after having successfully applied one patch and then re-compile (makepkg -efi)?
Yes, you add whatever the next patch is, and remove the previous successfully applied patch. This is obviously not a sustainable approach, it is more so you can learn how this all works. Once you get it, you can just apply all the patches at once.
Offline
roisoleil wrote:jasonwryan wrote:1. You make any manual changes after patching.
Okay, so is it standard that after compiling the program that the config.h doesn't include the changes made to the config.def.h from the bstack patch?
No. The patched changes will be present, you need to make manual changes not included in the patches at that point. I'm pretty sure I was clear on that.
Then I still am not sure why the mkpkg -fi with the PKGBUILD from my post #20 did not result in the config.h having the patched changes. The relevant lines for the bstack layouts were made to config.def.h, but not config.h. Maybe I should have run makepkg -efi instead?
Last edited by roisoleil (2018-12-28 04:22:17)
Offline
Yeah, I have no idea. But we are 28 posts in and I have lost track of what the actual issue is...
Your patches were successfully applied, it should just work. There isn't enough else going on with dwm to make it any trickier than that.
Offline
Then I still am not sure why the mkpkg -fi with the PKGBUILD from my post #20 did not result in the config.h having the patched changes.
Did you read your own PKGBUILD? Think about what those commands are doing.
In the prepare function you first copy the config.def.h to config.h, then you apply a patch that changes config.def.h. Clearly that will not result in the changes from the patch being in config.h.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
roisoleil wrote:Then I still am not sure why the mkpkg -fi with the PKGBUILD from my post #20 did not result in the config.h having the patched changes.
Did you read your own PKGBUILD? Think about what those commands are doing.
In the prepare function you first copy the config.def.h to config.h, then you apply a patch that changes config.def.h. Clearly that will not result in the changes from the patch being in config.h.
I initially (post 18) had the copy line after the patching which didn't work, and then I got confused by comment 19.
In any case, I'm able to manually edit config.h, recompile, and everything works well. So I'll mark this thread as solved.
I'll go ahead and try again with the cp line after the patch, and see if this works.
Offline
prepare in comment #20 is
prepare() {
cd $srcdir/$pkgname-$pkgver
cp $srcdir/$pkgname-$pkgver/config.def.h config.h
patch -Np1 -i "${srcdir}/dwm-bottomstack-$pkgver.diff"
}So you're creating a config.h from the unpatched config.def.h, then the patch will update config.def.h, but that change is meaningless because there's already a config.h, so the make process won't generate one. As you were told numerous times before.
Stop copying around any config files. Or iff you desire to incorporate the config.h from the AUR, use it to override config.def.h - but this might make some patches fail (because the unpatched sources differ from the patches expectations - this is a general patch issue and not resolvable, you'd then best incorporate those configs changes into a patch of your own that applies on top of your other patches)
Offline
I'll go ahead and try again with the cp line after the patch, and see if this works.
This may or may not be a good choice. But the way you arived at this choice is faulty and will get you in trouble if you continue in the same manner: do not try random things to see what works; read and understand the PKGBUILD, think about what it does, and write it in a way that makes sense to accomplish your goal.
Five minutes of thinking can save days of trial and error.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline