LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-06-2021, 09:46 PM   #1
staus
Member
 
Registered: Apr 2004
Posts: 155

Rep: Reputation: 10
Help. I accidentally trashed my slackpkg updates.


I have totally corrupted my update files, and slackware no longer updates anything. I tried to "fix" the update problem. I probably really fouled up by deleting all files in the /var/log/packages, /var/log/remove_packages, and /var/log/removed_scripts. I then did a slackpkg update to reinstall all files, but this failed to completely repair the problem. My new /var/log/packages file is still missing many installed or upgraded files.
Any chance to fix this, or should I bite the bullet and reinstall?
 
Old 05-06-2021, 10:18 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
You might try running

Code:
slackpkg clean-system
If it returns any errors, you may want to post them to this thread, as they may shed some light on what's going on.

I must say, though, that, given all the stuff you've deleted, a reinstall is likely in the offing.

You might want to take a look at this: https://docs.slackware.com/slackware:slackpkg
 
Old 05-07-2021, 01:24 AM   #3
staus
Member
 
Registered: Apr 2004
Posts: 155

Original Poster
Rep: Reputation: 10
Thanks. I tried clean-system, but it found nothing amiss.
Looks more and more like a complete reinstallation. I just hate to have to redo all the mods and 3rd party software again. It takes hours to complete.
This is probably the 4th time that I could not get slackpkg upgrade-all to install files. Been using slackware for over 15 years.
 
Old 05-07-2021, 01:25 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
If you removed the content of /var/log/packages, /var/log/remove_packages, and /var/log/removed_scripts, then nothing is going to bring those back except installing all packages again. So a fresh install would be the sanest option.
 
Old 05-07-2021, 03:06 AM   #5
keithpeter
Member
 
Registered: Nov 2015
Location: 52:30N 1:55W
Distribution: Slackware 15.0, OpenBSD 7.4
Posts: 310

Rep: Reputation: Disabled
Quote:
Originally Posted by staus View Post
I just hate to have to redo all the mods and 3rd party software again. It takes hours to complete.
I'm quite good at messing things up, so I make backups of my dot files to a .tar.gz file that I keep a copy of. I've also done things like mount an installer iso and run upgradepkg with reinstall and install-new from within the Slackware(64) directory to get back to a known state.

Assuming backups of all data might be worth a try before a fresh install?
 
Old 05-07-2021, 05:15 AM   #6
staus
Member
 
Registered: Apr 2004
Posts: 155

Original Poster
Rep: Reputation: 10
Thanks for your responses. I will do a re-installation.
 
Old 05-07-2021, 05:31 AM   #7
mishehu
Member
 
Registered: Aug 2014
Location: USA
Distribution: Slackware (where ::1 is), Centos, Debian
Posts: 106

Rep: Reputation: 158Reputation: 158
If you want to get fancy, you can install onto btrfs, and then before you do anything wild'n'crazy that might cause you to wipe out all of /var/log/packages (or in -current/15.0beta, /var/lib/pkgtools), you create a snapshot of your filesystem. Then you do your wild'n'crazy thing, and if everything is ok after that, you can delete the snapshot if you like. If this sounds of interest to you, I suggest reading up on btrfs's wiki about subvolumes and snapshots.
 
Old 05-07-2021, 11:34 AM   #8
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
I suggest in the future renaming (or baking up) first before deleting - Exit Strategy.
 
Old 05-07-2021, 11:51 AM   #9
slackhater
Member
 
Registered: May 2021
Distribution: Slackware --> CRUX
Posts: 31

Rep: Reputation: 0
Quote:
Originally Posted by staus View Post
I have totally corrupted my update files, and slackware no longer updates anything. I tried to "fix" the update problem. I probably really fouled up by deleting all files in the /var/log/packages, /var/log/remove_packages, and /var/log/removed_scripts. I then did a slackpkg update to reinstall all files, but this failed to completely repair the problem. My new /var/log/packages file is still missing many installed or upgraded files.
Any chance to fix this, or should I bite the bullet and reinstall?
I'm afraid that you are done. Do fresh install (ideally something better, not Slackware :-) ). Basically, those directories are sort of "package database" which is gone, and there is no solution.

Last edited by slackhater; 05-07-2021 at 12:12 PM.
 
Old 05-07-2021, 02:58 PM   #10
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
The fix was simple - ask someone for copy of these directories. They are just text files containing description and install path. But the first is which Slackware version you were running. For custom builds it wouldn't work but for updates probably it could. You just little panicked.
 
Old 05-07-2021, 03:10 PM   #11
slackhater
Member
 
Registered: May 2021
Distribution: Slackware --> CRUX
Posts: 31

Rep: Reputation: 0
Quote:
Originally Posted by igadoter View Post
The fix was simple - ask someone for copy of these directories. They are just text files containing description and install path. But the first is which Slackware version you were running. For custom builds it wouldn't work but for updates probably it could. You just little panicked.
I'm trying to imagine asking that someone to send those files.

How to do that if you dont't have records what was installed? Oh I forgot ... may be because of that genious thing like "full install"
 
Old 05-07-2021, 03:11 PM   #12
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Everything possible. But the first - OP forgot - don't panic.
 
Old 05-07-2021, 03:13 PM   #13
slackhater
Member
 
Registered: May 2021
Distribution: Slackware --> CRUX
Posts: 31

Rep: Reputation: 0
To be fair, it is a bad implementation to make links in /var/log/packages, /var/log/scripts from their corresponding directories in /var/lib/pkgtools/, because those "logs" constitute pkgtools database. Logs you can truncate, and those files you can't touch. But who cares.

Last edited by slackhater; 05-07-2021 at 03:34 PM.
 
Old 05-07-2021, 03:17 PM   #14
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Whatever you say - is for sure true. No need to discuss anything. We are all turn into ears and listen to.
 
1 members found this post helpful.
Old 05-07-2021, 03:46 PM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by slackhater View Post
To be fair, it is a bad implementation to make links in /var/log/packages, /var/log/scripts from their corresponding directories in /var/lib/pkgtools/, because those "logs" constitute pkgtools database. Logs you can truncate, and those files you can't touch. But who cares.
These symlinks are only provided to allow a smooth migration from the old to the new location of the database. These kinds of things have allowed Slackware users to upgrade without a major issue since 16 July 1993.
 
2 members found this post helpful.
  


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
Help With Nasty Slackpkg/Slackpkg+ SNAFU enorbet Slackware 14 03-27-2021 09:01 PM
No updates shown in -current with slackpkg/slackpkg+ rpedrica Slackware 12 03-04-2021 12:20 PM
I trashed my grub.conf and need help vtbludgeon Red Hat 5 01-21-2004 11:32 PM
trashed my system, please help me find out why or how to fix it dwyatte Slackware 3 10-10-2003 09:53 PM
Trashed Grub -- Help! (RH8.0) Fredf Linux - Newbie 6 11-22-2002 07:16 PM

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

All times are GMT -5. The time now is 03:22 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