Enable downloading build files using git#346
Enable downloading build files using git#346markusgrosser wants to merge 3 commits intofosskers:masterfrom
Conversation
This commit adds a flag telling aura to use git clone to download PKGBUILDs for building packages and adds a corresponding setting. Note that this does not actually add said functionality to aura, but only the flag to use as a baseline for possible implementations (using either CLI or calling libgit directly).
When the --use-git/-g flag is given, use the clone functionality from libgit2 to fetch build files, instead of downloading a tarball.
|
If we're going to do this, let's just make it the default. |
|
@fosskers I would have to agree. All the AUR packages are going to be in a git repo anyway. It would support better downloading too. |
Aura now always downloads build files using git. This removes the -g/--use-git flag.
|
How does this affect |
|
@markusgrosser , I just checked Hackage and there are quite a few git packages. What was the motivation for choosing the one you did? |
|
The main reasons were feature-completeness and documentation, in which gitlib was (and still is) sadly lacking. libgit (not to be confused with libgit2 which is the C library) might be an alternative, but it's only a wrapper around the git executable, whereas I personally preferred a "native" implementation. I didn't see hit when I initially searched for a git library, but it seems like a good alternative, which I'll definitely look into. It doesn't support cloning though, so that'll probably have to be done by calling Regarding |
I agree, that's the end result of what |
Not sure how this is achieved using hlibgit2, but on the command line you can use the --depth argument to control the amount of history that's fetched. E.g. |
|
Impressive work on Aura 2.0! The wiki entry for aura should probably be updated... |
|
Or I'll wait until the AUR pkgver is bumped: #489 |
|
The README has been updated, but both Aura's wiki entry on the Arch wiki and the AUR helpers chart need to be updated. |
This adds a flag that enables downloading of build files (PKGBUILD, .install etc.) using git, which was made possible with AUR4.
While this currently doesn't give any benefit over the old method of downloading a tarball*, it is intended to serve as a baseline for possible future changes, like using git for diffs.
It also adds hlibgit2 as a dependency, which currently doesn't have an AUR package. I'm willing to create and maintain one (as well as dependencies), should this get merged.
As a useless side effect, this makes aura the first AUR Helper to have all features in the AUR Helper comparison table.
*In fact, this just downloads more data since it needs to fetch the complete history.