Upgrading the Installed package
Alex Zbyslaw
xfb52 at dial.pipex.com
Wed Feb 6 15:10:58 UTC 2008
Jason C. Wells wrote:
> navneet Upadhyay wrote:
>
>> Hi,
>> I have two binary packages of an application of version 1.1 and
>> 1.2.
>> *The 1.1 is already installed, how can i upgrade it to 1.2* ?
>>
>> Do i have to uninstall 1.1 and then install 1.2 ? I would prefer a
>> way by
>> which i can upgrade an wxisting package without uninstalling.
>
>
> Uninstall reinstall takes all of five seconds. It's quite easy. Any
> of the ports management software has to do some variety of this
> anyway. The only difference is they do it with one command.
Actually, there is one other key difference. portupgrade[1] will make a
*backup* of the package it is about to uninstall, and will recover that
backup if the subsequent install of the new package fails. You can do
that by hand with the pkg_ tools but I know I prefer it to just happen.
You could add that to your script, but why re-invent the wheel?
portupgrade[1] also keeps copies of any libraries it uninstalls during
an upgrade, which ought not to be necessary. But if something was
silently relying on one, you won't break it.
> The usefulness of the port management apps (portmaster,portupgrade) is
> when you want to upgrade multiple ports and large amounts of
> dependencies all at once. They are more trouble than they are worth
> for a single package. That is, unless you are already using them.
The other argument would be that there's no better time to get familiar
with a tool than when you can use it to do something easy.
--Alex
[1] portmaster may do this too. I don't know as regrettably I haven't
found time to try it yet. The new version is something I would like to
try, and while I can't recommend it from personal experience, I would
suggest trying it nonetheless.
More information about the freebsd-questions
mailing list