How do i ignore/unmark certain ports?

*爱你&永不变心* 提交于 2019-12-22 11:35:26

问题


I would like to know how to either ignore upgrading certain ports or unmark them as "outdated".

This is motivated by certain ports failing to upgrade, while I wish to upgrade all the rest. I know about sudo port install -n, which allows one to install a port without upgrading port dependencies, as in the case of mongodb requiring an older (not the current) version of theboost libraries, but this is not applicable here.

For example:

$ sudo port list outdated
gdb                            @7.5            devel/gdb
py27-scikits-image             @0.7.1          python/py-scikits-image

As gdb@7.5 fails to update, I would just like to upgrade the others, ie. py27-scikits-image, without going thru the whole sudo port list outdated | awk '{print $1}' | grep -v gdb | xargs sudo port upgrade pipeline.

Much appreciated.


回答1:


I would advise to create a local portfile for gdb with a lower version number.

  1. Create a local portfile repository: howto
  2. Copy the gdb portfile directory (a directory called "gdb" containing the file "Portfile" and directory "files") into your local portfile repository
  3. Change the version number in the portfile to e.g. 0.0
  4. Run portindex in your local portfile repository

The local portfile overrides the one downloaded from the default port repository. The low version number makes macports think your version of gdb is up to date.

I hope this can help.

BTW: you can do sudo port upgrade outdated and not gdb



来源:https://stackoverflow.com/questions/12945589/how-do-i-ignore-unmark-certain-ports

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!