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

Don't clone VCS clones over and over again #462

Closed
tsdh opened this issue Sep 27, 2017 · 9 comments · Fixed by #598
Closed

Don't clone VCS clones over and over again #462

tsdh opened this issue Sep 27, 2017 · 9 comments · Fixed by #598

Comments

@tsdh
Copy link

tsdh commented Sep 27, 2017

I've noticed that aura -Ayu --devel -xalways creates a new bare clone somewhere below /var/cache/pacman/pkg/ which seems to be deleted after the package has been built and installed. Obviously, when you install a VCS package, you are interested in frequent updates and don't want to clone the complete repository every time.

So is there a way not to delete the clones so that a package re-install will just run git pull (or whatever version control tool) in the existing clone instead of cloning anew?

@fosskers
Copy link
Owner

fosskers commented Oct 7, 2017

This would be ideal, but hasn't been implemented yet.

@fosskers fosskers added the wont-fix This request, etc., won't be implemented. label Jul 4, 2018
@fosskers fosskers closed this as completed Jul 4, 2018
@hazelweakly
Copy link

Just out of curiosity, why is this wont-fix, @fosskers? It's something I sorely miss. Especially if I'm updating 25+ git packages and after building every single one from scratch, only 2 actually end up being installed due to the rest already being up to date.

@fosskers
Copy link
Owner

fosskers commented Jul 16, 2018

Oh, that sounds annoying. Luckily now there's a feature in the soon-to-be-released Aura 2 (i.e. the changes are already in master) that won't rebuild packages that already have their exact version in the cache. That should solve your immediate problem of build time being wasted.

A quick test on one of my own -git packages didn't work, so I will look into that and get back to you.

@fosskers
Copy link
Owner

fosskers commented Jul 16, 2018

Nevermind, it was a anomaly of me having the most recent version installed, yet somehow that wasn't present in my cache! So, everything does actually work as expected - if you do a aura -Au --devel, all your *-git-like packages will be queued for an update, but they won't be rebuilt if you already have the most recent version as reported by the AUR.

You can override this and force a rebuild with --force.

@tsdh
Copy link
Author

tsdh commented Jul 25, 2018

@fosskers Well, still just the repeated cloning might take a while. For example, consider you have a package cloning a custom linux kernel tree.

What's the problem with just keeping the checkouts and updating them instead of cloning anew? Yaourt has this feature for example. There you have to define some VCSDIR or something, and if that exists it'll place checkouts there and update them if they already exist.

@fosskers
Copy link
Owner

fosskers commented Jul 25, 2018

If you're already up-to-date, nothing will be cloned. If you're indeed installing a new version, it does git clone --depth 1 to grab the current form of all the files, but avoid pulling the entire history. Is that still unreasonably long?

@tsdh
Copy link
Author

tsdh commented Oct 24, 2018

@fosskers I guess we have a different opinion what up-to-date means in the context of a VCS-based package.

  • In your view, I'm up-to-date when the version of the installed package matches the latest version available in the AUR.
  • In my view, I'm up-to-date when the package is built with the latest upstream sources, so some-app-git-1 from yesterday and some-app-git-1 from today might differ.

Therefore, I always use --force because there could be some new commits upstreams. With yaourt, if you configure that VCS checkouts are not deleted, it'll run a git pull (or whatever) in there, and only rebuild if there is a new commit on the branch. Else it tells you that you are really up-to-date.
With aura, I can't even tell if a forced build is different from a previous build.

@fosskers
Copy link
Owner

It's true that Aura doesn't currently manage / save git-based code sources. For the time being, I'll reopen this.

@fosskers fosskers reopened this Oct 24, 2018
@fosskers fosskers removed the wont-fix This request, etc., won't be implemented. label Oct 24, 2018
@fosskers fosskers linked a pull request May 15, 2020 that will close this issue
@fosskers
Copy link
Owner

Thanks for your patience, this will be included in the upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants