Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install the package with makepkg and run a command #33

Merged
merged 3 commits into from
Mar 18, 2023

Conversation

susurri
Copy link
Contributor

@susurri susurri commented Mar 16, 2023

add a feature to run a command after installing the package, which can be used to make sure the package can be installed and a command in the package works.

- add base-devel package which is required to do makepkg in many packages
- use yay-bin to install dependencies
- makepkg -si to install the package
- run command to make sure the installed package works well
build.sh Outdated
Comment on lines 98 to 100
git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si --noconfirm
cd /tmp/local-repo/
grep -E 'depends' .SRCINFO | cut -f 3 -d ' '| sed -e 's/://' | xargs yay -S --noconfirm
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is yay necessary? Why can't you execute makepkg -si on the current PKGBUILD directly?

Copy link
Contributor Author

@susurri susurri Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay is used to install dependencies. Pacman cannot resolve dependencies found only in the AUR.

@KSXGitHub
Copy link
Owner

I am reluctant to merge this PR in this current form for the following reasons:

  1. This PR adds another required dependency that is base-devel, increase complexity, increase install time, and increase probability of breakage.
  2. This PR adds implicit dependency on yay interface, which isn't guaranteed to be stable.
  3. The use of grep is error prone. It relies on .SRCINFO to not have depends at the wrong place, which isn't guaranteed.
  4. This is not general enough. Not all use cases involve installing the package. Not all packages require installing additional dependencies. Not all packages require installing AUR dependencies.

My suggestions:

  1. Rename run_command to post_processing or something similar.
  2. It is the responsibility of the user to makepkg -si their own package should it is required.
  3. It is the responsibility of the user to install yay for themselves should yay is required.

@KSXGitHub KSXGitHub merged commit 063daf7 into KSXGitHub:master Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants