LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-26-2013, 04:17 PM   #1
swatnio
LQ Newbie
 
Registered: Jan 2009
Distribution: slackware
Posts: 14

Rep: Reputation: 0
bug in slackpkg search?


Hello there,
Try to run:
# slackpkg search qt
you will find that the qt package is not shown...
Code:
[ installed ] - kdevelop-pg-qt-1.0.0-x86_64-1
[ installed ] - perlqt-4.8.5-x86_64-1
[ installed ] - qtruby-4.8.5-x86_64-1
[ installed ] - smokeqt-4.8.5-x86_64-1
[ installed ] - libdbusmenu-qt-0.9.2-x86_64-2
[ installed ] - polkit-qt-1-0.103.0-x86_64-1
[ installed ] - qtscriptgenerator-0.2.0-x86_64-1
debugging the slackpkg, i found that qt is not shown because when making the list of packages, (makelist in /usr/libexec/slackpkg/core-functions.sh) when it founds a new package, it only adds it to a list only if it is not on that list already. so, when it founds "qt", it matches against
kdevelop-pg-qt-1.0.0-x86_64-1
so it is not added to the list, so, it is not displayed..

It happens in slackware 14.0 and -current
 
Old 05-26-2013, 05:08 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,518
Blog Entries: 2

Rep: Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018
No such problem here on 14.0 32 bit:
Code:
tobi ~ ☺ $ slackpkg search qt

DONE

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

[ Status           ] [ Repository               ] [ Package                                  ]
   installed                                        kdevelop-pg-qt-1.0.0-i486-1               
   installed                                        perlqt-4.8.5-i486-1                       
   installed                                        qtruby-4.8.5-i486-1                       
   installed                                        smokeqt-4.8.5-i486-1                      
   installed                                        libdbusmenu-qt-0.9.2-i486-2               
   installed                                        polkit-qt-1-0.103.0-i486-1                
   installed                                        qt-4.8.2-i486-4                           
   installed                                        qtscriptgenerator-0.2.0-i486-1            
  uninstalled          alienbob                     razor-qt-0.5.2-i486-1alien                

You can search specific files using "slackpkg file-search file".
Tried the same on -current 64 bit, works also without a flaw.

EDIT: Forgot that I use the slackpkgplus extension, I believe the bug is fixed in that already.

Last edited by TobiSGD; 05-26-2013 at 05:10 PM.
 
Old 05-26-2013, 05:11 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,223

Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
No such problem here on 14.0 32 bit:
Code:
tobi ~ ☺ $ slackpkg search qt

DONE

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

[ Status           ] [ Repository               ] [ Package                                  ]
   installed                                        kdevelop-pg-qt-1.0.0-i486-1               
   installed                                        perlqt-4.8.5-i486-1                       
   installed                                        qtruby-4.8.5-i486-1                       
   installed                                        smokeqt-4.8.5-i486-1                      
   installed                                        libdbusmenu-qt-0.9.2-i486-2               
   installed                                        polkit-qt-1-0.103.0-i486-1                
   installed                                        qt-4.8.2-i486-4                           
   installed                                        qtscriptgenerator-0.2.0-i486-1            
  uninstalled          alienbob                     razor-qt-0.5.2-i486-1alien                

You can search specific files using "slackpkg file-search file".
Tried the same on -current 64 bit, works also without a flaw.
I think you have installed slackpkg+ on top of slackpkg TobiSGD? Look at your output versus the one of the OP.

Eric
 
Old 05-26-2013, 08:50 PM   #4
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 245

Rep: Reputation: 26
on stable 64, I got what OP got but when I did slackpkg search qt-4

Looking for qt-4 in package list. Please wait... DONE

The list below shows all packages with name matching "qt-4".

[ installed ] - perlqt-4.8.5-x86_64-1
[ installed ] - smokeqt-4.8.5-x86_64-1
[ installed ] - qt-4.8.2-x86_64-4 <---shows up
 
Old 05-27-2013, 12:14 AM   #5
swatnio
LQ Newbie
 
Registered: Jan 2009
Distribution: slackware
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by glorsplitz View Post
on stable 64, I got what OP got but when I did slackpkg search qt-4

Looking for qt-4 in package list. Please wait... DONE

The list below shows all packages with name matching "qt-4".

[ installed ] - perlqt-4.8.5-x86_64-1
[ installed ] - smokeqt-4.8.5-x86_64-1
[ installed ] - qt-4.8.2-x86_64-4 <---shows up
Yes, I've got the same result here, but, the problem is when you search for qt. The same thing would happen if you search for anything like this:
Code:
# slackpkg search foo
[ installed ] - bar-foo-2.2-x86_64-1
[ installed ] - foo-1.0-x86_64-1 <-- this one will not show up
searching for qt-4 works because kdevelop-pq-qt-1.0.0 doesn't match against qt-4, and any other package matches, the problem is when the package name is inside and between dashes (-) of other previous package

