[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (c3c12e1970e13542961b0dee1f41f5a4f70f989e)

Ladislav Hagara ladislav.hagara at unob.cz
Thu Dec 30 22:18:41 EST 2010


Dne 30.12.2010 14:45, Jaka Kranjc napsal(a):
> GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx at sourcemage.org>:
> 
>  ChangeLog                          |    1 +
>  etc/sorcery/config                 |    8 +-------
>  var/lib/sorcery/modules/libsorcery |   31 +++++++++++++++++++++++++++++++
>  3 files changed, 33 insertions(+), 7 deletions(-)
> 
> New commits:
> commit c3c12e1970e13542961b0dee1f41f5a4f70f989e
> Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
> 
>     config, libsorcery: be a bit more smart about setting the pager #15793
>     (since the way the grimoire handles it has changed)
>     based on a patch by PyroBor
> 
> diff --git a/ChangeLog b/ChangeLog
> index 29c5e03..3dd8f0f 100755
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,6 +1,7 @@
>  2010-12-30 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
>  	* libtrack, common: newer installwatch has a different log variable #13873
>  	* libsummon: skip some more files in source_sanity
> +	* config, libsorcery: be a bit more smart about setting the pager #15793
>  
>  2010-10-19 Bor Kraljič <pyrobor at ver.si>
>  	* libsummon: moved sanity check of source to right after download (#15886)
> diff --git a/etc/sorcery/config b/etc/sorcery/config
> index 20d92c2..1a808f0 100755
> --- a/etc/sorcery/config
> +++ b/etc/sorcery/config
> @@ -68,13 +68,6 @@ FORCE_BASESYSTEM_DEPENDS=${FORCE_BASESYSTEM_DEPENDS:-off}
>  
>   URL_HTTP_FTP_TIMEOUT=${URL_HTTP_FTP_TIMEOUT:=90}
>  
> -                    # pager info
> -                    # -R: display color codes properly
> -                    # -E: quit at eof (otherwise scribe pauses on empty updates)
> -                    # -X: dont do screen init and deinit, gaze install
> -                    # of a small spell is effectively useless otherwise as the
> -                    # screen is cleared afterwards.
> -                PAGER=${PAGER:=less -R -F -X -f}
>               FILEPROG=${FILEPROG:=file}
>             DIALOGPROG=${DIALOGPROG:=dialog}
>  
> @@ -182,6 +175,7 @@ PROGRESS_SPINNER_CHARS=${PROGRESS_SPINNER_CHARS:-'-\|/'}
>            STANDARD_IFS=$WHITESPACE_IFS
>  
>  . $SUBROUTINES
> +set_pager
>  
>  . $MEDIA_CONFIG
>  . $ROOTS_CONFIG
> diff --git a/var/lib/sorcery/modules/libsorcery b/var/lib/sorcery/modules/libsorcery
> index 49ccde0..2bd5aad 100755
> --- a/var/lib/sorcery/modules/libsorcery
> +++ b/var/lib/sorcery/modules/libsorcery
> @@ -1265,6 +1265,37 @@ function override_grimoires() {
>  }
>  
>  #---------------------------------------------------------------------
> +## Sets the most appropriate params for PAGER
> +## @Globals PAGER
> +#---------------------------------------------------------------------
> +function set_pager() {
> +  if [[ -z $PAGER ]]; then
> +    # pager info
> +    # -R: display color codes properly
> +    # -F: quit on one-screenfull of data (otherwise scribe pauses on empty updates)
> +    # -X: dont do screen init and deinit, gaze install
> +    # of a small spell is effectively useless otherwise as the
> +    # screen is cleared afterwards.
> +    # -f: force it, since we may not be dealing with a regular file
> +    PAGER="less -R -F -X -f"
> +    return
> +  fi
> +
> +  local pager_prog
> +  local pager_params=${PAGER#* }
> +  smgl_basename "${PAGER%% *}" pager_prog
> +
> +  # TODO: add any needed options for the rest of the pagers
> +  case $pager_prog in
> +    less) PAGER="less -R -F -X -f $pager_params" ;;
> +    most) PAGER="most $pager_params" ;;
> +    w3m)  PAGER="w3m $pager_params" ;;
> +    more) PAGER="more $pager_params";;
> +    *) ;;
> +  esac
> +}



I'm trying devel sorcery:

$ export PAGER=less
$ gaze install e2fsprogs | grep mkfs
less: No such file or directory

$ export PAGER=more
$ gaze install e2fsprogs | grep mkfs
more: No such file or directory

$ more
usage: more [-dflpcsu] [+linenum | +/pattern] name1 name2 ...

$ less
Missing filename ("less --help" for help)


If I unset PAGER, seems it works.

-- 
Ladislav Hagara




More information about the SM-Commit mailing list