PDA

View Full Version : Have An Idea For A Program


bassplayinMacFiend
2004-10-07, 11:16
I have an idea for a program and wanted to see if there was any interest.

We've all heard of people who's computers get borked after Apple updates. There's no rollback mechanism built into OS X so I'm thinking about making one.

Using the program wouldn't be as seemless as Software Update, since Apple has a lock on that, but it would be similar. Basically when Apple releases an update, instead of using Software Update, you would need to download the package from Apple. Then you would fire up my program and point it to the install package. My program would then analyze the package and make backup copies of all files that will be replaced during the update. These files would be moved into a backup folder and made into their own rollback package just in case the update screws up the machine. Then Apple's update would be installed. My program would maintain a list of all updates applied while using the program and allow rollbacks of these updates, as well as deletions of the backup copies once you've determined the update did no harm.

What do you folks think? Would this be a worthwhile program to you?

Brad
2004-10-07, 11:26
There already exists something similar, an uninstaller that goes backwards through a receipt's BOM, but it isn't proactive enough to actually make backups first.

I would be very wary about using such an application. In fact, I wouldn't touch it with a 10 meter pole (much like that uninstaller I mentioned above). The user would have to use it for installing everything. Otherwise, he would risk the application overwriting something that a different installer changed.

It's not a bad idea in theory, but is it even necessary? I have only seen two or maybe three updates in all of Apple's use of software update that actually had legitimate problems. The vast majority of problems that users have after updating is due to something else (bad cache, permissions, etc). For them, rolling back wouldn't help and might actually make the situation worse.

I think a better idea for an "update helper" app would be something that would perform all of the standard maintenance routines before and after installing.

My 2¢.

bassplayinMacFiend
2004-10-07, 12:25
Yea, that would be the package installer program. You have to invoke from the command line, but it works off the receipt file in your /Library/Receipts folder.

Unfortunately this only deletes the files. The old files don't get restored so you would be left with an even greater hole. I guess if you were able to extract the BOM you could use pacifist to pull the .0 release of the files from your CD, but then you have to worry about some interdependant files having been updated between the .0 release and whatever update upsets the apple cart which would probably lead down the path of a complete reinstall of OS X.

Considering rollbacks have been an option in Windows for years you'd think Apple would have a rollback feature in their OS as well.

You are correct, my program would require all OS X updates to be installed through it. Not all program updates, just OS X ones since most other updaters use the Vise installer program so I wouldn't be able to get inside it like I can with pax/bom for .pkg and .mpkg files.

Anyway, it was just an idea. So far I haven't needed to rollback and I imagine the first time I did I would probably sit down and hammer out this program. :)

Brad
2004-10-07, 13:46
Yea, that would be the package installer program.Actually, someone wrote a GUI application for it. That's what I was referring to. Aha! Found it: http://www.macupdate.com/info.php/id/7511

Considering rollbacks have been an option in Windows for years you'd think Apple would have a rollback feature in their OS as well.:lol: Okay, you're just asking for a reaming here, but I'll go easy on you and leave the serious beatings for another member. ;)

Rollback has been a feature for Windows because Windows needs a rollback feature! Between all the bad/conflicting drivers and dlls, malware and spyware and adware, viruses and trojans and worms, and sometimes just downright stupid installers, Windows users are greatly benefited by the rollback implementation! I've known people to use this feature, but every time was for exactly those reasons, not because of a borked system update from Microsoft.

bassplayinMacFiend
2004-10-07, 14:16
:lol: Okay, you're just asking for a reaming here, but I'll go easy on you and leave the serious beatings for another member. ;)


:confused:

Rollback has been a feature for Windows because Windows needs a rollback feature! Between all the bad/conflicting drivers and dlls, malware and spyware and adware, viruses and trojans and worms, and sometimes just downright stupid installers, Windows users are greatly benefited by the rollback implementation! I've known people to use this feature, but every time was for exactly those reasons, not because of a borked system update from Microsoft.

I don't know, I seem to remember an iTunes update that fvcked up people's computers pretty bad. Not that a program built on my idea would save you from that particular bug, but borked installs can happen on any platform. Not that I'm defending Windows or anything, but the rollback feature did save me once when I installed a corrupt video card driver once (damn 3dfx for going out of business!).

Kickaha
2004-10-07, 19:14
The iTunes bug blew away the user space completely... nothing an uninstaller could do *there*...

Brad is right - Windows has a rollback feature, just as it has a built-in defragmentation tool, because *WINDOWS IS BROKEN*, not because MS is being beneficent.

I'm utterly amazed that Windows works at all, to tell you the truth, knowing what I do about the inner guts of it.

A rollback-enabled installer on MacOS X would be, well, a nicety. It would have very little *real* value to the majority of users... and besides, I can't think of any way to guarantee that it would always work 100%. Think of some of the config files that get updated (rarely, but it happens). You update from 10.3.x to 10.3.y, edit the config file (yup, folks do it) for necessary reasons, then rollback - you lose your edits. Now you have to go back and do them again.

It's an interesting idea, and one that I think would be a fun problem to tackle, but merely as a programming and intellectual exercise, not because I think it is a necessary addition to the toolchest.

That being said, I wouldn't mind having a fun little discussion here on the ins and outs of how to approach the problem. :)

bassplayinMacFiend
2004-10-07, 20:18
Actually, implementation is really simple. Use pax -r ... to read the contents of the .pkg file. Backup existing files on the list to some directory. Install the .pkg file.

If you need to rollback, then just run the install CLI program with the proper arguments and it deletes all files listed in a receipt .pkg file. Then copy the previously saved earlier versions of the file in their original locations. With a little programming, a .pkg of the original files could be generated (using mkbom and pax) so the earlier files could be reinstalled by double-clicking on the .pkg or again invoking the installer program with the proper arguments.

If you want to get even crazier, the source to pax is available at www.opensource.apple.com, I haven't found the source to bom/mkbom yet but I'm sure it's in there somewhere.

Like I said before, I've personally never had a problem updating OS X between minor or major versions. It's just that whenever there's an update released there's always reports of people's systems getting hosed.

Even if it is a good idea and I write the program it doesn't sound like people wouldn't use it anyway. No biggie, I'll just have to come up on another idea for a program to write.

FFL
2004-10-07, 20:22
Another good reason for this... even when the updaters themselves are not problematic, a freeze, power outage, or other unexpected event while the Installer is installing the update will likely render the system unbootable. I've seen it happen twice this month so far.

ast3r3x
2004-10-07, 20:27
Another good reason for this... even when the updaters themselves are not problematic, a freeze, power outage, or other unexpected event while the Installer is installing the update will likely render the system unbootable. I've seen it happen twice this month so far.

STOP INSTALLING DURING HURRICANES :D

Twice this month?! I was just thinking, it's rare you would need to do this. If you could do it though that would be cool...we should have a whole set of AppleNova utilities ;)

FFL
2004-10-07, 20:30
:lol:

heh

Perhaps I should clarify a bit.
MY personal systems are doing just fine! :D

I've been hired twice in the past month to help clients fix this exact problem (both times were freezes, not power outages, although I've seen that happen in the past).