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-11-2011, 08:51 PM   #1
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Rep: Reputation: 15
BEWARE when patching 32 bits and 64bits


I just made a mistake and would like to warn others.

I had few Slackware machines running on both 32 bits and 64 bits machines.

On one of the 64 bits machine, I accidentally patch it with 32 bits patch files. RESULT: I am locked out from the systems as all the 'old - 64bits' files are deleted and since they are 32bit patch files, none were installed. I cannot do basic commands like 'ls' 'ps' or even 'reboot'.

Luckily, no major problem. I pop in the 64bit DVD and reinstall WITHOUT reformatting the HDD. It replaces all the missing files and booted up successfully.

I re-patch it with the 64 bits patch files and all completed successfully.

REQUEST: Can the developer put some form of check and prevent these kind of accident from happening?

Thanks.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-11-2011, 09:31 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Been there, done that.
 
Old 05-11-2011, 09:32 PM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,651

Rep: Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772Reputation: 1772
I don't think that's the task for the developer. It's the user's task to check and verify whether they applied the correct patch
 
Old 05-11-2011, 09:34 PM   #4
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 563

Rep: Reputation: 56
Quote:
Originally Posted by bsdunix View Post
Been there, done that.
Same here... good thing it wasn't a package that was system critical!
 
Old 05-11-2011, 10:10 PM   #5
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
I think in any programming code, there should be an error handling for possible scenario.
Of course, it's easy to say, user's responsibility.

In this case, I would say it's a bad error handling.
It removed the existing files thinking it would replace with the correct files without checking.
In the end, it delete without installing the new files.

A good error handling would be prompt the user that it was not the same version and EXIT without doing anything.

Based on some replies, it's not just me who made the same mistake.
Just wanted to warn others, so no time and effort are lost.

Cheers !!

Quote:
Originally Posted by willysr View Post
I don't think that's the task for the developer. It's the user's task to check and verify whether they applied the correct patch
 
Old 05-12-2011, 01:04 AM   #6
thegato
Member
 
Registered: Nov 2006
Posts: 48

Rep: Reputation: 4
Keep in mind multilib is a gift from Alien BOB and not part of the official distribution.

I had a little mishap myself when the 13.1 glibc patches were released. It was a good lesson to pay attention and not zone out. And a good reward for having my boot CD handy.


A little effort on our part is the least we can do.
 
Old 05-12-2011, 01:11 AM   #7
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,357

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
Quote:
n this case, I would say it's a bad error handling.
It removed the existing files thinking it would replace with the correct files without checking.
In the end, it delete without installing the new files.

A good error handling would be prompt the user that it was not the same version and EXIT without doing anything.
This behaviour is by design in the Slackware pkgtools. You need this behaviour to be able to handle reversion of version numbers and to handle packages without an architecture.

If you want some protection, use slackpkg. It will only get packages from the location specified in the mirrors file.

You sound like the guy who bought an angle grinder, misused it and cut a finger off, then complained that the angle grinder should have a guard on it so that it cannot cut anything.
 
5 members found this post helpful.
Old 05-12-2011, 01:52 AM   #8
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Doesn't it clearly say on bob's wiki to blacklist? I recall seeing that.................
 
Old 05-12-2011, 05:10 AM   #9
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
Quote:
Originally Posted by Manuel-H View Post
A good error handling would be prompt the user that it was not the same version and EXIT without doing anything.
Slackware simply expects, the user knows what is he (she) doing. I think that things like this are the major cause of the MS like OS behavior - asking you again and again whether are you sure in what you are going to do.

Last edited by hua; 05-12-2011 at 05:11 AM.
 
Old 05-12-2011, 06:00 AM   #10
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
True behaviour of how computers should behave: Your command I obey.

The system should explicitly not do such error checking; Good administrators look first and then commit... Of course, the people that said 'been there, done that' are not bad administrators for not checking. we're all humans and humans can make errors. It's from errors that one can learn. How would you upgrade from a 32bit to 64bit if checks were made that the 32bit files were not to be overwritten?

So, rather than asking for (yet another) safeguard: enjoy that Slackware will do what you command it to do. If you see "warnings" all the time, and you get an OK button; how often do you think you'd read the warning, and not just click 'OK'? Very few windows administrators that I know actually read the warnings, because they get so many, that they no longer bother to read all that useless information. Learn to be cautious when upgrading / replacing your important system files.
 
4 members found this post helpful.
Old 05-12-2011, 06:57 AM   #11
lotec25
Member
 
Registered: Oct 2003
Location: Holiday Fl
Distribution: Slackware-current
Posts: 77

Rep: Reputation: 19
Quote:
Originally Posted by Ramurd View Post
Very few windows administrators that I know actually read the warnings, because they get so many, that they no longer bother to read all that useless information. Learn to be cautious when upgrading / replacing your important system files.
Best thing I have read in a long time, and very true. Clicking "OK" just because it is there will never solve a problem.
 
Old 05-12-2011, 08:33 AM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I remember some time ago, downloading a 32-bit package accidentally, but when I tried to install it using 'installpkg' it didn't work. Will installpkg do this, or was it just my imagination ? If it does, then how exactly did it happen ?
 
Old 05-12-2011, 12:43 PM   #13
DragonWisard
Member
 
Registered: Sep 2004
Location: MD, USA (D.C. Suburbs)
Distribution: Slackware
Posts: 95

Rep: Reputation: 53
Because Slackware64 systems can optionally be multilib and run 32-bit packages the installpkg script can't simply block 32-bit packages.

The next logical argument would be "Can't it just block upgrading a package with a different arch" and the answer is still "no" because sometimes packages move from i486 to noarch or vice versa. Also, it's possible that some packages which are 32-bit only today (Skype) may eventually become 64-bit and we'll want to upgrade those.

So it's up to the system administrator to know what they are doing when they install/upgrade packages. There are enough valid exceptions to the rule that trying to automatically protect users from doing something stupid would be annoying more often than it would be helpful.
 
  


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
Can I install Linux 32 bits on system 64 bits? miros84 Linux - Software 7 01-06-2010 07:49 AM
How can i generate a virtual machine Linux X86_64 (64bits) in a Server 32 Bits? fsoteloh Linux - Hardware 5 10-09-2008 10:09 PM
To be 64bits or not to be 64bits, that's the question... Mega Man X General 9 01-11-2008 09:26 AM
32 bits version distros running 64 bits CPU javb Linux - General 4 04-02-2006 07:21 AM
sysinfo on 64bits machine with 32 bits kernels sarunya Linux - Newbie 0 08-29-2005 12:06 PM

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

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