LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   [BUG] slackpkgplus: 'slackpkg search' doesn't find package (https://www.linuxquestions.org/questions/slackware-14/%5Bbug%5D-slackpkgplus-slackpkg-search-doesnt-find-package-4175561958/)

bormant 12-20-2015 11:20 AM

[BUG] slackpkgplus: 'slackpkg search' doesn't find package
 
'slackpkg search' cannot find some packages.

For ex.:
Code:

# slackpkg search libdbusmenu
...
[ Status          ] [ Repository              ] [ Package                                  ]
  installed                                        libdbusmenu-qt-0.9.2-i486-2

cannot find libdbusmenu from mleddesktop, but 'slackpkg install' can:
Code:

# slackpkg -dialog=off install libdbusmenu
...
[ Repository              ] [ Package                                  ]
  mleddesktop                  libdbusmenu-12.10.2-i486-1_microlinux.txz 
Total package(s): 1
Do you wish to install selected packages (Y/n)?

/etc/slackpkgplus.conf without comments here:
Code:

# grep ^[^#] /etc/slackpkg/slackpkgplus.conf
SLACKPKGPLUS=on
VERBOSE=1
USEBL=1
WGETOPTS="--timeout=20 --tries=2"
CACHEUPDATE=off
GREYLIST=on
SENSITIVE_SEARCH=on
SHOWORDER=package
TAG_PRIORITY=on
REPOPLUS=( slackpkgplus restricted alienbob )
MIRRORPLUS['alienbob']=http://taper.alienbase.nl/mirrors/people/alien/sbrepos/14.1/x86/
MIRRORPLUS['restricted']=http://taper.alienbase.nl/mirrors/people/alien/restricted_sbrepos/14.1/x86/
MIRRORPLUS['mleddesktop']=http://www.microlinux.fr/microlinux/desktop-14.1-32bit/
MIRRORPLUS['mledextras']=http://www.microlinux.fr/microlinux/extras-14.1-32bit/
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/

slackpkg+-1.6.0-noarch-1mt

phenixia2003 12-20-2015 12:47 PM

Hello,

Quote:

Originally Posted by bormant (Post 5466815)
'slackpkg search' cannot find some packages.

For ex.:
Code:

# slackpkg search libdbusmenu
...
[ Status          ] [ Repository              ] [ Package                                  ]
  installed                                        libdbusmenu-qt-0.9.2-i486-2

cannot find libdbusmenu from mleddesktop, but 'slackpkg install' can:
Code:

# slackpkg -dialog=off install libdbusmenu
...
[ Repository              ] [ Package                                  ]
  mleddesktop                  libdbusmenu-12.10.2-i486-1_microlinux.txz 
Total package(s): 1
Do you wish to install selected packages (Y/n)?

/etc/slackpkgplus.conf without comments here:
Code:

# grep ^[^#] /etc/slackpkg/slackpkgplus.conf
SLACKPKGPLUS=on
VERBOSE=1
USEBL=1
WGETOPTS="--timeout=20 --tries=2"
CACHEUPDATE=off
GREYLIST=on
SENSITIVE_SEARCH=on
SHOWORDER=package
TAG_PRIORITY=on
REPOPLUS=( slackpkgplus restricted alienbob )
MIRRORPLUS['alienbob']=http://taper.alienbase.nl/mirrors/people/alien/sbrepos/14.1/x86/
MIRRORPLUS['restricted']=http://taper.alienbase.nl/mirrors/people/alien/restricted_sbrepos/14.1/x86/
MIRRORPLUS['mleddesktop']=http://www.microlinux.fr/microlinux/desktop-14.1-32bit/
MIRRORPLUS['mledextras']=http://www.microlinux.fr/microlinux/extras-14.1-32bit/
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/

slackpkg+-1.6.0-noarch-1mt

Thats's because of this commit :
Code:

+ INSTPKG=$(ls -1 /var/log/packages | grep -e "^${BASENAME}-[^-]\+-[^-]\+-[^-]\+")
+ #INSTPKG=$(ls -1 /var/log/packages | grep -e "^${BASENAME}-[^-]\+-\(${ARCH}\|fw\|noarch\)-[^-]\+")

Note that you already reported that issue in this post, and, in reply, I have sent a patch to fix this in this post, but it seems it has been forgotten.

After applying this patch, search works as expected :
Code:

patch -p0</home/seb/sandbox/tmp/slackpkgplus_search_patch_20150207.patch.txt
patching file slackpkgplus.sh
Hunk #1 succeeded at 606 (offset 97 lines).
root@blackdog [functions.d] >slackpkg search libdbusmenu

DONE

The list below shows all packages with name matching "libdbusmenu".

[ Status          ] [ Repository              ] [ Package                                  ]
  installed                                        libdbusmenu-qt-0.9.2-x86_64-2           
  uninstalled          mleddesktop                  libdbusmenu-12.10.2-x86_64-1_microlinux 

You can search specific files using "slackpkg file-search file".



--
SeB

zerouno 12-20-2015 01:30 PM

slackpkg+-1.6.1-noarch-2mt should solve.
thankyou

bormant 12-20-2015 03:25 PM

@phenixia2003, @zerouno,
big thanks.


'slackpkg search' is seems ok now but I've got something strange on 'slackpkg upgrade-all' (may be it isn't related):
Code:

sed: -e expression #2, char 3: expected \ after `a', `c' or `i'
sed: -e expression #2, char 3: expected \ after `a', `c' or `i'
... the same line more and more ...

 slackpkg 2.81.1 / slackpkg+ 1.6.1
 -----------------------------------------------------------------------
 +-----------------------------upgrade-------------------------------+
 | Choose packages to upgrade:                                      |
 | +---------------------------------------------------------------+ |
 | |[*] fpc-2.6.4-i386-1_microlinux.txz          1750:mledextras  | |
 | |[*] fpc-source-2.6.4-noarch-1_microlinux.txz  1751:mledextras  | |
 | |[*] lazarus-1.2.6-i386-1_microlinux.txz      1755:mledextras  | |
 | |[*] sbopkg-0.37.0-noarch-1_microlinux.txz    1950:mleddesktop | |

Are any thoughts about this?

zerouno 12-20-2015 03:48 PM

Try to put
TAG_PRIORITY=off
in slackpkgplus.conf

bormant 12-21-2015 12:45 AM

Quote:

Originally Posted by zerouno (Post 5466917)
Try to put
TAG_PRIORITY=off
in slackpkgplus.conf

Yes, this removes sed errors.

zerouno 12-21-2015 02:39 PM

This patch should fix, and you can reenable TAG_PRIORITY

Code:

--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -384,6 +384,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
    unset NAME
    unset FULLNAME
    unset PKGDATA
+    unset LINEIDX

    AUTOP=no
    if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]];then

tell me if it works.

bormant 12-21-2015 03:27 PM

@zerouno,
yes, adding "unset LINEIDX" fixes sed errors.
Great work, thanks.


All times are GMT -5. The time now is 05:32 PM.