mirror of
https://github.com/zuno/slackpkgplus
synced 2024-12-27 09:58:34 +01:00
Added SENSITIVE_SEARCH
Small adjustment in the code.
This commit is contained in:
parent
3bb0a9af21
commit
df8c9130a6
6 changed files with 38 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
Version devel Thu Dec 17 22:26:41 CET 2015
|
||||
Version devel Fri Dec 18 20:13:08 CET 2015
|
||||
- Fixed a missed $ROOT
|
||||
- Added SHOWORDER option. It's a way to sort packages in dialog box to help
|
||||
reviewing large upgrade from many repositories. The SHOWORDER option
|
||||
|
@ -7,6 +7,8 @@ Version devel Thu Dec 17 22:26:41 CET 2015
|
|||
- slackpkg+ advise you to update the pkglist before use it
|
||||
- Added a script in /usr/doc/slackpkg+-* to a fast check of repositories
|
||||
- slackpkg -dialog=off now show repository name as with dialog
|
||||
- Added SENSITIVE_SEARCH option to search case-insensitive
|
||||
(thanks to phenixia2003)
|
||||
- Important fixes in the priority manager. Many thanks to all people that
|
||||
reported the bugs and a Big thanks to phenixia2003 for the fix. Now we need
|
||||
your help to test it.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Version devel Thu Dec 17 22:26:41 CET 2015
|
||||
Version devel Fri Dec 18 20:13:08 CET 2015
|
||||
- Fixed a missed $ROOT
|
||||
- Added SHOWORDER option. It's a way to sort packages in dialog box to help
|
||||
reviewing large upgrade from many repositories. The SHOWORDER option
|
||||
|
@ -7,6 +7,8 @@ Version devel Thu Dec 17 22:26:41 CET 2015
|
|||
- slackpkg+ advise you to update the pkglist before use it
|
||||
- Added a script in /usr/doc/slackpkg+-* to a fast check of repositories
|
||||
- slackpkg -dialog=off now show repository name as with dialog
|
||||
- Added SENSITIVE_SEARCH option to search case-insensitive
|
||||
(thanks to phenixia2003)
|
||||
- Important fixes in the priority manager. Many thanks to all people that
|
||||
reported the bugs and a Big thanks to phenixia2003 for the fix. Now we need
|
||||
your help to test it.
|
||||
|
|
17
src/README
17
src/README
|
@ -440,6 +440,23 @@ you install.
|
|||
|
||||
-----
|
||||
|
||||
SENSITIVE_SEARCH
|
||||
|
||||
By default the 'slackpkg search' and 'slackpkg file-search' do case sensitive
|
||||
searches, so 'slackpkg search mplayer' does NOT find the slackware package
|
||||
MPlayer-1.1_20130819-x86_64-2
|
||||
|
||||
You can search case-insensitive by setting SENSITIVE_SEARCH to off in config file.
|
||||
You can also do temporary case-insensitive searches overriding that setting in cmdline
|
||||
|
||||
SENSITIVE_SEARCH=off slackpkg search mplayer
|
||||
|
||||
|
||||
Note tha 'slackpkg install' still remains case sensitive, so you must use
|
||||
slackpkg install MPlayer
|
||||
|
||||
-----
|
||||
|
||||
SHOWORDER
|
||||
|
||||
By default slackpkg in dialogbox sort packages by name.
|
||||
|
|
|
@ -11,7 +11,7 @@ CONF=${CONF:-/etc/slackpkg} # needed if you're running slackpkg 2.28.0-12
|
|||
SLACKDIR_REGEXP="(slackware)|(slackware64)|(extra)|(pasture)|(patches)|(testing)"
|
||||
|
||||
if [ -e $CONF/slackpkgplus.conf ];then
|
||||
# You can override GREYLIST WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT from command-line
|
||||
# You can override GREYLIST WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT SENSITIVE_SEARCH from command-line
|
||||
EXTGREYLIST=$GREYLIST
|
||||
EXTALLOW32BIT=$ALLOW32BIT
|
||||
EXTSLACKPKGPLUS=$SLACKPKGPLUS
|
||||
|
@ -20,6 +20,7 @@ if [ -e $CONF/slackpkgplus.conf ];then
|
|||
EXTWGETOPTS=$WGETOPTS
|
||||
EXTDOWNLOADCMD=$DOWNLOADCMD
|
||||
EXTTAG_PRIORITY=$TAG_PRIORITY
|
||||
EXTSENSITIVE_SEARCH=$SENSITIVE_SEARCH
|
||||
|
||||
. $CONF/slackpkgplus.conf
|
||||
|
||||
|
@ -31,6 +32,7 @@ if [ -e $CONF/slackpkgplus.conf ];then
|
|||
WGETOPTS=${EXTWGETOPTS:-$WGETOPTS}
|
||||
DOWNLOADCMD=${EXTDOWNLOADCMD:-$DOWNLOADCMD}
|
||||
TAG_PRIORITY=${EXTTAG_PRIORITY:-$TAG_PRIORITY}
|
||||
SENSITIVE_SEARCH=${EXTSENSITIVE_SEARCH:-$SENSITIVE_SEARCH}
|
||||
|
||||
USEBLACKLIST=true
|
||||
if [ "$USEBL" == "0" ];then
|
||||
|
@ -479,8 +481,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
|
||||
function searchPackages() {
|
||||
local i
|
||||
local GREPOPTS=""
|
||||
|
||||
INPUTLIST=$@
|
||||
SEARCHSTR=$@
|
||||
|
||||
grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist > ${TMPDIR}/blacklist
|
||||
if echo $CMD | grep -q install ; then
|
||||
|
@ -492,6 +495,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
|
||||
touch ${TMPDIR}/waiting
|
||||
|
||||
[ "$SENSITIVE_SEARCH" = "off" ] && GREPOPTS="--ignore-case"
|
||||
|
||||
# -- PKGLIST:
|
||||
# temporary file used to store data about packages. It uses
|
||||
# the following format:
|
||||
|
@ -515,7 +520,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
# for the fields: version(3) arch(4) build(5), path(7),
|
||||
# extension(8)
|
||||
#
|
||||
zegrep -w "${INPUTLIST}" ${WORKDIR}/${DIR}-filelist.gz | \
|
||||
zegrep ${GREPOPTS} -w "${SEARCHSTR}" ${WORKDIR}/${DIR}-filelist.gz | \
|
||||
cut -d" " -f 1 | rev | cut -f2- -d"." | cut -f1 -d"/" | rev |\
|
||||
awk '{
|
||||
l_pname=$0
|
||||
|
@ -528,7 +533,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
}' l_dir=${DIR} > $PKGINFOS
|
||||
|
||||
else # -- CMD==search
|
||||
grep "^${DIR}.*${PATTERN}" "${TMPDIR}/pkglist" > $PKGINFOS
|
||||
grep ${GREPOPTS} "^${DIR}.*${SEARCHSTR}" "${TMPDIR}/pkglist" > $PKGINFOS
|
||||
fi
|
||||
|
||||
while read PKG ; do
|
||||
|
|
|
@ -28,6 +28,9 @@ WGETOPTS="--timeout=20 --tries=2"
|
|||
# Enable (on) / Disable (off) the greylist feature. See /etc/slackpkg/greylist
|
||||
GREYLIST=on
|
||||
|
||||
# Defines if commands 'search' and 'file-search' are case-sensitive (on) or not (off). Default to "on"
|
||||
SENSITIVE_SEARCH=on
|
||||
|
||||
# Select the show order in dialogbox. Available "package" "repository" "tag" "path" "arch"
|
||||
SHOWORDER=package
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@ WGETOPTS="--timeout=20 --tries=2"
|
|||
# Enable (on) / Disable (off) the greylist feature. See /etc/slackpkg/greylist
|
||||
GREYLIST=on
|
||||
|
||||
# Defines if commands 'search' and 'file-search' are case-sensitive (on) or not (off). Default to "on"
|
||||
SENSITIVE_SEARCH=on
|
||||
|
||||
# Select the show order in dialogbox. Available "package" "repository" "tag" "path" "arch"
|
||||
SHOWORDER=package
|
||||
|
||||
|
|
Loading…
Reference in a new issue