From sftp.mtuci at gmail.com Fri Jan 7 23:51:27 2011 From: sftp.mtuci at gmail.com (Sergey V.) Date: Sat, 8 Jan 2011 02:51:27 +0300 Subject: [sbopkg-users] bash completion Message-ID: <201101080251.27851.sftp.mtuci@gmail.com> Hello all! Here is current version of bash completion script for sbopkg (attached). Also actual version is available on github [1]. Any comments or suggestions are welcome. regards, Sergey [1] https://github.com/sftp/bash-completion/blob/sftp/completions/sbopkg -------------- next part -------------- # -*- sh -*- # bash completion for sbopkg tool # # (c) Igor Murzov # (c) Sergey V. have sbopkg && _sbopkg() { COMPREPLY=() local cur prev _get_comp_words_by_ref cur prev 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) _filedir return 0 ;; -d) _filedir -d 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" local words _get_comp_words_by_ref words for (( i=${#words[@]}-1; i>0; i-- )); do if [[ ${words[i]} == '-f' ]]; then config="${words[i+1]}" break fi done if [ ! -r "$config" ]; then return 0 fi . $config for (( i=1; i<${#words[@]}; i++ )); do case "${words[i]}" in '-V') REPO_NAME="${words[i+1]%%/*}" REPO_BRANCH="${words[i+1]#*/}" ;; '-d') REPO_ROOT="${words[i+1]}" ;; esac done if [ ! -r "$REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT" ]; then return 0 fi COMPREPLY=( $( grep "^SLACKBUILD NAME: $cur" \ $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT | cut -f3- -d\ ) $( (cd $QUEUEDIR; ls $cur*.sqf 2> /dev/null) ) ) return 0 } && complete -F _sbopkg sbopkg -o plusdirs From slakmagik at gmail.com Sat Jan 8 03:05:40 2011 From: slakmagik at gmail.com (slakmagik) Date: Fri, 7 Jan 2011 22:05:40 -0500 Subject: [sbopkg-users] bash completion In-Reply-To: <201101080251.27851.sftp.mtuci@gmail.com> References: <201101080251.27851.sftp.mtuci@gmail.com> Message-ID: <20110108030540.GA10051@devbox> On 2011-01-08 (Sat) 02:51:27 [+0300], Sergey V. wrote: > Hello all! > > Here is current version of bash completion script for sbopkg (attached). > Also actual version is available on github [1]. > > Any comments or suggestions are welcome. > 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. From rw at rlworkman.net Sat Jan 8 03:26:14 2011 From: rw at rlworkman.net (Robby Workman) Date: Fri, 7 Jan 2011 21:26:14 -0600 Subject: [sbopkg-users] bash completion In-Reply-To: <201101080251.27851.sftp.mtuci@gmail.com> References: <201101080251.27851.sftp.mtuci@gmail.com> Message-ID: <20110107212614.03ba3eec@liberty> On Sat, 8 Jan 2011 02:51:27 +0300 "Sergey V." wrote: > Hello all! > > Here is current version of bash completion script for sbopkg > (attached). Also actual version is available on github [1]. > > Any comments or suggestions are welcome. > > > regards, Sergey > > [1] > https://github.com/sftp/bash-completion/blob/sftp/completions/sbopkg I've been meaning to do this myself, but I can't seem to find the time, so I'll make a shameless request: any chance you would be willing to do some bash completion magic for slackpkg too? :-) -RW From sftp.mtuci at gmail.com Sun Jan 9 00:22:05 2011 From: sftp.mtuci at gmail.com (Sergey V.) Date: Sun, 9 Jan 2011 03:22:05 +0300 Subject: [sbopkg-users] bash completion In-Reply-To: <20110108030540.GA10051@devbox> References: <201101080251.27851.sftp.mtuci@gmail.com> <20110108030540.GA10051@devbox> Message-ID: <201101090322.06214.sftp.mtuci@gmail.com> 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. We can't just s/_filedir/compgen -f/, it will does not works. -------------- next part -------------- A non-text attachment was scrubbed... Name: bash-completion-slackbuild.tar.gz Type: application/x-compressed-tar Size: 4832 bytes Desc: not available URL: From slakmagik at gmail.com Sun Jan 9 02:46:42 2011 From: slakmagik at gmail.com (slakmagik) Date: Sat, 8 Jan 2011 21:46:42 -0500 Subject: [sbopkg-users] bash completion In-Reply-To: <201101090322.06214.sftp.mtuci@gmail.com> References: <201101080251.27851.sftp.mtuci@gmail.com> <20110108030540.GA10051@devbox> <201101090322.06214.sftp.mtuci@gmail.com> Message-ID: <20110109024642.GA30920@devbox> 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. > We can't just s/_filedir/compgen -f/, it will does not works. Yeah, I didn't figure it would - I just meant that bash-completion-1.2 seems to include overhead that could be reduced for simple sbopkg completion. From igor at gplsoft.org Sun Jan 9 02:54:29 2011 From: igor at gplsoft.org (Igor Murzov) Date: Sun, 9 Jan 2011 05:54:29 +0300 Subject: [sbopkg-users] bash completion In-Reply-To: <20110107212614.03ba3eec@liberty> References: <201101080251.27851.sftp.mtuci@gmail.com> <20110107212614.03ba3eec@liberty> Message-ID: <201101090554.30093.igor@gplsoft.org> Hi, Robby > I've been meaning to do this myself, but I can't seem to find > the time, so I'll make a shameless request: any chance you > would be willing to do some bash completion magic for slackpkg > too? :-) As neither Sergey, nor I actually use slackpkg, we made some investigations in how the slackpkg actually works and prepared initial completion script. You can find it here: https://github.com/GArik/bash-completion/raw/slackpkg/completions/slackpkg Please test it thoroughly. Any comments and suggestions are welcome, especially regarding patterns magic: "FILE is a file with a list of PATTERNs inside". May be you could show us some examples of right usage of slackpkgs options, so we'll have some test cases. Regards, -- Igor From jh-gilmour at bigpond.com Wed Jan 12 05:24:02 2011 From: jh-gilmour at bigpond.com (James&Helen) Date: Wed, 12 Jan 2011 16:24:02 +1100 Subject: [sbopkg-users] Help wanted to run sbopkg Message-ID: <4D2D3AF2.1010505@bigpond.com> It's been a while since I last used *sbopkg* and I've forgotten how to open it!!. It's still in ~/Downloads/usr/*sbopkg but I can't get into it from a terminal or a desktop. Can some kind person help this one to cross the road? -- James&Helen From slava18 at gmail.com Wed Jan 12 07:49:17 2011 From: slava18 at gmail.com (V'yacheslav Stetskevych) Date: Wed, 12 Jan 2011 09:49:17 +0200 Subject: [sbopkg-users] Help wanted to run sbopkg In-Reply-To: <4D2D3AF2.1010505@bigpond.com> References: <4D2D3AF2.1010505@bigpond.com> Message-ID: On Wed, Jan 12, 2011 at 7:24 AM, James&Helen wrote: > ? ? ?It's been a while since I last used *sbopkg* and I've forgotten how to > open it!!. > ? ? ? ?It's still in ~/Downloads/usr/*sbopkg but I can't get into it from a > terminal or a desktop. > ? ? ? ?Can some kind person help this one to cross the road? Step 0: I don't know how you have sbopkg installed, so you might want to go to http://sbopkg.org/ and download the latest Package (a green link on the right side of the page). Step 1: Open a terminal, become root by issuing "su -", then install the downloaded package by running "upgradepkg --install-new --reinstall /path/to/your/sbopkg-...-.tgz". Step 2: Stay in the root shell, run "sbopkg" and follow the prompts. That is all. Have fun. - V'yacheslav. -- If you think of MS-DOS as mono, and Windows as stereo, then Linux is Dolby Digital and all the music is free... ? ? ? ?http://www.linux.com From schultzter at gmail.com Wed Jan 12 20:18:56 2011 From: schultzter at gmail.com (Eric Schultz) Date: Wed, 12 Jan 2011 15:18:56 -0500 Subject: [sbopkg-users] sbopkg available on slackbuilds.org?! Message-ID: I've checked through this list's archives (mostly just the titles, read a few interesting threads) and didn't find an answer to this question: why isn't sbopkg available from slackbuilds.org? Isn't it ironic that isn't? If sbopkg was part of slackbuild's repository then checking for a new version of sbopkg would be inherent in checking for slackbuild.org udpates. It would be one less step. Just my $0.02. Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From mauro.giachero at gmail.com Wed Jan 12 21:51:02 2011 From: mauro.giachero at gmail.com (Mauro Giachero) Date: Wed, 12 Jan 2011 22:51:02 +0100 Subject: [sbopkg-users] sbopkg available on slackbuilds.org?! In-Reply-To: References: Message-ID: I also thought that some time ago. The greatest problem would be to manage sbopkg upgrading itself, since you can't simply replace the script while it's running. That issue itself is IMHO a big can of worms, so I decided to simply keep the sbopkg upgrade something users will have to perform manually outside sbopkg. Of course patches are always welcome :-) -- Mauro Giachero Sent from my Android phone Il giorno 12/gen/2011 21:19, "Eric Schultz" ha scritto: I've checked through this list's archives (mostly just the titles, read a few interesting threads) and didn't find an answer to this question: why isn't sbopkg available from slackbuilds.org? Isn't it ironic that isn't? If sbopkg was part of slackbuild's repository then checking for a new version of sbopkg would be inherent in checking for slackbuild.org udpates. It would be one less step. Just my $0.02. Thanks, _______________________________________________ sbopkg-users mailing list sbopkg-users at sbopkg.org http://sbopkg.org/mailman/listinfo/sbopkg-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From rw at rlworkman.net Mon Jan 17 19:53:37 2011 From: rw at rlworkman.net (Robby Workman) Date: Mon, 17 Jan 2011 13:53:37 -0600 Subject: [sbopkg-users] bash completion In-Reply-To: <201101090554.30093.igor@gplsoft.org> References: <201101080251.27851.sftp.mtuci@gmail.com> <20110107212614.03ba3eec@liberty> <201101090554.30093.igor@gplsoft.org> Message-ID: <20110117135337.4ffe8ed6@liberty> On Sun, 9 Jan 2011 05:54:29 +0300 Igor Murzov wrote: > Hi, Robby > > > I've been meaning to do this myself, but I can't seem to find > > the time, so I'll make a shameless request: any chance you > > would be willing to do some bash completion magic for slackpkg > > too? :-) > > As neither Sergey, nor I actually use slackpkg, we made some > investigations in how the slackpkg actually works and prepared > initial completion script. You can find it here: > https://github.com/GArik/bash-completion/raw/slackpkg/completions/slackpkg Oooh, very nice - thanks, Igor. I'm CC'ing PiterPUNK (author of slackpkg) on this so that he can see too. > Please test it thoroughly. Any comments and suggestions are welcome, > especially regarding patterns magic: "FILE is a file with a list of > PATTERNs inside". May be you could show us some examples of right > usage of slackpkgs options, so we'll have some test cases. I don't think I'd worry too much about the FILE usage - I've never used that, and I don't know anyone who has. PiterPUNK, what's your take on that? I've got this installed now, so give me some time to play around and we'll go from there. -RW From piterpunk at slackware.com Fri Jan 21 04:07:42 2011 From: piterpunk at slackware.com (Piter PUNK) Date: Thu, 20 Jan 2011 20:07:42 -0800 (PST) Subject: [sbopkg-users] bash completion In-Reply-To: <20110117135337.4ffe8ed6@liberty> References: <201101080251.27851.sftp.mtuci@gmail.com> <20110107212614.03ba3eec@liberty> <201101090554.30093.igor@gplsoft.org> <20110117135337.4ffe8ed6@liberty> Message-ID: On Mon, 17 Jan 2011, Robby Workman wrote: > On Sun, 9 Jan 2011 05:54:29 +0300 > Igor Murzov wrote: >> >> As neither Sergey, nor I actually use slackpkg, we made some >> investigations in how the slackpkg actually works and prepared >> initial completion script. You can find it here: >> https://github.com/GArik/bash-completion/raw/slackpkg/completions/slackpkg Very nice! I am very happy with that! Can I put it inside slackpkg under "docs" directory? Or are you sending it to upstream? >> Please test it thoroughly. Any comments and suggestions are welcome, >> especially regarding patterns magic: "FILE is a file with a list of >> PATTERNs inside". May be you could show us some examples of right >> usage of slackpkgs options, so we'll have some test cases. You can create /some/path/to/FILE and, inside FILE put any acceptable PATTERN there, separated by spaces: root at kitt:~# cat /tmp/FILE xorg glibc d If I run: slackpkg reinstall /tmp/FILE It will be the same of: slackpkg reinstall xorg glibc d Which will reinstall all packages with xorg[-something], glibc[-something] and entire development (d) series. This helps? If needs anything else, feel free to contact me. Piter PUNK From Bradley at NorthTech.US Tue Jan 25 19:15:15 2011 From: Bradley at NorthTech.US (Bradley D. Thornton) Date: Tue, 25 Jan 2011 11:15:15 -0800 Subject: [sbopkg-users] checking for updates and installing new package... Message-ID: <4D3F2143.9060004@NorthTech.US> -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 I was just reading the thread about why sbopkg isn't at sbo LOL! sbopkg will, however, check (and d/l?) the latest version and then all the user would have to do is upgradepkg, presumably - is this correct?. Or perhaps a hack to slackpkg to get it (after all, that would indeed occur outside of sbopkg). Interesting. - -- Bradley D. Thornton Manager Network Services NorthTech Computer TEL: +1.760.666.2703 (US) TEL: +44.702.405.1909 (UK) http://NorthTech.US -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Find this cert at x-hkp://pool.sks-keyservers.net iQEcBAEBAwAGBQJNPyFDAAoJEE1wgkIhr9j3AUkH/RbHtL1r5SU1NHTpZpi48+Vw zmosTFzEU654eUFiYCE2yR1HbCY9kIDR7Ks5M8Llg3K/2BTpwb6IayzZstW1ljwg 3lBWjQkWVIZ2VJPnvkfa5I89xAG86oCe2ioUjAvXYFMn2nrl21r0NVHp+7O7Uwzz EEUU/zwTL5ZxA3OKuLcDpnaCQnT/uXDPPNDGukoxHRqt6PMCRMOGzmGWHKbL+W0h 0OWUSoqnk/aNo12S+so189yBo+FPPl2tAswXRR3BO5hqASh3SC6S5tw0fV4T3cQi H4s+NX7vq0U4L0TnXVUFgBRyTmyojyr7EhklfocXXAxiT/3Kj4E8I32YX8rTVX4= =XfNx -----END PGP SIGNATURE----- From slakmagik at gmail.com Tue Jan 25 20:48:04 2011 From: slakmagik at gmail.com (slakmagik) Date: Tue, 25 Jan 2011 15:48:04 -0500 Subject: [sbopkg-users] checking for updates and installing new package... In-Reply-To: <4D3F2143.9060004@NorthTech.US> References: <4D3F2143.9060004@NorthTech.US> Message-ID: <20110125204804.GA307@devbox> On 2011-01-25 (Tue) 11:15:15 [-0800], Bradley D. Thornton wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > > I was just reading the thread about why sbopkg isn't at sbo LOL! > > sbopkg will, however, check (and d/l?) the latest version and then all > the user would have to do is upgradepkg, presumably - is this correct?. > Correct. > Or perhaps a hack to slackpkg to get it (after all, that would indeed > occur outside of sbopkg). > Since you're right about 'sbopkg -u', hacking slackpkg wouldn't get you anything over that and wouldn't be the right direction anyway, as slackpkg is for official Slackware packages and sbopkg isn't even an official SBo package. From intergalactic.anonymous at gmail.com Fri Jan 28 16:56:46 2011 From: intergalactic.anonymous at gmail.com (Igor Murzov) Date: Fri, 28 Jan 2011 19:56:46 +0300 Subject: [sbopkg-users] bash-completion Message-ID: <201101281956.46633.e-mail@date.by> > Very nice! I am very happy with that! 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. > 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. But there is some known issues: * Options for pkgtool are inaccurate. * No version completion available for slapt-src. 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) Some issues with slackpkg-2.81.1: * slackpkg search mentioned twice in man page. * slackpkg search|file-search seems to not actually accept any filenames Maybe you meant that one can search for filenames with file-search, then you should remove leading slash from filenames. ----------------------------------------- ??[ /usr/bin ] [ root at garik ] ??# slackpkg file-search $(readlink -f ../bin/cc | cut -c2-) Looking for usr/bin/gcc-4.5.2 in package list. Please wait... DONE The list below shows the packages that contains "usr/bin/gcc-4\.5\.2" file. [ installed ] - gcc-4.5.2-i486-1 You can search specific packages using "slackpkg search package". ----------------------------------------- -- Igor -------------- next part -------------- A non-text attachment was scrubbed... Name: 0010-Quote-package-names.patch Type: text/x-patch Size: 941 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: makepkg.patch Type: text/x-patch Size: 411 bytes Desc: not available URL: