LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-15-2014, 07:15 PM   #1
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Rep: Reputation: 40
Pkgtool functions not working anymore


The function Remove from from pkgtool menu just says that the packages have been removed.
The View option returns to main menu.
I did installpkg on pkgtool from slackware tree and same results.
I am using slackpkg for a while but only saw this problem on pkgtool now, cant say that was after slackpkg .
Any hints on what i can try to find out what is happening?

Last edited by frushiyama; 12-16-2014 at 08:04 PM. Reason: clarify the the view option
 
Old 12-15-2014, 07:44 PM   #2
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
If the View option shows you nothing, I wonder if your /var/adm/packages directory is empty? It should contain 1 file for each installed Slackware package.
 
Old 12-15-2014, 09:08 PM   #3
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 76
At casual glance, there's not much going on there other than dialog and removepkg, which in turn may make use of things like coreutils, find (findutils), and sed. Are all of these installed and working OK? And then there are the pkgtools themselves, and it probably helps to have bash as /bin/sh as well...

Last edited by mlslk31; 12-15-2014 at 09:10 PM. Reason: add pkgtools and bash mention
 
Old 12-16-2014, 05:25 PM   #4
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by ljb643 View Post
If the View option shows you nothing, I wonder if your /var/adm/packages directory is empty? It should contain 1 file for each installed Slackware package.
No, it is normal, all packages folders are there.
Quote:
Originally Posted by mlslk31 View Post
At casual glance, there's not much going on there other than dialog and removepkg, which in turn may make use of things like coreutils, find (findutils), and sed. Are all of these installed and working OK? And then there are the pkgtools themselves, and it probably helps to have bash as /bin/sh as well...
I have this packages:
coreutils-8.21-x86_64-1
findutils-4.4.2-x86_64-1
sed-4.2.2-x86_64-1
All installed.
 
Old 12-16-2014, 06:59 PM   #5
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Quote:
The View option shows nothing and returns to main menu.
To clarify: Using root, you run pkgtool without arguments. From the menu, you select View and press Enter. You do, or do not get a list of installed packages at this time? (It could take a few seconds to generate the list.)

If you do get a list of packages from View, then you select any package and press Enter. Instead of seeing the package information and file list, you just get the pkgtool main menu again?

Although I agree with mislk31 that points to a possible problem with dialog, coreutils, sed, etc... I'm still suspicious of your /var/log/packages directory. How about trying these commands (not as root):

Code:
cd /var/log/packages
ls | wc -l   
grep -c '^PACKAGE NAME:' * | wc -l
grep -c '^FILE LIST:' * | wc -l
All 3 commands above should display the same number - the number of installed Slackware packages. If one of them shows a different number, you can use a command like this to find the offending files:

Code:
grep --files-without-match '^PACKAGE NAME:' *
 
Old 12-16-2014, 07:55 PM   #6
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by ljb643 View Post
To clarify: Using root, you run pkgtool without arguments. From the menu, you select View and press Enter. You do, or do not get a list of installed packages at this time? (It could take a few seconds to generate the list.)

If you do get a list of packages from View, then you select any package and press Enter. Instead of seeing the package information and file list, you just get the pkgtool main menu again?
I do not get list a of files like usualy do, i get the pkgtool menu again.

Quote:
Originally Posted by ljb643 View Post
Although I agree with mislk31 that points to a possible problem with dialog, coreutils, sed, etc... I'm still suspicious of your /var/log/packages directory. How about trying these commands (not as root):

Code:
cd /var/log/packages
ls | wc -l   
grep -c '^PACKAGE NAME:' * | wc -l
grep -c '^FILE LIST:' * | wc -l
I have 1319 packages, all the same number from the ls and two grep commands like ljb643 said.
Quote:
Originally Posted by ljb643 View Post
All 3 commands above should display the same number - the number of installed Slackware packages. If one of them shows a different number, you can use a command like this to find the offending files:
Code:
grep --files-without-match '^PACKAGE NAME:' *
This had no output.
 
Old 12-16-2014, 09:25 PM   #7
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
OK, thanks, sorry that didn't help except maybe to rule out a messed up package directory, and I'm out of ideas now.
 
Old 12-16-2014, 09:59 PM   #8
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 76
I just get fed up and reinstall stuff at this point. I might go in the order bash, pkgtools, coreutils, sed, findutils, util-linux. However pkgtool is a shell script, and there are two create_list_of functions that you can look at, after opening the file in a text editor. Maybe there's some obvious point where the script is failing.
 
Old 12-18-2014, 10:55 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Francis, I just tried and couldn't reproduce your issue.

Could you give some examples of packages with which you encountered these problems?
 
1 members found this post helpful.
Old 12-18-2014, 04:31 PM   #10
TLE
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: SW 14.2 x6, 1x current
Posts: 55

Rep: Reputation: 10
"I do not get list a of files like usualy do, i get the pkgtool menu again."

This is the same for me.
I can delete a package from remove menu but the view-mode does not work, half second and I'll come back to default menu again

SW current/32
 
Old 12-18-2014, 04:49 PM   #11
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 76
Maybe there's a language issue, with you posting from Sweden and the original poster posting from Brazil? So I ask blindly: Would it make a difference to start pkgtool as "env LC_ALL=C pkgtool" ?

Otherwise, I can produce this issue exactly only by starting pkgtool like "/bin/zsh pkgtool". A close second would be to remove sed or grep, but that doesn't cause returns to the main menu, it creates empty lists.
 
2 members found this post helpful.
Old 12-18-2014, 05:00 PM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by mlslk31 View Post
Maybe there's a language issue, with you posting from Sweden and the original poster posting from Brazil? So I ask blindly: Would it make a difference to start pkgtool as "env LC_ALL=C pkgtool" ?
Unlikely, IMO

Quote:
Otherwise, I can produce this issue exactly only by starting pkgtool like "/bin/zsh pkgtool". A close second would be to remove sed or grep, but that doesn't cause returns to the main menu, it creates empty lists.
AFAIK this is a bash script, not a zsh script.
 
Old 12-18-2014, 05:12 PM   #13
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by mlslk31 View Post
Maybe there's a language issue, with you posting from Sweden and the original poster posting from Brazil? So I ask blindly: Would it make a difference to start pkgtool as "env LC_ALL=C pkgtool" ?

Otherwise, I can produce this issue exactly only by starting pkgtool like "/bin/zsh pkgtool". A close second would be to remove sed or grep, but that doesn't cause returns to the main menu, it creates empty lists.
Calling with env LC_ALL=C pkgtool and menus are back to normal.
My /etc/profile.d/lang.sh is export LANG=pt_BR.UTF-8 .

I use pt_BR.UTF-8 in slackware arm port which is still under pkgtools-14.1-noarch-1 and there this issue did not occur.
 
Old 12-18-2014, 05:13 PM   #14
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 76
Surprisingly, this part of pkgtool works with bash, ash, and ksh93. I haven't tried to execute the functions using non-bash shells, and that part might go differently. I even tried grabbing the latest bash out of slackware-current, and that changed nothing: Everything works well here. So my remaining option is to go home and look at it using a slackware-current that was installed just this morning, see if it's different. Either that or somebody would post snippets of script output, and I can see if it looks the same here.
 
Old 12-19-2014, 07:01 AM   #15
TLE
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: SW 14.2 x6, 1x current
Posts: 55

Rep: Reputation: 10
Calling with env LC_ALL=C pkgtool is working fine for me


in: /etc/profile.d/lang.sh I have export: LANG=en_US.UTF-8

Same settings in SW 13.37 works fine with pkgtool
 
  


Reply

Tags
pkgtool, slackpkg



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
pkgtool doesn't work anymore after upgrade... Necronomicom Slackware 1 03-26-2007 02:55 PM
Azureus not working anymore dlublink Linux - Software 2 11-21-2005 08:15 PM
C inline functions working linetnew Programming 0 04-17-2005 08:49 AM
pkgtool stopped working properly hubabuba Slackware 4 04-05-2005 02:15 PM
pkgtool not working? esael Slackware 6 11-08-2002 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration