Main page I Packages I Help I Forum
a place to talk about SvarDOS and other DOS-related things
> Maybe the "update" action could be renamed to something else, but I have no idea what. "reinstall" would probably be even more confusing.Why do we need a different action at all? Why not integrate this function into the normal "install" action?
> Why do we need a different action at all? Why not integrate this function into the normal "install" action?The only reason I see is that the user might overwrite an already installed application without expecting it and be surprised/angry when he realizes what happened. When we do an "install" action I suppose we usually expect to add something to our system - that is, not loosing something we have already. Let's imagine the user is not aware that he has some package-1.0 installed (because he installed it a long time ago). He downloads package-0.9, tries to install it, and only then he sees that he just lost his previous (potentially precious) package-1.0. While if the user does an "update" action, he is evidently informed that the package already exists on his system, thus his action will lead to the package being overwritten. So it's basically about the assumption we make as how much awareness the user has of what he is about to do. I may be doing kindergarten-level psychology here, but that's how I see it. :-) Still, I agree that "updating" a package to same version or lower does sound odd and not very intuitive. I briefly thought about adding a new "reinstall" action that would be the same as "update" but explicitly checking that the packages are in the exact same version, but dropped the idea because I do not think there is a practical advantage of doing this because ultimately updating a package to the same version is unlikely to do any harm. Plus, it would not solve the issue of a package being "updated" to an older version anyway. Comparing version strings in pkg is not exactly realistic because of how unorganized the version strings are in the DOS world, so the only thing I can think of is renaming "pkg update" to something else.... maybe "pkg replace". It sounds quite weird (to me at least), but it would better reflect what actually happens. And it would just as well make sense for same-version packages - after all, if user decides to "replace" a package, he likely checked already what his current package is and knows what is about to be replaced. So I think it all boils down to nomenclature and the assumption users will make for any given action: - "update / upgrade": suggests that an older version of the package will be replaced with a newer version - "reinstall": suggests exact same package to be reinstalled - "replace": package x (whatever version) is about to be replaced by package y (whatever version) Given the above, "replace" is probably much better fitting than "update". Mateusz
> When we do an "install" action I suppose we usually expect to add something to our systemWhy is the action called "install" then but not "add"? ;-)
> Given the above, "replace" is probably much better fitting than "update".I would be fine with "replace".