mirror of
https://github.com/Jguer/yay.git
synced 2025-12-27 10:01:53 -05:00
feat(install): add --keepsrc to keep pkg/ and src/ directories (#2272)
* feat(install): add --nocleanbuild to keep pkg/ and src/ directories for AUR packages Providing this flag during installation of AUR packages allows for keeping the src/ and pkg/ directories produced my makepkg. If the user wants to delete the directories, they can either select to cleanBuild in the cleanmenu or run the installation without the --nocleanbuild flag (yay will only remove the directories if the package is rebuilt) * fix(completion): simplify description for --nocleanbuild in fish This makes the description consistent with the descriptions in the man page, --help, and zsh completion. * refactor(install): Rename --nocleanbuild to --keepsrc This naming scheme is more familiar to users since it is the name of the flag in Paru. --------- Co-authored-by: jguer <me@jguer.space>
This commit is contained in:
@@ -56,16 +56,16 @@ func TestIntegrationLocalInstall(t *testing.T) {
|
||||
}
|
||||
|
||||
wantShow := []string{
|
||||
"makepkg --verifysource --skippgpcheck -Ccf",
|
||||
"makepkg --verifysource --skippgpcheck -f -Cc",
|
||||
"pacman -S --config /etc/pacman.conf -- community/dotnet-sdk-6.0 community/dotnet-runtime-6.0",
|
||||
"pacman -D -q --asdeps --config /etc/pacman.conf -- dotnet-runtime-6.0 dotnet-sdk-6.0",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir/jellyfin-server-10.8.4-1-x86_64.pkg.tar.zst /testdir/jellyfin-web-10.8.4-1-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- jellyfin-server jellyfin-web",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir/jellyfin-10.8.4-1-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- jellyfin",
|
||||
@@ -324,14 +324,14 @@ func TestIntegrationLocalInstallNeeded(t *testing.T) {
|
||||
}
|
||||
|
||||
wantShow := []string{
|
||||
"makepkg --verifysource --skippgpcheck -Ccf",
|
||||
"makepkg --verifysource --skippgpcheck -f -Cc",
|
||||
"pacman -S --config /etc/pacman.conf -- community/dotnet-sdk-6.0 community/dotnet-runtime-6.0",
|
||||
"pacman -D -q --asdeps --config /etc/pacman.conf -- dotnet-runtime-6.0 dotnet-sdk-6.0",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
}
|
||||
|
||||
@@ -492,16 +492,16 @@ func TestIntegrationLocalInstallGenerateSRCINFO(t *testing.T) {
|
||||
}
|
||||
|
||||
wantShow := []string{
|
||||
"makepkg --verifysource --skippgpcheck -Ccf",
|
||||
"makepkg --verifysource --skippgpcheck -f -Cc",
|
||||
"pacman -S --config /etc/pacman.conf -- community/dotnet-sdk-6.0 community/dotnet-runtime-6.0",
|
||||
"pacman -D -q --asdeps --config /etc/pacman.conf -- dotnet-runtime-6.0 dotnet-sdk-6.0",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir/jellyfin-server-10.8.4-1-x86_64.pkg.tar.zst /testdir/jellyfin-web-10.8.4-1-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- jellyfin-server jellyfin-web",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir/jellyfin-10.8.4-1-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- jellyfin",
|
||||
@@ -783,12 +783,12 @@ func TestIntegrationLocalInstallWithDepsProvides(t *testing.T) {
|
||||
}
|
||||
|
||||
wantShow := []string{
|
||||
"makepkg --verifysource --skippgpcheck -Ccf",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --verifysource --skippgpcheck -f -Cc",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir/ceph-libs-bin-17.2.6-2-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- ceph-libs-bin",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir/ceph-bin-17.2.6-2-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- ceph-bin",
|
||||
@@ -910,13 +910,13 @@ func TestIntegrationLocalInstallTwoSrcInfosWithDeps(t *testing.T) {
|
||||
}
|
||||
|
||||
wantShow := []string{
|
||||
"makepkg --verifysource --skippgpcheck -Ccf",
|
||||
"makepkg --verifysource --skippgpcheck -Ccf",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --verifysource --skippgpcheck -f -Cc",
|
||||
"makepkg --verifysource --skippgpcheck -f -Cc",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir1/libzip-git-1.9.2.r166.gd2c47d0f-1-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- libzip-git",
|
||||
"makepkg --nobuild -fC --ignorearch",
|
||||
"makepkg --nobuild -f -C --ignorearch",
|
||||
"makepkg -c --nobuild --noextract --ignorearch",
|
||||
"pacman -U --config /etc/pacman.conf -- /testdir2/gourou-0.8.1-4-x86_64.pkg.tar.zst",
|
||||
"pacman -D -q --asexplicit --config /etc/pacman.conf -- gourou",
|
||||
|
||||
Reference in New Issue
Block a user