You are not logged in.

#1 2023-08-01 02:03:36

raihan
Member
Registered: 2023-01-31
Posts: 18

[Solved] rebuild package installed by yay after changing the config

I have installed dwm via yay.
And when I see the dwm directory

$ ls ~/.cache/yay/dwm 
#It shows below files
$PKGBUILD  config.h  dwm-6.4-1-x86_64.pkg.tar.zst  dwm-6.4.tar.gz  dwm.desktop  dwm.install

Now I want to change the config.h file and rebuild the package.

How would I do that?

Last edited by raihan (2023-08-03 18:24:54)

Offline

#2 2023-08-01 02:15:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] rebuild package installed by yay after changing the config

Two steps:

1. Build this package: `makepkg -efi`

2. Prevent yourself from much future suffering: `pacman -Rsn yay`

Seriously, get rid of yay, now.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-08-01 02:49:35

raihan
Member
Registered: 2023-01-31
Posts: 18

Re: [Solved] rebuild package installed by yay after changing the config

`makepkg -efi` says this error

==> Making package: dwm 6.4-1 (Tue Aug  1 02:47:00 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
/home/raihan/.cache/yay/dwm/PKGBUILD: line 28: cd: /home/raihan/.cache/yay/dwm/src/dwm-6.4: No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...
[ble: exit 4]

And what is the alternative of yay ?

Last edited by raihan (2023-08-01 02:52:03)

Offline

#4 2023-08-01 02:53:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] rebuild package installed by yay after changing the config

That's in part because I don't really know what yay has done in that directory previously (and because I didn't look close enough at the `ls` output).  But more importantly, it's also in part because you also don't know what yay does.  Hence the advice to get rid of it.  Then the actual solution would come from reading the man page for `makepkg` at least to understand the three flags I suggested using so you would see which one to remove.

The alternative to using yay is just not using yay.

How did you install yay itself?

Last edited by Trilby (2023-08-01 02:55:49)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2023-08-01 08:32:06

raihan
Member
Registered: 2023-01-31
Posts: 18

Re: [Solved] rebuild package installed by yay after changing the config

Now I have removed `yay` from my machine .
Then cloned the dwm-git from aur.
Then made some change and  built .
Later symlinked to /usr/bin/.
And its going.
Also read the makepkg man.

Oh thanks. I think untill there is need I am not going to use yay.

Last edited by raihan (2023-08-01 08:32:42)

Offline

#6 2023-08-01 12:21:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] rebuild package installed by yay after changing the config

raihan wrote:

Later symlinked to /usr/bin/.

What??  Why?  What did you symlink exactly?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-08-03 18:23:39

raihan
Member
Registered: 2023-01-31
Posts: 18

Re: [Solved] rebuild package installed by yay after changing the config

I haven't notice ,when I was building dwm, automatically it goes to /usr/local/bin/dwm . Today I saw this . smile

Offline

#8 2023-08-03 22:06:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] rebuild package installed by yay after changing the config

So you built it manually rather than using makepkg as advised here.  That's a bad idea.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2023-08-07 04:46:39

raihan
Member
Registered: 2023-01-31
Posts: 18

Re: [Solved] rebuild package installed by yay after changing the config

why building manually is bad idea?

Offline

#10 2023-08-07 09:04:48

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,212

Re: [Solved] rebuild package installed by yay after changing the config

1. Installing is harder
2. Uninstalling is harder
3. Upgrading is harder
4. Building is also harder
5. managing repo dependencies is easy
6. It might be overwriten by pacman
7. You'll from forget which files are installed and also overwrite them
8. The ABS is quite neat and easy to use



How to do it via the AUR:
'git clone https://aur.archlinux.org/dwm.git
cd dwm
editor config.h
makepkg -sifc'

Last edited by jl2 (2023-08-07 09:19:28)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#11 2023-08-07 12:07:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] rebuild package installed by yay after changing the config

...
9. You have to know how to properly build / install the software or else you end up with it in /usr/local requiring silly symlinks
10. You end up making silly symlinks!


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2023-08-07 20:06:10

raihan
Member
Registered: 2023-01-31
Posts: 18

Re: [Solved] rebuild package installed by yay after changing the config

Ok. Got it.
I was in dwm directory after cloning.
Then try to install with makepkg but somehow failed and then tried to build it manually.

Next time I'll be more carefull. And  yes! garatefull to both of you.

I love this distro for its minimalism. And day by day loving the way of "do it yourself".
Though it's comparatively harder to configure the machine as base workplace ( web developer) since ubuntu was my previous distro, but now i know my machine much better and its crystal clear.

Last edited by raihan (2023-08-07 20:06:54)

Offline

#13 2023-08-07 21:50:03

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,358
Website

Re: [Solved] rebuild package installed by yay after changing the config

Mod note: Moving to AUR issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB