rmarquis / pacaur

[unmaintained] An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
796 stars 113 forks source link

Revert clean existing build before extraction #745

Closed chetgurevitch closed 7 years ago

chetgurevitch commented 7 years ago

ref https://github.com/rmarquis/pacaur/issues/714 ref https://github.com/Foxboron/PKGBUILDS/pull/2

The original reason for cleaning the working directory was an issue with auracles packaging rather than meson itself (incremental builds are actually one of mesons main features), so I think it'd be appropriate to revert this change.

rmarquis commented 7 years ago

I see. This particular "fix" was indeed due to meson, so if that can be avoided this is good news. I'll revert this once auracle PKGBUILD is fixed.

chetgurevitch commented 7 years ago

Managed to get this behavior changed for the next release of meson, it'll just return 0 and continue. Didn't get a response back from auracle's maintainer but it won't matter soon so I just deleted the comment. I've put up a temporary auracle package but I don't expect the next meson release to be more than a couple weeks away anyways.

rmarquis commented 7 years ago

Thank you for your effort to get this fixed upstream! I'll merge once the patched meson lands in the repo.

chetgurevitch commented 7 years ago

Hi, I took another look at this since the new meson version landed in the repos but I've got some concerns and don't think it should be merged as-is. My current understanding is that the src directory gets wiped by makepkg -sefc anyways once the build is complete unless the user manually builds the package in pacaur's cache directory, the build fails, or it's canceled by the user before completion. It's not clear to me if the issues builiding auracle were due to one of those scenarios or if there's some other case where build files were being left behind, like rebuilding an up-to-date vcs package.

If rebuilding up-to-date vcs packages did/would leave the build files then this change would still speed up rebuilds of existing versions for packages like auracle, but doing so is rarely necessary and preserving the src directory between version updates is where most of the improvement would be found really.

rmarquis commented 7 years ago

Hi,

I've just had a closer took to this, both with the old meson 0.42.0 and the new 0.42.1 version and using the current flags (using makepkg -odC then makepkg -sefc).

I think you are right: both the -C and -cactually have the same effect. A quick look at makepkg source code reveals that indeed $srcdir is removed with -c too (using pacman-git here, but I believe this is also true for current stable pacman).

Your upstream patch was indeed necessary to fix incremental build with meson, but now I need to check if it is safe to remove both the -C and -c makepkg flags in order to make full use of this change and speed up the operation (in the case of auracle, the cloning operation of the json lib).

rmarquis commented 7 years ago

I traced back the --clean / -c addition to b92d015b3c4974d9c53db18dacc676a072be563b as part of #374. This is basically necessary for the diff viewing feature.

I am not sure if that can be removed safely, nor if that is really desired either. Ultimately, I wonder if it isn't the auracle PKGBUILD that is a very edge case, with the cloning of a lib instead of using it the native dependency. Auracle is still in early development with its build system quickly put together, so this might change in the future.

The -C flag seems now at best redundant, and should be removed. I haven't noticed any issue with VCS package incremental updates (at least when SRCDEST is set), so I'll merge your request now, and we'll see if further optimizations can be done.