×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

iTunes 2.0 Installer Deletes Hard Drives

michael posted more than 12 years ago | from the making-room-for-more-mp3s-i-guess dept.

Apple 511

Cheviot writes: "It seems Apple's new iTunes 2 installer deletes the contents of users' hard drives if the drives have been partitioned. I personally lost more than 100gb of data. More information is available at Apples Discussions board. (registration required). Apple has pulled the installer, but for hundreds, if not thousands, the damage is already done." The iTunes download page has a nice warning about the problem. Ouch.

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

511 comments

There's a very good reason for this... (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#2518187)

but I dunno what it is...

FIRST POST baby!!!

hah

Re:There's a very good reason for this... (-1, Troll)

Anonymous Coward | more than 12 years ago | (#2518201)

Well deserved. If you want a pussy propietary but pleasant OS load Windows. If you want a hard and powerfull OS load FreeBSD or (gnu)Linux.

OSX is cheating making the stable old good linux world windowish dumb to end users and making it Closed Source again. Not good and you can now see why.

first! (-1)

Anonymous Coward | more than 12 years ago | (#2518190)

my friend downloaded this. I don't think he was partioned though. lucky for him, i guess.

The power Mac (-1, Troll)

Hombo (532265) | more than 12 years ago | (#2518192)

Don't be stupid people. That is actually one of the powerful built in features of Mac and the god sent iTune app. Automatically cleans up your drives. Now that is one powerful OS meant for max productivity

How the hell does this happen? (4, Funny)

dimator (71399) | more than 12 years ago | (#2518193)

Well, here's the pseudo-code:


if(installDrive->hasEnoughSpace()){
return startInstall(instalDrive);
} else {
installDrive->formatRecklessly();
return startInstall(installDrive);
}


Hard-to-spot bug, actually.

Re:How the hell does this happen? (1)

RiffRafff (234408) | more than 12 years ago | (#2518208)

Doesn't anyone test their code anymore??? I mean, how hard can this be?

Re:How the hell does this happen? (3, Flamebait)

Jace of Fuse! (72042) | more than 12 years ago | (#2518227)

No.

Sorry.

Extensive testing went out of style around the mid 90's.

Oh -- and actually writting REALLY good code, that's been out of style since at LEAST the 80's.

I blame colleges for letting so many graduates think that they are instantly coders.

Real coders are born, not made.

And anybody who got into computers for the money, and not the thrill of writing code -- well -- they're worse than lame. And they probably use AOL.

*sigh* Amateurs... (1)

cthugha (185672) | more than 12 years ago | (#2518232)

Now that's not very tight code, is it? Instead, try:


if(!installDrive->hasEnoughSpace())
installDrive->formatRecklessly();
return startInstall(installDrive);


A much superior algorithm for nuking innocent users' hard drives, I'm sure you'll agree.

Re:How the hell does this happen? (0)

Anonymous Coward | more than 12 years ago | (#2518234)

It happens because Apple uses the .pax archive format inside of its "pkg" files. This format is known to be a risky choice because it can do very "destructive" updates if not used very, very, very carefully as seen in this case.....

[PATCH] Re:How the hell does this happen? (2, Funny)

Anonymous Coward | more than 12 years ago | (#2518248)

There's a bug in you pseudo-code. Attached is a patch which fixes the problem.

--- itunes-install.pseudo-orig Sun Nov 4 01:36:11 2001
+++ itunes-install.pseudo Sun Nov 4 01:36:19 2001
@@ -1,5 +1,5 @@
if(installDrive->hasEnoughSpace()){
- return startInstall(instalDrive);
+ return startInstall(installDrive);
} else {
installDrive->formatRecklessly();
return startInstall(installDrive);

Re:[PATCH] Re:How the hell does this happen? (3, Funny)

jesser (77961) | more than 12 years ago | (#2518277)

There's a bug in you pseudo-code. Attached is a patch which fixes the problem.

It's pseudocode. You can't patch pseudocode. You have to pseudopatch it, like this:

- return startInstall(instalDrive);
+ return startInstall(installDrive);

or like this:

Replace instalDrive with installDrive.

FIRST POST! (-1, Flamebait)

Anonymous Coward | more than 12 years ago | (#2518194)

Yeahh, you don't see windows stuff pullin that crap

So.. buy an iPod.. hose your system?? (-1, Flamebait)

Anonymous Coward | more than 12 years ago | (#2518195)

I guess the iPod really *does* leave uPissed when you try it... ;)

New Apple Slogan (4, Funny)

Anonymous Coward | more than 12 years ago | (#2518196)

Rip. Mix. Burn. Format. Reinstall.

how much you wanna bet.... (0)

Anonymous Coward | more than 12 years ago | (#2518199)

apple starts marketing backup systems for macs by christmas.. :)

Note to Apple Corp: (1, Insightful)

Travoltus (110240) | more than 12 years ago | (#2518206)

A budget for a Quality Assurance tester team is 100% NOT WASTEFUL spending.

Liability (2, Interesting)

jeti (105266) | more than 12 years ago | (#2518207)

I really wonder about the legal foundation of:
"You should've backuped. We're not responsible
for any damage that erasing all your data caused."

(Yes, it's in the license. But can it be valid?)

Re:Liability (1)

JohnHegarty (453016) | more than 12 years ago | (#2518214)

That's like saying we are not responsible that the car you bough has a design flaw, which causes it to blow up ... but were not responsible .... really , i swear...

Re:Liability (0)

Anonymous Coward | more than 12 years ago | (#2518242)

Actually, there is *no* responsibility outside of the code of law. Your analogy may well have appeal to the common citizen, or to the lawmaker, but unfortunately it will carry no sway in a court of *law*.

If I, being a 12year-old asm hacker, write and distribute a program which unbeknownest to myself, formats your harddrive, I am rather certain that there is not a state in the union that will find myself responsible for this if I include the proper EULA.

Re:Liability (1)

Moridineas (213502) | more than 12 years ago | (#2518216)

What do you mean can it be valid? You didn't HAVE to install the software, nobody made you. Indeed, you had to agree to said license before you could download or install it. Sure, it may not be cool, but if it's in the license agreement and doesn't break any laws, i don't see how it can NOT be valid.

Scott

Re:Liability (0)

Anonymous Coward | more than 12 years ago | (#2518244)

Well, although you are likely correct in this case, do not allow yourself to be lead into believing that, "if its in the contract, it is legally binding."

This is quite often not the case. Contracts themselves have no inate power, but only that which law allots them. In the U.S., this is considerably less than many corporations would like you to *believe*.

Re:Liability (0)

Anonymous Coward | more than 12 years ago | (#2518245)

There's no agreement if there's no signature. Non english speaking people just try every button until the sofware installs. If you can get the thing to work without signing any contract, no extra rules apply.

Re:Liability (1)

jeti (105266) | more than 12 years ago | (#2518254)

Well I don't know too much about US law.
But in Germany, if you cause damage by
being grossly careless (grob fahrlaessig),
you're generaly held responsible for the
damage you do. I wonder if a license can/
should be able to override such laws.

The other question is: Can you really expect
people to do a daily backup? What's the
percetage of computer users (and companies)
doing this?

Re:Liability (0)

Anonymous Coward | more than 12 years ago | (#2518275)

you're generaly held responsible for the damage you do.

In the States the general principle is that if you get hurt in any way... SUE THEM TO HELL!

However, even though EULAs are unenforceable, suing a megacorp like Microsoft would just bleed you dry of cash. That's why even 400 lb corporate gorillas like IBM, Oracle or Sun with legions of rabid lawyers won't consider a legal attack on Microsoft. It would be a financial quagmire and could last decades.

Re:Liability (1)

cthugha (185672) | more than 12 years ago | (#2518333)

In common law countries (UK, US, Canada, Australia, NZ, etc) parties can be excluded from liability in negligence as part of a contract/legally binding agreement, but that doesn't apply to a third party, and also won't apply in cases of spectacularly gross negligence, IIRC.

Re:Liability (0)

Anonymous Coward | more than 12 years ago | (#2518218)

I would like to believe that they could be held liable if one could demonstrate malicious intent.

...but I somehow doubt the presence of such in this situation.

Re:Liability (1, Interesting)

Anonymous Coward | more than 12 years ago | (#2518272)

I really wonder about the legal foundation of:
"You should've backuped. "


And more interestingly: if your backup software erases all your data and has such an EULA, what happens?

Installer too clever for its own good (0)

Anonymous Coward | more than 12 years ago | (#2518210)

Why would an installer need to play with low-level harddisk calls in the first place?

Re:Installer too clever for its own good (0)

Anonymous Coward | more than 12 years ago | (#2518228)

One would expect that it is by no direct fault of the installer itself, but rather that the blame lies with an unexpected interaction between the installer and the OS.


As to guessing what that may be; we simply are not in a position to do so with any degree of certainty.

Oh, come on... (2, Interesting)

CrayBeast (521458) | more than 12 years ago | (#2518211)

Don't they test these things, anymore?

Really, in the current economic climate, all the monkeys should have been thrown out of the high-tech jobs, leaving only clueful people.

How does a bug like this occur?


Re:Oh, come on... (0)

Anonymous Coward | more than 12 years ago | (#2518219)

Really, in the current economic climate, all the monkeys should have been thrown out of the high-tech jobs, leaving only clueful people.

How does a bug like this occur?

Perhaps a disgruntled employee? Or maybe the bug was time-sensitive, and thus did not show up in testing.

Re:Oh, come on... (0)

Trollificus (253741) | more than 12 years ago | (#2518246)

Why don't you ask Roxio this question. They know all about that sort of thing [theregister.co.uk].

You Mac people got off easy. The bug in Roxio's Take Two module carves your disk up like a thanksgiving turkey, leaving damaged sectors in it's wake.
I haven't seen anything that bad since the old days of Windows 3.1 and Dos
Roxio, of course, is playing it down saying that the only issue with the Take Two module is that it simply isn't up to date with current technology. They make no mention of the implications of installing this program(it ships with Easy CD Creator 5 Platinum).
I know the Register has a reputation for being a bit over the edge when it comes to their conspiracy theories, but I've seen this bug in action first hand nad I can tell you it's not pretty.

DOH! (0)

Anonymous Coward | more than 12 years ago | (#2518215)

I *hate it* when that happens!!!

Good Read (2, Redundant)

Kira-Baka (463765) | more than 12 years ago | (#2518220)

http://newforums.macnn.com/cgi-bin/ultimatebb.cgi? ubb=get_topic&f=46&t=000865

It has some info about causes and solutions...

Re:Good Read (2)

batobin (10158) | more than 12 years ago | (#2518267)

Actually, your URL has a space too many. Here's one that works:

Link [macnn.com], or if you're scared I'm trying to show you porn:
http://newforums.macnn.com/cgi-bin/ultimatebb.cg i? ubb=get_topic&f=46&t=000865

Re:Good Read (0)

Anonymous Coward | more than 12 years ago | (#2518308)

or if you're scared I'm trying to show you porn:
http://newforums.macnn.com/cgi-bin/ultimatebb.cg i? ubb=get_topic&f=46&t=000865


boooorrriiiing... how about some porn instead?

Re:Good Read (1)

akc (207721) | more than 12 years ago | (#2518281)

http://newforums.macnn.com/cgi-bin/ultimatebb.cgi? ubb=get_topic&f=46&t=000865


You need to loose the space after the "?"

Re:Good Read (0)

Anonymous Coward | more than 12 years ago | (#2518304)

I think that's inserted automagically by /., for some unknown reason.

I'll paste it without the space and we'll see:
http://newforums.macnn.com/cgi-bin/ultimatebb.cg i? ubb=get_topic&f=46&t=000865

Already updated (3, Informative)

Anonymous Coward | more than 12 years ago | (#2518222)

Apple has already put iTunes 2.0.1 that purportedly takes care of the problem:

http://www.apple.com/itunes/download/

new version posted (0)

Anonymous Coward | more than 12 years ago | (#2518223)

the new version of itunes for osx (v. 2.0.1) has already been posted with the bug fixed. itunes 2 for os9 didn't have this problem.

A bit late now....... (1)

JohnHegarty (453016) | more than 12 years ago | (#2518224)

"An important note for those who have downloaded iTunes 2.0 for Mac OS X:
Apple has identified an installer issue with iTunes 2.0 for Mac OS X that affects a limited number of systems running Mac OS X with multiple volumes (drives or partitions) mounted. For those systems, running the iTunes 2.0 installer can result in loss of user data. While this error is highly unlikely to affect most users, Apple strongly advises that anyone who has downloaded the 2.0 version of iTunes for Mac OS X, as well as anyone who has a beta version of iTunes 2.0 for Mac OS X, immediately remove the iTunes.pkg installer file from their system. A new version that corrects this issue, iTunes 2.0.1 for Mac OS X, is now available from this page. Users who have already installed iTunes 2.0 without incident do not need to reinstall iTunes 2.0.1, but they should still immediately remove the 2.0 installer file from their system. This issue does not affect users of iTunes 2.0 for Mac OS 9."

Its like they are saying , its out fault , honest....

Homosexuals fear God's wrath (-1)

Trollificus (253741) | more than 12 years ago | (#2518225)

"I personally lost more than 100gb of data"

No one escapes the wrath of God. This is your punishment for using homosexual operating systems!

Re:Homosexuals fear God's wrath (0)

Anonymous Coward | more than 12 years ago | (#2518279)

Fool! Read your scripture. It's the electronic version of fire and brimstone - the punishment for having 100 gigs of gay porn. His hard drive was even named Sodom.

Censorware (0)

Anonymous Coward | more than 12 years ago | (#2518229)

Due to excessive heterosexual posting this IP has been disabled

Please try to post only messages about hot man-man sex

*BURP!*

Corrected version 2.01 already posted by Apple. (3, Informative)

sakusha (441986) | more than 12 years ago | (#2518233)

Come on now, Apple jumped on this one, it was only reported by a couple of people, and they corrected the problem almost immediately. This problem only came to light today, and they have a fix out the same day. I downloaded the new 2.01 version, installed with no problems.

Re:Corrected version 2.01 already posted by Apple. (1)

Spock the Vulcan (196989) | more than 12 years ago | (#2518257)

And I salute you, sir, for being brave enough to even think of installing what has clearly been demonstrated as badly written, dangerous software. I somehow don't believe that if a bug like this got through into a release, that it might not have more nice things inside it, that version 2.01 might not have corrected. (Ok, too many negatives in one sentence).

Re:Corrected version 2.01 already posted by Apple. (1)

wizbit (122290) | more than 12 years ago | (#2518278)

This problem only came to light today, and they have a fix out the same day.

Took the words out of my mouth. I concede that this is more severe than a security bug since an otherwise benevolent installer inadvertantly destroyed real data because of a poorly-written shell script.

But the fast turn-around by Apple at least minimized their collateral damage. Had this not turned up within hours, and a fix not been available within a couple more, it could have been a serious problem. But give Apple credit for fixing a problem like this quickly.

iTunes 2 was rushed to market because the iPod requires it. QA slipped, and didn't test this on enough configurations to realize the error before publishing it. But the work that went into iTunes finally brings some features that I've been waiting for to this product (who ever heard of shipping an audio player without an equalizer?) - don't let this cloud the hard work the apple engineers put into iTunes.

This has already been fixed... (1)

everyplace (527571) | more than 12 years ago | (#2518235)

While no-one will disagree that this was a MAJOR problem, it has already been fixed. I have to say that it was pretty bad form for this bug to get out of the door today with the release of iTunes 2, but at the same time, I'm glad that they fixed it within 24 hours.

For a short time this afternoon the OS X installer wasn't available, but it has since been replaced with a version that doesn't randomly reformat other partitions or drives. The new installer can be found at apple [apple.com]'s web site, free to download of course, assuming that you can run it, IE you're on a mac.

everyplace

Wide spread? (2, Interesting)

panZ (67763) | more than 12 years ago | (#2518236)

I'm guessing this has happened to a limited number of people. I used the old iTunes2 installer on a number of machines with multiple partitions as have my friends and none of us lost any data. What conditions cause this "feature" to occur?

Any sort of renumeration? (1)

tahpot (237053) | more than 12 years ago | (#2518239)

I assume they would have had a disclaimer along the lines of "run this installer and we take no responsibility", but surely with an error as bad as this they must take some blame and give their customers adequate compensation. Deleting data is about the worst sin that software can do. The software wasn't marketed at deleting data, so the fact that it does, and irresponsibly, should make them liable.

Re:Any sort of renumeration? (0)

Anonymous Coward | more than 12 years ago | (#2518252)

Unfortunately, it does not make them liable, unless of course you turn up an internal memo or testimony demonstrating malicious intent. Even then, it may not be sufficient.

Late posting? (1)

ted_rust (45928) | more than 12 years ago | (#2518240)

The problem was fixed long before this story was even posted. The bug is not inexcusable, but at least they pulled it quickly, fixed it within a day and posted a new version with a clear explanation of what happened.

--
tsr

Disable this Cmdr Hitler (-1, Troll)

Anonymous Coward | more than 12 years ago | (#2518241)

This had gone on for four years group sex hardcore teen porn with no sexual contact with men or women. Now totally spent, he collapsed on top of her, kissing her neck and group sex free hardcore teen porn cheeks softly until his cock grew soft and slipped out of her now gaping vagina. Her clit was at least two or group sex nothingbut threesomes three times bigger than normal! They left the party arm in arm, group sex
pushed her back onto the group sex gangbang free floor and stuck two fingers into Monica's cunt and fingered her to a stunning orgasm. Carla looked at her friend Kim who was sitting next to her, and then group sex free hardcore naturist porno turned back to Jill and said, Let us show you what you must do tonight! William continued on, John, do you think I'd come here and group sex hardcore pornographie make a charge like this if I didn't have solid proof against her! Her nipples were shriveled up and hard, and Rachel took one of them in group sex orgysex her hand and gently twisted it, causing her pussy to tighten even more! Reaching into a large black leather bag Vera group sex bisexual threesome advice Lane pulled
Linda's mouth with cum. Closer and closer the old woman came, causing Page to feel that group sex groupsex private she might actually have a panic attack right there on La Salle Street! Out of the corner of her eye Amanda saw one group sex free gangbang pix of the cameras turning directly towards them. Do you want me to tell you group sex gay male gangbangs how wet I am right now, she asked! After fifteen minutes and still no power, Tom sat down on the floor to rest, and the group sex free inter racial orgies young woman who introduced herself as Sandra, still stood in the corner not moving an inch. This wasn't unusual, because there were only twenty five units, and most of the group sex hardcore sex pictures tenets were young people who had jobs and spent a lot of time away from the building. Gently working the head into her slit, her eyes rolled back group sex porno hardcore into her head as he plunged all the way in with one

hahaha! (0)

Anonymous Coward | more than 12 years ago | (#2518247)

Hehahaha. Oh, hahahah! whoooeee, hahaha!

that's hilarious!

what, you don't back up your 100gb mp3 collection?

The bug (5, Interesting)

hysterion (231229) | more than 12 years ago | (#2518251)

Summarizing discussions on MacNN and the Apple Forum:

The problem appears to be in two portions of the installer script which could translate into rm -rf /your_drive, if certain paths $1 or $2 contain spaces:

#!/bin/sh

# if current iTunes pkg exists, delete it b/c of Installer bug
if [ -e $1Library/Receipts/iTunes.pkg ] ; then
rm -rf $1Library/Receipts/iTunes.pkg 2> /dev/null
fi

# if iTunes application currently exists, delete it
if [ -e $2Applications/iTunes.app ] ; then
rm -rf $2Applications/iTunes.app 2> /dev/null
fi

Though when I looked, nobody seemed to have found where exactly $1 and $2 are defined; also it might be that disaster only strikes with localized versions of the OS.

quote (4, Informative)

Jotham (89116) | more than 12 years ago | (#2518274)

the bug is apparently caused by the lack of quote marks in the install script.

Apparently it only strikes if you 1) havn't uninstalled iTunes first 2) have multiple partitions and 3) have spaces in the name of your partitions

This from MacSlash [macslash.com] (posted by Graff as AC):

Well, there is a fixed installer up now. Looks like the following change was made to the "Preflight" file inside the "iTunes.pkg" package:

old version:

#!/bin/sh

# if iTunes application currently exists, delete it
if [ -e $2Applications/iTunes.app ] ; then
rm -rf $2Applications/iTunes.app 2> /dev/null
fi

exit 0

new version:

#!/bin/sh

# if iTunes application currently exists, delete it
if [ -e "$2Applications/iTunes.app" ] ; then
rm -rf "$2Applications/iTunes.app" 2> /dev/null
fi

exit 0

As you can see, they basically placed quotes around the file paths so that any characters such as spaces in path names would not mess up the rm command. So easy, and yet even the best of us forget to do it at times. That's one of the things about the command line - lots of power when used properly, but also many powerful ways to mess everything up.

- Graff

Re:quote (2)

Skapare (16644) | more than 12 years ago | (#2518307)

It also shows one of the weaknesses of a programming language which is based on collections of things (in this case token words on a command) or data structures which can be changed merely by the value of some part of it (e.g. a variable with spaces).

Re:quote (0)

Anonymous Coward | more than 12 years ago | (#2518313)

Now, what if there are quotes in the file name?

My system disk is called /" " and I like it that way.

Re:quote (0)

Anonymous Coward | more than 12 years ago | (#2518329)

It never occurred to me to use spaces in a volume name. I was always sure it would mess something up. Heh.

Re:The bug (0)

Anonymous Coward | more than 12 years ago | (#2518302)

I did the install and did not lose any partitions, drives, data, etc. My 'old' iTunes was removed, and the new one was dropped in it's place accordingly.

OS X is not 'localized', where previous versions were.

Re:The bug (0)

Anonymous Coward | more than 12 years ago | (#2518326)

Thus this bug has been caused by the moron who decided that spaces are legal characters in file names.

Only one thing to say... (0)

Anonymous Coward | more than 12 years ago | (#2518253)

[nelson] Ha Ha! [/nelson]

But... (0)

Anonymous Coward | more than 12 years ago | (#2518255)

Not that I expect anyone here to be interested, but I ran the installer in question on a partitioned drive with no adverse affect at all.

T

It just makes no sense (1)

lambent (234167) | more than 12 years ago | (#2518260)

As inexcusable as this is, it's also inexplicable. Why would a music software suite and its installer have the ability to nuke a drive?

Re:It just makes no sense (0)

Anonymous Coward | more than 12 years ago | (#2518264)

Because the OS made that ability available.

Re:It just makes no sense (0)

Anonymous Coward | more than 12 years ago | (#2518269)

...more specifically because the OS permitted this function to be executed in this manner; without user confirmation, and not as the plain and clear result of an explicit request.

Free Format (2, Funny)

starphish (256015) | more than 12 years ago | (#2518262)

I've been looking for a good free format utlity with an attractive front end. Is there a PC port?

Need to have a warranty! (2)

burtonator (70115) | more than 12 years ago | (#2518266)

OK.. so. Your hard drive has just been formated by Apple? You have lost months of work and potentially hundreds of thousands of dollars. What will you do now?

Are you going to sue? Did you read your EULA (End User License Agreement)? You probably waved that right when you said "OK".

Apple probably waived all warranty when you installed the software (in some states this isn't legal though)

This is one area where the law needs to be fixed.

With Open Source software at least you have the ability to read the source code.

Imagine if Ford were to wave any warranty with your next Explorer.

Kevin

Re:Need to have a warranty! (0)

Anonymous Coward | more than 12 years ago | (#2518293)

If you've got "months of work and potentially hundreds of thousands of dollars" on your hard drive with no backup you've waived your own warranty.

T

Re:Need to have a warranty! (0, Offtopic)

MacKinnon (246682) | more than 12 years ago | (#2518310)

Oh yeah, because EVERYONE on this damn planet can read, debug, and fix code.
Will you OSS zealots get it through your head that having the code doesn't mean jack shit to 99.9% of the population?

Re:Need to have a warranty! (0)

Anonymous Coward | more than 12 years ago | (#2518346)

With Open Source software at least you have the ability to read the source code.

You're sounding silly in this case -- the bug was in a script.

This is a common programming error (0)

Anonymous Coward | more than 12 years ago | (#2518268)

Here you have programmers who are used to the older Mac OS which does things very differently. Something as simple as Mac HD:Syetem Folder:Preferences: becomes ~/Library/Preferences. We should cut these guys some slack. Plus Apple did correct the problem within hours.

You can find an explanation here [macosxhints.com].

The short version of what Apple appears to have changed in this new installer? Any reference that used to look like this

rm -rf $2Applications/iTunes.app 2 /dev/null
now looks like this

rm -rf "$2Applications/iTunes.app" 2 /dev/null

Nature of the bug (4, Redundant)

HalfFlat (121672) | more than 12 years ago | (#2518270)

From the discussion on the Apple discussion web site, the nature of the bug is as follows.

The original installer script has the lines

# if iTunes application currently exists, delete it
if [ -e $2Applications/iTunes.app ] ; then
rm -rf $2Applications/iTunes.app 2> /dev/null
fi
while the replacement (2.0.1) has
# if iTunes application currently exists, delete it
if [ -e "$2Applications/iTunes.app" ] ; then
rm -rf "$2Applications/iTunes.app" 2> /dev/null
fi
In these scripts, $2 corresponds to the volume on which iTunes is to be installed, and will be of the form /Volumes/name-of-volume.

For those unfamiliar with Bourne shell variable expansion, if $2 has spaces in it, the argument to the rm command in the first version of the script will expand to more than one word, and rm will try and delete both of these. The -rf tells rm to delete everything down recursively and not complain about it.

This is particularly a problem on the Mac, where filenames and volume names often have spaces in them., even at the beginning of the name. If one had multiple partitions mounted in /Volumes, and the one on which iTunes was to be installed was called, say, ' OS X', then the rm command would expand to

rm -rf /Volumes/ OS X/Applications/iTunes.app 2> /dev/null
and would then try and delete everything under /Volumes. This is clearly bad.

The second version, by including quotes around the argument, fixes the problem. The quotes force the argument to be treated as a single argument after variable expansion.

Traditionally, people have been super careful about destructive operations and shell expansions. I don't think I've ever seen something like this written in a 3rd party script before, in fact (let alone from the OS vendor!). This could well be an example of programmers new to a Unix-like platform still getting used to the Unix way of doing things, and getting bitten as a result.

Re:Nature of the bug (0, Flamebait)

Anonymous Coward | more than 12 years ago | (#2518295)

How incompetent are Apple software engineers?
They try for 10 years to implement true multitasking and fail.
They give up and use someone else's code, but they don't take the time to properly learn the new stuff?
That's pretty pathetic.

I had no trouble with the install... (0)

Thaidog (235587) | more than 12 years ago | (#2518276)

I have an iMac DV with several partitions and a Dual 533 with one Ultra160, and one ATA drive... and neither install caused any problems. Luck perhaps, but I still find it strange how a MP3 app can erase a hard drive...

The big mistake here... (1)

jcr (53032) | more than 12 years ago | (#2518283)

An app like iTunes shouldn't even HAVE an installer script for OS X. It should just be a disk image file, and installation shouldn't be any more than dragging iTunes.app from the disk image to your /Applications directory.

This problem is a hold-over from iTunes' Mac OS 9 legacy.

-jcr

page out of Roxio's book (2, Interesting)

Alcimedes (398213) | more than 12 years ago | (#2518287)

you know, the funny part was i was cursing a blue streak when installing roxio cd creator 5 toasted my win2k machine. what are the freakin' odds, i would rant? why the frick is a cd software package set up to kill my machine?

well, i guess it's catching, whatever it is.

lol, i think i'll be waiting a few weeks after the release of software from now on. bleeding edge one to many times.

Re:page out of Roxio's book (-1)

honold (152273) | more than 12 years ago | (#2518324)

ezcd+win2k=turd. i can't fucking believe that *individuals* that write cd burning apps (cdrwin, fireburner, et al) in their spare time crank out forward-compatible apps easier than multi-million dollar pieces of shit like adaptec.

sad.

Pool of Radiance also does this. (1)

juju2112 (215107) | more than 12 years ago | (#2518288)

The new Pool of Radiance does the same when you try to uninstall it. :] Thankfully there's a patch, though.

Users in OS X (1)

tunah (530328) | more than 12 years ago | (#2518297)

I haven't personally tried OS X, so I don't know about how the multi user stuff fits together, but presumably you need to be running as root to install this (or trash your hd, for that matter). Shouldn't there be a way to install some apps without being root? Seems to me that having the user root by default is a bad strategy in terms of apps going evil, viruses, etc... this OS is not targeted at security-conscious people.

Re:Users in OS X (2, Informative)

headbulb (534102) | more than 12 years ago | (#2518339)

your right you have not used os X there are two kind of users in os X admins and regular users the admins can use sudo while the users may not be able to sudo or with certain resrictions

the root acount is disabled as in the password is * meaning none which means you can't login with it

HeadBulb

ouch, but... (1)

godawful (84526) | more than 12 years ago | (#2518298)

gratefully when coming home from the bar last night i downloaded installed and lost nothing *thank the beer gods* and yep it sucks for those who lost it.. however, from what i've read, tech tool pro is the best app right now for recovering those lost files.. i'm glad i didn't lose anything last night.. but i've seen some accounts of people recovering 50 to 75 % of their lost files.. but truly a bum deal.

They've posted a fix. (0)

Anonymous Coward | more than 12 years ago | (#2518301)

They've posted a fix: iTunes 2.0.1.

Say what you will... (1)

SonicRED (15265) | more than 12 years ago | (#2518305)

But if this didn't happen to you then you have to admit it's pretty fscking hilarious.

Figuratively this is like Steve Jobs deleting his market share, which is basically already a 0 byte file.

Sue them. (1)

t_allardyce (48447) | more than 12 years ago | (#2518319)

Its a virus - it hides behind a legitimate program, performs some sort of check, then delivers a payload. If thats not a virus, then i don't know what is. Just because Apple may 'claim' its a mistake, is no excuse. People have gone to prison for less so i say, give them a big fat law suit.

Re:Sue them. (0)

Thaidog (235587) | more than 12 years ago | (#2518334)

Yeah.. but it did not effect everybody... like me... I was not effected but others with similar hard drive names were. So, it's not a virus. Similar only in certain instances and affects.

Perspective (0)

DougLandry (27581) | more than 12 years ago | (#2518320)

This issue only affects people who have a leading or trailing "space" in the name of their volume--a tiny minority of those that may have downloaded the installer. The installer was posted for less than 24 hours--from late on a Friday night to the middle of Saturday. It only affects the Mac OS X 10.1 installer, not the Mac OS 9 installer. Despite the hype, the majority of Mac users are still using 9.

Apple obviously screwed up, but to say that 'thousands' may be affected is a bit much.

What's the moral of this story? Apple needs to do some better quality control on software-free or not-that it releases. Another lesson? Keep backups--very few people would be whining about how the lack of four quotation marks in code wiped their shit if they had a backup copy.

This might be very good. (2, Funny)

Krapangor (533950) | more than 12 years ago | (#2518321)

I usually don't have very much space on my harddisk because it very small and i often can't decide which pictures to delete i downloaded from the internet.
So this installer comes in very handy because it deletes just all data and you don't have to decide whether to delete the picture of all these nice kitties or not.
So you have much more space on your harddisk and can download again much more nice pictures from the internet with cats.
My problem is however that i don't have an MAC and i hope they port it to linux soon so that i have again nice 30 megabytes of free harddisk space.
It is of course very sad that people with important data have lost all important data but you can't have much space and important data on your harddisk all the same time anyway.

Hardly anyone actually affected. (1)

caryw (131578) | more than 12 years ago | (#2518335)

I installed iTunes2 and it worked just fine. It seems that all of the people over at MacSlash [macslash.com] have had the same results.

reaction from Apple's internal culture? (1)

dan_bethe (134253) | more than 12 years ago | (#2518337)

I'm curious to know the reaction from Apple's internal culture, particularly that of Steve Jobs.

I have read all the Apple books I'm aware of as of before Steve became iCEO, and they're largely a behavioral analysis of Steve's proactive and reactive mind. I haven't read Steve's latest book. Now he's more civilized but is known to spontaneously fire anyone who gets in the way of making extremely critical and improbable things happen, such as when they completely redesigned apple.com and the company store within a few months. In other words, he's still extremely demanding of precision high performance, which is a very good demand.

I wonder what happens behind closed doors after a major FUBAR like this happens. What is said? What are the looks on peoples' faces at the moment? What does Steve do, say, and look like? What chain of the culture panics over what he'll do or over their employment status after hearing the news?

It's a feature! (1)

wine (211387) | more than 12 years ago | (#2518340)

iTunes2 synchronizes data between the iPod and your computer's hd.

So, if you don't have an iPod or your iPod holds no data, everything is erased from your hd in the process of synchronizing.

Seems very obvious this is a feature.
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...