[sbopkg-users] bash-completion

Robby Workman rw at rlworkman.net
Wed Feb 2 05:35:08 UTC 2011


On Fri, 28 Jan 2011 19:56:46 +0300
Igor Murzov <intergalactic.anonymous at gmail.com> wrote:

> Here is updated version:
> 
> https://github.com/GArik/bash-completion/raw/slackware/completions/slackpkg
> 
> you can specify disk sets or filenames for 'install' and other
> actions.


Outstanding - thanks much for this :-)


> > Can I put it inside slackpkg under "docs" directory?
> > Or are you sending it to upstream?
> 
> Of course, you can do whatever you want with it )  I can try to
> contact mantainers of bash-completion and ask 'em to pull all
> slackware related completions.


I won't speak for PiterPUNK, but I personally would prefer to see
this go upstream.  One of the feedback pieces I got from another
user is that some part of this is bash4-specific, and that could
be slightly problematic for those users who install newer slackpkg
releases on older slackware versions (yes, I'm one of those).


> But there is some known issues:
> * Options for pkgtool are inaccurate.


I'm CC'ing Pat on this mail so that he can look into that; a casual
glance tells me you're correct...


> * No version completion available for slapt-src.


Jason Woodward (goes by malloc on IRC) would be the person to 
contact about that.  Besides, I personally don't care about that -
slackpkg is my only concern ;-)


Pat, here's your part!  :)


> I'll fix second issue someday ) But the first one requires patching
> pkgtools. If you have some time, please review pkgtool script and man
> page. In man page:
> -----------------------------------------
> --ignore_tagfiles
> --source_mounted
> --source_dir
> -----------------------------------------
> 
> in /sbin/pkgtool:
> -----------------------------------------
> # Here, we read the list of arguments passed to the pkgtool script.
> if [ $# -gt 0 ]; then # there are arguments to the command
>  while [ $# -gt 0 ]; do
>   case "$1" in
> ...
>   -source_mounted | --source-mounted)
>    SOURCE_MOUNTED="always" ; shift 1 ;;
>   -ignore_tagfiles | --ignore-tagfiles)
>    ASK="never" ; shift 1 ;;
>   -tagfile | --tagfile)
>    USETAG=$2 ; shift 2 ;;
>   -source_dir | --source_dir)
> ...
> -----------------------------------------
> 
> You can see that there is '--ignore_tagfiles' and
> '--ignore-tagfiles',  '-- source_mounted' and '--source-mounted' in
> different places. It would be great if you'll fix this.
> 
> Another spotted issues with pkgtools:
> * No *) case within while loop where options are parsed. As the
> result pkgtool goes to infinite loop if any unknown option supplied.
> * rpm2txz fails to convert rpms if there is a space character in file
> path. (patches are attached -- one for rpm2tgz and one for makepkg)


-RW



More information about the sbopkg-users mailing list