[pacman-dev] [PATCH] makepkg: Add --noextractonly (-E) to also download/verify source files
Because --noextract also implies to not download/verify source files, it wasn't
possible to simply do just that, without either extracting and/or building. This
option allows just that (and is therefore mostly useful with --nobuild).
Signed-off-by: Olivier Brunel
On Fri, Feb 22, 2013 at 03:03:58PM +0100, Olivier Brunel wrote:
Because --noextract also implies to not download/verify source files, it wasn't possible to simply do just that, without either extracting and/or building. This option allows just that (and is therefore mostly useful with --nobuild).
Signed-off-by: Olivier Brunel
Before the actual people that merge this get their hands on it, be careful about editing white space. this patch is much larger than it should be. -- William Giokas | KaiSforza GnuPG Key: 0x73CD09CF Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF
On 02/22/13 15:39, William Giokas wrote:
On Fri, Feb 22, 2013 at 03:03:58PM +0100, Olivier Brunel wrote:
Because --noextract also implies to not download/verify source files, it wasn't possible to simply do just that, without either extracting and/or building. This option allows just that (and is therefore mostly useful with --nobuild).
Signed-off-by: Olivier Brunel
Before the actual people that merge this get their hands on it, be careful about editing white space. this patch is much larger than it should be.
Yeah, I know it is larger, because to preserve the alignments I had to add spaces inside a few lines otherwise untouched. But I felt it was the right thing to do, since everything was aligned.
On 23/02/13 00:03, Olivier Brunel wrote:
Because --noextract also implies to not download/verify source files, it wasn't possible to simply do just that, without either extracting and/or building. This option allows just that (and is therefore mostly useful with --nobuild).
I really do not like the option name. Does --noextractonly mean it still builds? etc... How about naming what you are trying to do - i.e. "--verify". <snip>
@@ -2885,9 +2888,7 @@ mkdir -p "$srcdir" chmod a-s "$srcdir" cd_safe "$srcdir"
-if (( NOEXTRACT )); then - warning "$(gettext "Using existing %s tree")" "src/" -elif (( REPKG )); then +if (( REPKG )); then if (( ! PKGFUNC && ! SPLITPKG )) \ && { [[ ! -d $pkgdirbase ]] || dir_is_empty "$pkgdirbase"; }; then error "$(gettext "The package directory is empty, there is nothing to repackage!")" @@ -2895,11 +2896,17 @@ elif (( REPKG )); then exit 1 fi else - download_sources - check_source_integrity - extract_sources - if (( PREPAREFUNC )); then - run_prepare + if (( ! NOEXTRACT )); then + download_sources + check_source_integrity + fi + if (( NOEXTRACT || NOEXTRACTONLY )); then + warning "$(gettext "Using existing %s tree")" "src/" + else + extract_sources + if (( PREPAREFUNC )); then + run_prepare + fi fi fi
This bit would just be: else download_sources check_source_integrity + (( VERIFY )) && return 0 extract sources Allan
On 02/23/13 01:31, Allan McRae wrote:
On 23/02/13 00:03, Olivier Brunel wrote:
Because --noextract also implies to not download/verify source files, it wasn't possible to simply do just that, without either extracting and/or building. This option allows just that (and is therefore mostly useful with --nobuild).
I really do not like the option name. Does --noextractonly mean it still builds? etc...
That would be yes, unless --nobuild was used. The option name was meant as "no extract only, as opposed to --noextract which also implies no download & no verify" But I get your point, yes.
How about naming what you are trying to do - i.e. "--verify".
You mean it like a --verify-only, that would imply both --noextract (except with still download & verify of course) and --nobuild (and then, using either of those alongside --verify-only would do nothing/be ignored) ? Yeah, that might be better. I think --verifyonly might be better than just --verify though (because the latter can sound like without it there's no verify done, which obviously isn't the case) ? Also, could -E still be used as short option, or should it just not have one ? -j
<snip>
@@ -2885,9 +2888,7 @@ mkdir -p "$srcdir" chmod a-s "$srcdir" cd_safe "$srcdir"
-if (( NOEXTRACT )); then - warning "$(gettext "Using existing %s tree")" "src/" -elif (( REPKG )); then +if (( REPKG )); then if (( ! PKGFUNC && ! SPLITPKG )) \ && { [[ ! -d $pkgdirbase ]] || dir_is_empty "$pkgdirbase"; }; then error "$(gettext "The package directory is empty, there is nothing to repackage!")" @@ -2895,11 +2896,17 @@ elif (( REPKG )); then exit 1 fi else - download_sources - check_source_integrity - extract_sources - if (( PREPAREFUNC )); then - run_prepare + if (( ! NOEXTRACT )); then + download_sources + check_source_integrity + fi + if (( NOEXTRACT || NOEXTRACTONLY )); then + warning "$(gettext "Using existing %s tree")" "src/" + else + extract_sources + if (( PREPAREFUNC )); then + run_prepare + fi fi fi
This bit would just be:
else download_sources check_source_integrity + (( VERIFY )) && return 0 extract sources
Allan
On 23/02/13 11:16, jjacky wrote:
On 02/23/13 01:31, Allan McRae wrote:
On 23/02/13 00:03, Olivier Brunel wrote:
Because --noextract also implies to not download/verify source files, it wasn't possible to simply do just that, without either extracting and/or building. This option allows just that (and is therefore mostly useful with --nobuild).
I really do not like the option name. Does --noextractonly mean it still builds? etc...
That would be yes, unless --nobuild was used. The option name was meant as "no extract only, as opposed to --noextract which also implies no download & no verify" But I get your point, yes.
How about naming what you are trying to do - i.e. "--verify".
You mean it like a --verify-only, that would imply both --noextract (except with still download & verify of course) and --nobuild (and then, using either of those alongside --verify-only would do nothing/be ignored) ?
Yeah, that might be better. I think --verifyonly might be better than just --verify though (because the latter can sound like without it there's no verify done, which obviously isn't the case) ?
Also, could -E still be used as short option, or should it just not have one ?
So..., --verifyonly would imply that it only does verifying and no downloading. Lets call it --verifysource. No need for a short option. We can avoid people thinking this option must be specified to do the source verification with a good description. e.g. --verifysource Download (if needed) and verify sources only.
participants (4)
-
Allan McRae
-
jjacky
-
Olivier Brunel
-
William Giokas