Auto-delete older versions of the mod

Started by NanoSector, May 13, 2010, 05:08:46 PM

Previous topic - Next topic

NanoSector

Could be handy when you have a huge list of mods.

Basically it deletes the older versions of a mod you are trying to install.

And when you already have the latest version installed and you are installing an older version, it could give a warning like:
"There is already a later version installed. Do you still want to continue?"

Sorry if I'm going too far into my fantasy :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

Well, many mods are geared up so that you can only install one at a time. Some mods offer 'upgrade' possibility, i.e. the ability to install just the changes, but you usually can't remove earlier versions without installing later ones first.

Personally I'd encourage the forum owner to manage their mods better, but that's just me.

I can see the appeal, I'm just not sure how practical it would be, and I'm not entirely sure it's a good idea.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

kat

Quote from: Arantor on May 13, 2010, 05:13:29 PMyou usually can't remove earlier versions without installing later ones first.


Eh?

Arantor

Kat: Mods can provide upgrade instructions.

E.g. Mod 1.0 is released and installed, then Mod 1.1 is released. Mod 1.1 can contain instructions to simply upgrade Mod 1.0 to Mod 1.1 without uninstalling/reinstalling.

Very often though you can't remove Mod 1.0 without removing Mod 1.1 in the process.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

kat

AH! With you.


I know a few mods insisted that you removed older versions, first.


I'm tempted to try installing the latest version of Simple Portal, over the top, just to see what breaks, ;)


From what I can see, it's likely to break the default theme, which might be a problem.  :-X

Arantor

Most mods do, because it's far less work for the mod author, not only in terms of not building the upgrade package, but also in terms of maintenance and support.

SimplePortal will upgrade itself to latest version. Removal... is anyone's guess what you get.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

青山 素子

Sometimes a user will want to revert back to an older version due to a huge bug in a newer version or some other reason. Automatically removing older package versions would make that difficult. It's not too much difficulty to remove older package versions once the administrator has confirmed that the newer version works properly.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


kat

It's one of those "In the poo, if you do, in the poo, if you don't things", though, innit?


I'd imagine that installing a new version, OTT of an old one, COULD cause conflicts.


Mind you, I notice that some mods make it perfectly clear, if the old versions should be removed, first.

Arantor

Most mods won't install over the top of an old one if they don't have upgrade support, because they'll be trying to change the same code.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

kat

Got to be a case of RTFM, then, innit?


Sadly, there're quite a few people who don't do that...


(I don't disclude myself, from that, at times.)

Arantor

Well, I'd advocate RTFM in the first instance always (yes, I actually do at least glance through the manual before trying something, so that when the time comes I have to RTFM, I know where to start reading)

There are far too many who don't RTFM though :(
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

NanoSector

Maybe you could add a checkbox like 'Enable Auto-Deletion of older mods' in the Options tab.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

kat

Trouble, with that, is that it would only ever hope to remove them from the default theme. And then, only if the install didn't need editing, manually, because of clashes with other mods.


It would be VERY difficult to do, I'd imagine.

NanoSector

Quote from: Kat on May 14, 2010, 11:50:32 AM
Trouble, with that, is that it would only ever hope to remove them from the default theme. And then, only if the install didn't need editing, manually, because of clashes with other mods.


It would be VERY difficult to do, I'd imagine.
That's why I said

Quote from: Yoshi2889 on May 13, 2010, 05:08:46 PM
Sorry if I'm going too far into my fantasy
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

kat

I think we all have dreams like that. ;)

nend

I believe the package manager needs a little work. I believe allot of compatibility issues are the Package manager itself.

Like if I install.

Find
Target Code

Add After

More Code


You get this
Target Code
More Code


This causes problems when you install a new mod with another mod that adds after the same line.

Find
Target Code

Add After
Even More Code

You end up with
Target Code
Even More Code
More Code


But when you unistall it looks for ...

Find
Target Code
More Code


Replace with
Target Code

Why not work like this

Find and Delete
More Code

Because it definately is not going to find this
Target Code
More Code


In this
Target Code
Even More Code
More Code

Norv

nend: Yes, you're right, that's what it does. Not that it has much choice.
If it searches for

Target Code
[random code here]
More Code

there is no way to guarantee within reasonable limits that it won't find similar UNINTENDED code which happens to match this - too wide - pattern.

You may want to take a look at an older discussion on the subject. Proper package installing/uninstall parsing method?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

NanoSector

Quote from: nend on May 16, 2010, 11:39:25 PM
I believe the package manager needs a little work. I believe allot of compatibility issues are the Package manager itself.

Like if I install.

Find
Target Code

Add After

More Code


You get this
Target Code
More Code


This causes problems when you install a new mod with another mod that adds after the same line.

Find
Target Code

Add After
Even More Code

You end up with
Target Code
Even More Code
More Code


But when you unistall it looks for ...

Find
Target Code
More Code


Replace with
Target Code

Why not work like this

Find and Delete
More Code

Because it definately is not going to find this
Target Code
More Code


In this
Target Code
Even More Code
More Code

OMG I'm not THAT technical xD
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

nend

Quote from: Norv on May 17, 2010, 12:46:12 AM
nend: Yes, you're right, that's what it does. Not that it has much choice.
If it searches for

Target Code
[random code here]
More Code

there is no way to guarantee within reasonable limits that it won't find similar UNINTENDED code which happens to match this - too wide - pattern.

You may want to take a look at an older discussion on the subject. Proper package installing/uninstall parsing method?

Don't you think this method though is too cautious and if a mod did have this problem then it should be considered a bug in the mod and not the SMF Package manager. Mod developers should be responsible for the uniqueness of their code. If a portion of their code may match some other mods or SMF code then they should comment on their mod like so.

//Start of Edit for My Mod Ver1.0
My Code
//End of Edit for My Mod Ver1.0

Arantor

That simply isn't always possible.

What if you want to get just one more term in a query, to add another field into the SQL? You can't readily comment in that.

What happens if the code happens to match multiple points in the base SMF code? It can, and does, happen, and sometimes there is NO way around it.

I agree with Norv. Removing the safety check you're suggesting is a VERY bad idea.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

Advertisement: