From rw at rlworkman.net Wed Feb 2 05:35:08 2011 From: rw at rlworkman.net (Robby Workman) Date: Tue, 1 Feb 2011 23:35:08 -0600 Subject: [sbopkg-users] bash-completion In-Reply-To: <201101281956.46633.e-mail@date.by> References: <201101281956.46633.e-mail@date.by> Message-ID: <20110201233508.18c2171f@liberty.rlwhome.lan> On Fri, 28 Jan 2011 19:56:46 +0300 Igor Murzov 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 From sftp.mtuci at gmail.com Thu Feb 3 15:30:54 2011 From: sftp.mtuci at gmail.com (Sergey V.) Date: Thu, 3 Feb 2011 18:30:54 +0300 Subject: [sbopkg-users] bash completion In-Reply-To: <20110109024642.GA30920@devbox> References: <201101080251.27851.sftp.mtuci@gmail.com> <201101090322.06214.sftp.mtuci@gmail.com> <20110109024642.GA30920@devbox> Message-ID: <201102031830.55398.sftp.mtuci@gmail.com> On Sunday 09 of January 2011 05:46:42 slakmagik wrote: > On 2011-01-09 (Sun) 03:22:05 [+0300], Sergey V. wrote: > > On Saturday 08 of January 2011 06:05:40 slakmagik wrote: > > > > > Thanks for this contribution, but you need to either import have() from > > > the main script or drop it and similarly with _get_comp_words_by_ref() > > > and _filedir (and the functions those functions call, etc.). I'd prefer > > > junking as much as possible from the main script to keep the part broken > > > out for sbopkg as small and simple as possible. For instance, _filedir > > > seems to try to rewrite a simple 'compgen -f' just for filenames with > > > spaces. But whatever makes it work. That's all I see right off, as I > > > haven't looked at it very closely yet. > > > > Sorry, forgot to say, sbopkg completion script written for > > bash-completion-1.2 or above (slackbuild attached). > > > > have(), _get_comp_words_by_ref() and _filedir is builtin functions > > of bash-completion-1.2. > > I know. So it looks like we had some miscommunication in #sbopkg. I > don't see the point of this. If someone wants to install > bash_completion, then they do so and they get sbopkg completions. And > that's that package; not sbopkg. What I thought you were offering was a > simple, independent, self-contained file such as the git or mercurial > completion files. Something like that would be nice to include in > sbopkg. But I don't want a file in sbopkg that doesn't work unless you > install something else. Sorry for long reply. New version of completion script (attached) independent from bash-completion package (uses only bash-builtin functions). TODO: completion not work for syntax like this sbopkg -i|-b "pkg1 pkg2" (now I do not see any other issues) Please review or/and test it. -------------- next part -------------- # bash completion for sbopkg tool _sbopkg() { COMPREPLY=() local cur="${COMP_WORDS[COMP_CWORD]}" local prev="${COMP_WORDS[COMP_CWORD-1]}" if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '-b -c -d -e -f -g -h -i -k -l \ -o -P -p -q -R -r -s -u -V -v' -- "$cur" ) ) return 0 fi case $prev in -e) COMPREPLY=( $( compgen -W 'ask continue stop' -- "$cur" ) ) return 0 ;; -f) COMPREPLY=( $( compgen -f -- "$cur" ) ) return 0 ;; -d) COMPREPLY=( $( compgen -d -- "$cur" ) ) return 0 ;; -V) COMPREPLY=( $( compgen -W "? \ $(sbopkg -V ? 2>&1 | cut -s -f1)" -- "$cur" ) ) return 0 ;; -i|-b) ;; *) return 0 ;; esac local config="/etc/sbopkg/sbopkg.conf" for (( i=${#COMP_WORDS[@]}-1; i>0; i-- )); do if [[ "${COMP_WORDS[i]}" == -f ]]; then config="${COMP_WORDS[i+1]}" break fi done if [ ! -r "$config" ]; then return 0 fi . $config for (( i=1; i<${#COMP_WORDS[@]}; i++ )); do case "${COMP_WORDS[i]}" in -V) REPO_NAME="${COMP_WORDS[i+1]%%/*}" REPO_BRANCH="${COMP_WORDS[i+1]#*/}" ;; -d) REPO_ROOT="${COMP_WORDS[i+1]}" ;; esac done if [ ! -r "$REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT" ]; then return 0 fi COMPREPLY=( $( sed -ne "/^SLACKBUILD NAME: $cur/{s/^SLACKBUILD NAME: //;p}"\ $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT ) $( cd $QUEUEDIR; compgen -f -X "!*.sqf" -- "$cur" ) ) } && complete -o filenames -F _sbopkg sbopkg From slakmagik at gmail.com Sat Feb 5 04:45:05 2011 From: slakmagik at gmail.com (slakmagik) Date: Fri, 4 Feb 2011 23:45:05 -0500 Subject: [sbopkg-users] Sbopkg 0.34.1 Released Message-ID: <20110205044505.GA621@devbox> This one's almost exclusively a bugfix release, but thanks to Pablo for the new Spanish translations of the manuals. There are also revised docs, including a new THANKS file that tries to give credit to all the people who've helped with this project. This release can be downloaded from http://www.sbopkg.org or http://code.google.com/p/sbopkg/ The relevant section of the new NEWS follows: sbopkg 0.34.1 (2011-02-05 04:20 UTC) FEATURES * Added Spanish translations of the man pages. Much thanks to Pablo Castano Fernandez for doing these translations. MODIFICATIONS * Revision of documentation. Major reformatting and some textual modifications of /usr/doc/sbopkg-*/* including breaking out the credits in the script into a detailed THANKS file, renaming and reformatting ChangeLog.txt into NEWS, renaming the sample queuefiles from *.sqf to *.sqf.sample, and making lesser modifications to all the other docs. BUGFIXES * Fixed issue where MKDIR_PROMPT was being ignored. Thanks to catkin for raising this issue. * Fixed issue where -o would wrongly produce no output. Thanks to ArTourter for raising this issue and to Mauro Giachero for the patch. * Fixed issue where TAG would sometimes not appear in the final package. Thanks to chytraeus for raising this issue. * A revision which fixed a failure to properly initialize directories when running under bash 3x was committed but didn't make it into the released package. It is included in this release. Also fixed a problem with a blank line being wrongly displayed in the directory initialization output in older bashes. Thanks to greinze for pointing the latter out. * Fixed documentation bug where the obsolete SBOPKGTMP and current TMPDIR variables weren't correctly documented. Thanks to dive for raising this issue. * Fixed non-documentation bug where TMPDIR wasn't being correctly assigned when set in sbopkg.conf. Thanks to Ken Roberts for reporting the issue and providing a preliminary fix. From jh-gilmour at bigpond.com Sun Feb 13 06:12:22 2011 From: jh-gilmour at bigpond.com (James&Helen) Date: Sun, 13 Feb 2011 17:12:22 +1100 Subject: [sbopkg-users] clutter-gtk 0.10.2 problem Message-ID: <4D577646.6050608@bigpond.com> Hey, I have tried to install clutter-gtk 0.10.2 using Slackbuild *and* sbopkg and get the exact same error message from each:------ "Making all in build Making all in autotools Making all in clutter-gtk CC gtk-clutter-embed.o ./gtk-clutter-embed.c: In function 'gtk_clutter_embed_realize': ./gtk-clutter-embed.c:181:3: error: lvalue required as left operand of assigt ./gtk-clutter-embed.c: In function 'gtk_clutter_embed_init': ./gtk-clutter-embed.c:589:3: error: lvalue required as left operand of assigt ./gtk-clutter-embed.c:590:3: error: lvalue required as left operand of assigt make[2]: *** [gtk-clutter-embed.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2:---" "clutter-gtk: Would I like to continue---- etc,etc, ?" but it won't continue. The problem seems to be at the Slackbuilds end of the operation, and certainly beyond my limited expertise. Can you help? -- James From slakmagik at gmail.com Sun Feb 13 08:25:08 2011 From: slakmagik at gmail.com (slakmagik) Date: Sun, 13 Feb 2011 03:25:08 -0500 Subject: [sbopkg-users] clutter-gtk 0.10.2 problem In-Reply-To: <4D577646.6050608@bigpond.com> References: <4D577646.6050608@bigpond.com> Message-ID: <20110213082508.GA25562@devbox> On 2011-02-13 (Sun) 17:12:22 [+1100], James&Helen wrote: > > Hey, > I have tried to install clutter-gtk 0.10.2 using Slackbuild *and* > sbopkg and get the exact same error message from each:------ > > "Making all in build > Making all in autotools > Making all in clutter-gtk > CC gtk-clutter-embed.o > ./gtk-clutter-embed.c: In function 'gtk_clutter_embed_realize': > ./gtk-clutter-embed.c:181:3: error: lvalue required as left operand of > assigt > ./gtk-clutter-embed.c: In function 'gtk_clutter_embed_init': > ./gtk-clutter-embed.c:589:3: error: lvalue required as left operand of > assigt > ./gtk-clutter-embed.c:590:3: error: lvalue required as left operand of > assigt > make[2]: *** [gtk-clutter-embed.lo] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2:---" > > "clutter-gtk: > > Would I like to continue---- etc,etc, ?" but it won't continue. > The problem seems to be at the Slackbuilds end of the operation, and > certainly beyond my limited expertise. > > Can you help? > Couple of things: if it fails outside of sbopkg it's not an sbopkg problem and you'd get better help somewhere like the SlackBuilds list. (I can't reproduce the "won't continue" issue.) Also, neither sbopkg nor SBo support -current. However, if you want it to work on -current, then use sbopkg or $EDITOR to edit the SlackBuild and info files of both clutter and clutter-gtk to use newer versions which are designed to work with newer gcc's.