FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-07-2012, 10:41 PM
Allan McRae
 
Default asdeps flag passed from makepkg to pacman

On 08/05/12 06:49, Dan McGee wrote:
> On Mon, May 7, 2012 at 3:47 PM, Daniel Wallace
> <daniel.wallace@gatech.edu> wrote:
>> From: Daniel Wallace <daniel.wallace12@gmail.com>
>>
>> add the asdeps flag for makepkg so that it does pacman -U --asdeps for
>> when you have to make the dependencies as well because they are not in
>> the repos
>>
>> Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com>
>
> This is done unconditionally already...
>
> http://projects.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in#n511
>

To be clear, this is for installing packages with "makepkg -i", not the
automatic dependency installation done in makepkg.

That said, this idea was rejected previously
(https://bugs.archlinux.org/task/28237), but given there is a duplicate
request (https://bugs.archlinux.org/task/28673) and now a further patch,
I might reconsider...

Allan
 
Old 07-09-2012, 05:55 AM
Daniel Wallace
 
Default asdeps flag passed from makepkg to pacman

From: Daniel Wallace <daniel.wallace12@gmail.com>

add the asdeps flag for makepkg so that it does pacman -U --asdeps

Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com>
---
contrib/bash_completion.in | 6 +++---
contrib/zsh_completion.in | 1 +
doc/makepkg.8.txt | 4 ++++
scripts/makepkg.sh.in | 10 ++++++++--
4 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in
index 1b265e0..99b9559 100644
--- a/contrib/bash_completion.in
+++ b/contrib/bash_completion.in
@@ -74,9 +74,9 @@ _makepkg() {
COMPREPLY=()
_get_comp_words_by_ref cur prev
if [[ $cur = -* && ! $prev =~ ^-(-(config|help)$|w*[Chp]) ]]; then
- opts=('allsource asroot check clean config force geninteg help holdver ignorearch
- install log nobuild nocheck nocolor noconfirm nodeps noextract noprogressbar
- nosign pkg repackage rmdeps sign skipinteg source syncdeps'
+ opts=('allsource asdeps asroot check clean config force geninteg help holdver ignorearch
+ install log nobuild nocheck nocolor noconfirm nodeps noextract
+ noprogressbar nosign pkg repackage rmdeps sign skipinteg source syncdeps'
'A L R S c d e f g h i m o p r s')
_arch_ptr2comp opts
fi
diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in
index dc0a544..84ee93c 100644
--- a/contrib/zsh_completion.in
+++ b/contrib/zsh_completion.in
@@ -483,6 +483,7 @@ _makepkg_longopts=(
'--skipinteg[do not perform any verification checks on source files]'
'--skippgpcheck[Do not verify source files with PGP signatures]'
'--noconfirm[do not ask for confirmation when resolving dependencies]'
+ '--asdeps[Install packages as non-explicitly installed]'
'--noprogressbar[Do not show a progress bar when downloading files]'
)
_makepkg(){
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index 27875a3..b96d768 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -179,6 +179,10 @@ Options
(Passed to pacman) Prevent pacman from waiting for user input before
proceeding with operations.

+*--asdeps*::
+ (Passed to pacman) Install packages as non-explicitly installed (used
+ with -i / --install).
+
*--noprogressbar*::
(Passed to pacman) Prevent pacman from displaying a progress bar;
useful if you are redirecting makepkg output to file.
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index abfabdf..db95d65 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -52,6 +52,7 @@ splitpkg_overrides=('pkgver' 'pkgrel' 'epoch' 'pkgdesc' 'arch' 'url' 'license'
readonly -a packaging_options other_options splitpkg_overrides

# Options
+ASDEPS=0
ASROOT=0
CLEANUP=0
DEP_BIN=0
@@ -83,6 +84,7 @@ FORCE_VER=""

PACMAN_OPTS=

+
shopt -s extglob

### SUBROUTINES ###
@@ -1523,13 +1525,15 @@ install_package() {
msg "$(gettext "Installing %s package group with %s...")" "$pkgbase" "$PACMAN -U"
fi

+ (( ASDEPS )) && pkglist+=('--asdeps')
+
local fullver pkgarch pkg pkglist
for pkg in ${pkgname[@]}; do
fullver=$(get_full_version $pkg)
pkgarch=$(get_pkg_arch $pkg)
pkglist+=("$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}")
done
-
+
if ! run_pacman -U ${pkglist[@]}; then
warning "$(gettext "Failed to install built package(s).")"
return 0
@@ -1986,6 +1990,7 @@ usage() {
printf -- "$(gettext "These options can be passed to %s:")
" "pacman"
echo
printf -- "$(gettext " --noconfirm Do not ask for confirmation when resolving dependencies")
"
+ printf -- "$(gettext " --asdeps Install packages as non-explicitly installed")
"
printf -- "$(gettext " --noprogressbar Do not show a progress bar when downloading files")
"
echo
printf -- "$(gettext "If %s is not specified, %s will look for '%s'")
" "-p" "makepkg" "$BUILDSCRIPT"
@@ -2021,7 +2026,7 @@ OPT_LONG=('allsource' 'asroot' 'ignorearch' 'check' 'clean' 'nodeps'
'version' 'config:')

# Pacman Options
-OPT_LONG+=('noconfirm' 'noprogressbar')
+OPT_LONG+=('asdeps' 'noconfirm' 'noprogressbar')

if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
exit 1 # E_INVALID_OPTION;
@@ -2032,6 +2037,7 @@ unset OPT_SHORT OPT_LONG OPTRET
while true; do
case "$1" in
# Pacman Options
+ --asdeps) ASDEPS=1;;
--noconfirm) PACMAN_OPTS+=" --noconfirm" ;;
--noprogressbar) PACMAN_OPTS+=" --noprogressbar" ;;

--
1.7.11.1
 
Old 07-11-2012, 01:00 PM
Allan McRae
 
Default asdeps flag passed from makepkg to pacman

On 09/07/12 15:55, Daniel Wallace wrote:
> From: Daniel Wallace <daniel.wallace12@gmail.com>
>
> add the asdeps flag for makepkg so that it does pacman -U --asdeps
>
> Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com>
> ---

Push to my working branch with minor changes listed below...

> contrib/bash_completion.in | 6 +++---
> contrib/zsh_completion.in | 1 +
> doc/makepkg.8.txt | 4 ++++
> scripts/makepkg.sh.in | 10 ++++++++--
> 4 files changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in
> index 1b265e0..99b9559 100644
> --- a/contrib/bash_completion.in
> +++ b/contrib/bash_completion.in
> @@ -74,9 +74,9 @@ _makepkg() {
> COMPREPLY=()
> _get_comp_words_by_ref cur prev
> if [[ $cur = -* && ! $prev =~ ^-(-(config|help)$|w*[Chp]) ]]; then
> - opts=('allsource asroot check clean config force geninteg help holdver ignorearch
> - install log nobuild nocheck nocolor noconfirm nodeps noextract noprogressbar
> - nosign pkg repackage rmdeps sign skipinteg source syncdeps'
> + opts=('allsource asdeps asroot check clean config force geninteg help holdver ignorearch
> + install log nobuild nocheck nocolor noconfirm nodeps noextract

trailing whitespace

> + noprogressbar nosign pkg repackage rmdeps sign skipinteg source syncdeps'
> 'A L R S c d e f g h i m o p r s')
> _arch_ptr2comp opts
> fi
> diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in
> index dc0a544..84ee93c 100644
> --- a/contrib/zsh_completion.in
> +++ b/contrib/zsh_completion.in
> @@ -483,6 +483,7 @@ _makepkg_longopts=(
> '--skipinteg[do not perform any verification checks on source files]'
> '--skippgpcheck[Do not verify source files with PGP signatures]'
> '--noconfirm[do not ask for confirmation when resolving dependencies]'
> + '--asdeps[Install packages as non-explicitly installed]'
> '--noprogressbar[Do not show a progress bar when downloading files]'
> )
> _makepkg(){
> diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
> index 27875a3..b96d768 100644
> --- a/doc/makepkg.8.txt
> +++ b/doc/makepkg.8.txt
> @@ -179,6 +179,10 @@ Options
> (Passed to pacman) Prevent pacman from waiting for user input before
> proceeding with operations.
>
> +*--asdeps*::
> + (Passed to pacman) Install packages as non-explicitly installed (used
> + with -i / --install).
> +
> *--noprogressbar*::
> (Passed to pacman) Prevent pacman from displaying a progress bar;
> useful if you are redirecting makepkg output to file.
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index abfabdf..db95d65 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -52,6 +52,7 @@ splitpkg_overrides=('pkgver' 'pkgrel' 'epoch' 'pkgdesc' 'arch' 'url' 'license'
> readonly -a packaging_options other_options splitpkg_overrides
>
> # Options
> +ASDEPS=0
> ASROOT=0
> CLEANUP=0
> DEP_BIN=0
> @@ -83,6 +84,7 @@ FORCE_VER=""
>
> PACMAN_OPTS=
>
> +

removed.

> shopt -s extglob
>
> ### SUBROUTINES ###
> @@ -1523,13 +1525,15 @@ install_package() {
> msg "$(gettext "Installing %s package group with %s...")" "$pkgbase" "$PACMAN -U"
> fi
>
> + (( ASDEPS )) && pkglist+=('--asdeps')
> +
> local fullver pkgarch pkg pkglist

The local declaration of pkglist should be above the added line...

> for pkg in ${pkgname[@]}; do
> fullver=$(get_full_version $pkg)
> pkgarch=$(get_pkg_arch $pkg)
> pkglist+=("$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}")
> done
> -
> +

whitespace.

> if ! run_pacman -U ${pkglist[@]}; then
> warning "$(gettext "Failed to install built package(s).")"
> return 0
> @@ -1986,6 +1990,7 @@ usage() {
> printf -- "$(gettext "These options can be passed to %s:")
" "pacman"
> echo
> printf -- "$(gettext " --noconfirm Do not ask for confirmation when resolving dependencies")
"
> + printf -- "$(gettext " --asdeps Install packages as non-explicitly installed")
"
> printf -- "$(gettext " --noprogressbar Do not show a progress bar when downloading files")
"
> echo
> printf -- "$(gettext "If %s is not specified, %s will look for '%s'")
" "-p" "makepkg" "$BUILDSCRIPT"
> @@ -2021,7 +2026,7 @@ OPT_LONG=('allsource' 'asroot' 'ignorearch' 'check' 'clean' 'nodeps'
> 'version' 'config:')
>
> # Pacman Options
> -OPT_LONG+=('noconfirm' 'noprogressbar')
> +OPT_LONG+=('asdeps' 'noconfirm' 'noprogressbar')
>
> if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
> exit 1 # E_INVALID_OPTION;
> @@ -2032,6 +2037,7 @@ unset OPT_SHORT OPT_LONG OPTRET
> while true; do
> case "$1" in
> # Pacman Options
> + --asdeps) ASDEPS=1;;
> --noconfirm) PACMAN_OPTS+=" --noconfirm" ;;
> --noprogressbar) PACMAN_OPTS+=" --noprogressbar" ;;
>
>
 

Thread Tools




All times are GMT. The time now is 02:26 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org