Dependency Problem of Upgrading Gnuplot: A Possible Bug

Xin Liu smilerliu at gmail.com
Thu Jul 26 17:05:11 PDT 2007


The problems of uninstalling everything and reinstalling them later
are: 1) many packages will be uninstalled and reinstalled even though
they are already up-to-date; 2) in case anything goes wrong at
reinstallation time, the user may be left with a system where too many
things are uninstalled and they have to manually reinstall all the
things (that are not affected by the package with problem).

I think an easier and safer way of is to modify the logic in
macports::upgrade{} such that when it tries to upgrade things in
$portinfo(depends_build), $portinfo(depends_run) and
$portinfo(depends_lib), for every bin/lib style dependency, it does
one of the following: 1) if the bin/lib file does not exist, install
the corresponding port (the port specified at the end of the bin/lib
style); 2) if the bin/lib file exists and the corresponding port is
installed, upgrade the corresponding port; 3) otherwise, do nothing.

But again, it all depends on the macports community's attitude towards
external dependencies. If the community thinks external dependencies
should not be supported, it does not make sense to make the "upgrade"
command correct at all, because those ports in bin/lib styles should
be installed anyway.

I guess I'll live with the inconsistence of "install" and "upgrade",
until some day the community cannot tolerate the lack of support for
external dependencies. Then let's sit down and find a solution.

Best
Regards,

Xin Liu

On 7/26/07, Keith J. Schultz <keithjschultz at web.de> wrote:
> Hi All,
>
>         I have been following this thread.
>         Xin Liu has a point. But, everbody
>         does not seem to realize that the problem is not
>         syntax, but semantics.
>
>         If install has a particular interpretation of what to
>         intall then upgrade shoulöd follow it, too.
>         If it does not then upgrade is seriuosly flawed as it
>         is not consistent with the port installs.
>
>         I personally do not like the way upgrade works.
>         A script that gets a list of the dependents
>         it can recursively  uninstall the the dependents
>         down the line until it does not find any more dependents.
>         As it goes along script makes sure it has a list of port unistalled.
>         these have to be reinstalled. So now it just needs to install
>         these. All that needs to be done is check if each of the uninstalled
>         ports has been installed. If not it is not installed it installs it
>         otherwise it is skip because it has already been installed.
>         This method will then have rebuilt (upgraded) the port just as if it
> was
>         freshly installed. Now, there is no confusion and no inconsistentcy !!
>
>         One more should point the script should be able to take more than one
>         port and intelligently uninstall that is it knows which one it has
> uninstalled
>         and skips them.
>
>         As soon as I have it finished I will post. Of course I could be
> missing something,
>         but my method is straight forward and gets the job done.
>
>         regards
>                 Keith.
>



More information about the macports-users mailing list