My question is... is it OK that when searching for qt, qt isn't shown? should I search for qt-4? or is this a bug?
using the slackpkg-2.82.0-noarch-8.tgz package, in /usr/libexec/slackpkg/core-functions.sh, doing something like this:
Code:
--- core-functions.sh   2013-05-27 02:05:39.021866309 -0300
+++ core-functions.sh.new       2013-05-27 02:05:34.674444014 -0300
@@ -705,9 +705,9 @@
                                                ${TMPDIR}/pkglist | cut -f6 -d\ )
                                        for FULLNAME in $PKGS ; do
                                                NAME=$(cutpkg ${FULLNAME})
-                                               echo $LIST | \
-                                                       grep -qwe "${NAME}-[^-]\+-\(${ARCH}\|fw\|noarch\)-[^-]\+" && \
-                                                       continue
+                                               #echo $LIST | \
+                                               #       grep -qwe "${NAME}-[^-]\+-\(${ARCH}\|fw\|noarch\)-[^-]\+" && \
+                                               #       continue
                                                LIST="$LIST ${FULLNAME}"
                                        done
                                done
It skips the condition that the package is shown only if it doesn't match against the other packages.... in other words, it shows the qt package when searching for qt.
of course, it is not a fix, that condition is for something... (why?)

thanks.
 
Old 05-27-2013, 12:22 AM   #6
parcox
LQ Newbie
 
Registered: Jan 2007
Location: Pontianak, Indonesia
Distribution: Slackware64-14.0
Posts: 26

Rep: Reputation: 5
Quote:
Originally Posted by swatnio View Post
Hello there,
Try to run:
# slackpkg search qt
you will find that the qt package is not shown...
Code:
[ installed ] - kdevelop-pg-qt-1.0.0-x86_64-1
[ installed ] - perlqt-4.8.5-x86_64-1
[ installed ] - qtruby-4.8.5-x86_64-1
[ installed ] - smokeqt-4.8.5-x86_64-1
[ installed ] - libdbusmenu-qt-0.9.2-x86_64-2
[ installed ] - polkit-qt-1-0.103.0-x86_64-1
[ installed ] - qtscriptgenerator-0.2.0-x86_64-1
debugging the slackpkg, i found that qt is not shown because when making the list of packages, (makelist in /usr/libexec/slackpkg/core-functions.sh) when it founds a new package, it only adds it to a list only if it is not on that list already. so, when it founds "qt", it matches against
kdevelop-pg-qt-1.0.0-x86_64-1
so it is not added to the list, so, it is not displayed..

It happens in slackware 14.0 and -current
Yes, it is a bug. There is a patch that can be found here[1].

[1] http://sourceforge.net/p/slackpkg/patches/6/
 
1 members found this post helpful.
Old 05-27-2013, 04:50 AM   #7
torimus
Member
 
Registered: Apr 2013
Distribution: Slackware
Posts: 81

Rep: Reputation: Disabled
I dunno why Pat decided to adopt slackpkg as a helper to pkgtools. Issues & quirks as far as I remember, not to mention some of a basic and expected features like listing of available packages still just miss.
I like its simplicity and the fact its written in (ba)sh contrary to the more mature slapt-get written in C, on the other hand it really need some finish work. Just my 2 .
 
Old 05-27-2013, 05:59 AM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,223

Rep: Reputation: Disabled
It's because slackpkg was written by one of the coreteam members.
Also, it is perfectly capable of keeping a system up to date and I always use it for system upgrades from one release to the next - never fails me.

And yes, it has some bugs but these do not occur in the critical parts.

Eric
 
Old 05-27-2013, 08:08 AM   #9
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,546

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
is there a software out there without any bugs?
for me, it's a very minor bug and we can use other ways by looking at /var/log/packages to see whether we have a certain package or not
 
Old 05-27-2013, 07:14 PM   #10
swatnio
LQ Newbie
 
Registered: Jan 2009
Distribution: slackware
Posts: 14

Original Poster
Rep: Reputation: 0
Well, thanks all, i think the patch parcox mentioned will be included
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackpkg package search function ADX Slackware 3 07-15-2011 12:49 PM
slackpkg search problem - not using /var/log/packages? plunder Slackware 2 09-21-2010 05:15 PM
Bug in slackpkg -- fail to find installed package? grissiom Slackware 8 07-16-2009 05:26 AM
bug- zero reply search titanium_geek LQ Suggestions & Feedback 5 05-13-2005 04:25 PM
bug in search?????????? mahen LQ Suggestions & Feedback 5 09-30-2004 09:29 AM


All times are GMT -5. The time now is 07:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration