LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-29-2011, 08:32 AM   #1
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Rep: Reputation: Disabled
No List of Package Database Installed in /var/log/packages - Slackware 13.37


Hi,

I managed to install Slackware 13.37, and later on wanted to remove a package when I realized nothing is showing up in `pkgtool' view/remove menus. As a matter of fact, there is nothing in /var/log/packages to begin with. The only package available is a library I installed after Slackware installation (DVD). I selected individual packages -- a painstaking process -- during my setup installation, and I was hoping I could keep the list for future reference but alas, there is nothing there now.

I don't know how that happened but I opted to use LVM to manage my devices and placed /var/log and /var, each, in their own respective logical volume. I do not know if that somehow caused problems in terms of setup installation not being able to write to /var/log.

Is there anyway I can get the list of installed packages now? Or is there a program that can scan my system and generate a list of installed packages? This is just terrible.


Sincerely,
 
Old 12-29-2011, 09:54 AM   #2
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
The list of packages might be in the /var/log/packages directory on your root partition, but invisible since your LVM volumes are mounted on top.
You might want to login as root, runlevel 1 and check.
If everything is there, copy the contents to a temporary location (like /root/var/...) and then login again normally with your logical volumes mounted and move everything over.
 
Old 12-29-2011, 09:58 AM   #3
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
I think we can do something but I don't have much script-fu to do it myself.
-First of all, Every file in the system can be find part of which package easily (by grepping manifest.gz or using slackpkg file-search)
-Using first information, we can get some command combo to grep manifest.gz file by file, it will take some time but it is a sure way to get a list of insttaled packages with apsense of package logs.

Maybe something like this:
Code:
find . -exec slackpkg file-serach {}  | grep [ installed ] >> packages \;
List will be a little bit sort uniq man help us
Code:
sort packages | uniq
 
Old 12-29-2011, 11:12 AM   #4
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by niels.horn View Post
The list of packages might be in the /var/log/packages directory on your root partition, but invisible since your LVM volumes are mounted on top.
You might want to login as root, runlevel 1 and check.
If everything is there, copy the contents to a temporary location (like /root/var/...) and then login again normally with your logical volumes mounted and move everything over.
I did `init 1' but inspecting /var/log appears to show an old directory structure with nothing in the packages/. I don't know what happened; maybe I formatted /var/log before /var in Slackware installation setup's TARGET but not sure in what order or procedure does the `setup' program executes commands, i.e. does it only format when partitions are assigned a mount point in TARGET sub-menu and then once all are done (displays the content of /etc/fstab), it performs the actual mount command, or does it do it individually after each filesystem formatting!

What should the order of formatting (in setup's TARGET) be if one decides to put /var and /var/log on different LV's?
 
Old 12-29-2011, 11:17 AM   #5
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ozanbaba View Post
I think we can do something but I don't have much script-fu to do it myself.
-First of all, Every file in the system can be find part of which package easily (by grepping manifest.gz or using slackpkg file-search)
-Using first information, we can get some command combo to grep manifest.gz file by file, it will take some time but it is a sure way to get a list of insttaled packages with apsense of package logs.

Maybe something like this:
Code:
find . -exec slackpkg file-serach {}  | grep [ installed ] >> packages \;
List will be a little bit sort uniq man help us
Code:
sort packages | uniq
Thank you, but I'm having a hard time seeing how that can be any help. I updated slackpkg which apparently retrieved list of all the latest packages for 13.37, then executed your command with some modifications because I don't think it's correct:

Code:
find . -exec slackpkg file-search "{}" \;  | grep "uninstalled" >> packages
If I simply execute the `find' command, it doesn't list any "installed" (or for that matter a string "[ installed ]") but merely "[uninstalled]" list. I don't think this list is any help, because I see list of packages which include many that I did not install and many that I did install. So I'm assuming it's a comprehensive list of all packages -- 1118 of them.
 
Old 12-29-2011, 11:18 AM   #6
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
as far as I know, the slackware installer formats partitions (and mounts them after, asking the mountpoint) *before* any actual file is copied/installed/created in the target, so you should be safe following the standard procedure.
 
Old 12-29-2011, 11:19 AM   #7
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by Jimjax View Post
Thank you, but I'm having a hard time seeing how that can be any help. I updated slackpkg which apparently retrieved list of all the latest packages for 13.37, then executed your command with some modifications because I don't think it's correct:

Code:
find . -exec slackpkg file-search "{}" \;  | grep "uninstalled" >> packages
If I simply execute the `find' command, it doesn't list any "installed" (or for that matter a string "[ installed ]") but merely "[uninstalled]" list. I don't think this list is any help, because I see list of packages which include many that I did not install and many that I did install. So I'm assuming it's a comprehensive list of all packages -- 1118 of them.
It has duplicates. There's a reason I put sort | uniq there.
 
Old 12-29-2011, 11:26 AM   #8
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
Quote:
Originally Posted by ponce View Post
as far as I know, the slackware installer formats partitions (and mounts them after, asking the mountpoint) *before* any actual file is copied/installed/created in the target, so you should be safe following the standard procedure.
Correct, but... If you create new partitions after installation (LVM or not, second drive for instance), then you will have to take care to copy / move all files already there.
 
Old 12-29-2011, 11:32 AM   #9
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
as far as I know, the slackware installer formats partitions (and mounts them after, asking the mountpoint) *before* any actual file is copied/installed/created in the target, so you should be safe following the standard procedure.
I see, but if I can vaguely remember, when I tried to select a mounting point and format a LV for /var/log, the installation crapped out, spewed bunch of errors that basically it cannot write to /var/log/something, and ultimately exited the setup installation and back to the prompt line. I ran the `setup' again, this time, formatted (and I assume mounting is performed after individual formatting) /var first, then /var/log which produced no error message.

I could be wrong, maybe I formatted/created mounting point for /var first, then /var/log which caused those errors, nonetheless, after the second try, it did work and I managed to install everything without any problem. Note that I did not start selecting or installing any packages prior to getting everything set in ADDSWAP and TARGET.

Last edited by Jimjax; 12-29-2011 at 11:36 AM.
 
Old 12-29-2011, 11:33 AM   #10
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ozanbaba View Post
It has duplicates. There's a reason I put sort | uniq there.
Right, but that's not an issue here. The list I get from `slackpkg' only lists all the uninstalled packages, and it really includes everything. I'm presuming that since it cannot find any package list installed on my system, it lists "all" packages which is no use in this case.
 
Old 12-29-2011, 11:35 AM   #11
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by niels.horn View Post
Correct, but... If you create new partitions after installation (LVM or not, second drive for instance), then you will have to take care to copy / move all files already there.
No new partition or LV created after the installation, only extended /usr afterward without any problem. I didn't touch /var or /var/log LV's.
 
Old 12-29-2011, 11:36 AM   #12
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by Jimjax View Post
Right, but that's not an issue here. The list I get from `slackpkg' only lists all the uninstalled packages, and it really includes everything. I'm presuming that since it cannot find any package list installed on my system, it lists "all" packages which is no use in this case.
actually it will say uninstalled as it uses log/packages for checking if package is installed or not. ANd because we check if a file already existing in the system, it is usure that list is installed packaged.
 
Old 12-29-2011, 11:39 AM   #13
Jimjax
LQ Newbie
 
Registered: Dec 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ozanbaba View Post
actually it will say uninstalled as it uses log/packages for checking if package is installed or not. ANd because we check if a file already existing in the system, it is usure that list is installed packaged.
Right, as I guessed, it performs some comparison between what has been installed by scanning /var/log/packages, but since mine is empty, it makes a full list. *sigh*
 
Old 12-29-2011, 11:41 AM   #14
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by Jimjax View Post
Right, as I guessed, it performs some comparison between what has been installed by scanning /var/log/packages, but since mine is empty, it makes a full list. *sigh*
I disagree that it is a full list.
 
Old 12-29-2011, 11:42 AM   #15
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
Quote:
Originally Posted by Jimjax View Post
I see, but if I can vaguely remember, when I tried to select a mounting point and format a LV for /var/log, the installation crapped out, spewed bunch of errors that basically it cannot write to /var/log/something, and ultimately exited the setup installation and back to the prompt line. I ran the `setup' again, this time, formatted (and I assume mounting is performed after individual formatting) /var first, then /var/log which produced no error message.

I could be wrong, maybe I formatted/created mounting point for /var first, then /var/log which caused those errors, nonetheless, after the second try, it did work and I managed to install everything without any problem. Note that I did not start selecting or installing any packages prior to getting everything set in ADDSWAP and TARGET.
When the setup exited/crashed the first time (I guess because of playing with partitions after having started it), probably it has left the running OS of the installer in an inconsistent state.

When this happens, I think it's advisable to shutdown and restart the installation.

Last edited by ponce; 12-29-2011 at 11:50 AM.
 
  


Reply



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
/var/log/packages and /var/log/setup sunny_5252 Slackware 4 05-17-2007 08:17 PM
rm -r /var/log - oops - pkgtool package list gone technomeister Slackware 12 02-06-2007 12:37 AM
List of installed slackware packages hogda02 Slackware 5 08-22-2006 02:11 PM
Identifying "non-native" Slackware-packages in /var/log/packages Yalla-One Slackware 8 07-06-2006 06:57 AM
How is the file list in /var/log/packages/* generated? hollywoodb Slackware 4 09-19-2004 09:16 AM

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

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

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