免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 12058 | 回复: 4
打印 上一主题 下一主题

[FreeBSD] 如何让pkgng和ports更好的共存? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-11-13 00:32 |显示全部楼层 |倒序浏览
在make.conf里设置WITH_PKGNG=yes,让ports编译的包注册的pkgng数据库。
  1. root@:~ # cat /etc/make.conf
  2. FORCE_MAKE_JOBS=yes
  3. MAKE_JOBS_NUMBER=4
  4. MASTER_SITE_OVERRIDE=http://ftp.jaist.ac.jp/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}
  5. WITH_PKGNG=yes

  6. .if ${.CURDIR:M*/editors/vim}
  7. WITH_OPTIONS=YES
  8. .endif
复制代码
但是官方pkgng库里的有些包,不满足要求,比如ecore-x11不支持X11 composite,必须从ports中
编译ecore-x11,使其支持composite。下次使用pkg upgrade更新全部软件包时,出现问题了:
  1. root@:~ # pkg upgrade
  2. Updating repository catalogue
  3. Upgrades have been requested for the following 15 packages:

  4.         Reinstalling ecore-x11-1.7.8 (needed shared library changed)
  5.         Reinstalling evas-core-1.7.8 (needed shared library changed)
  6.         Installing gnome-icon-theme: 3.6.2
  7.         Reinstalling gnome-vfs-2.24.4_1 (options changed)
  8.         Reinstalling libgnome-2.32.0_1 (direct dependency changed)
  9.         Installing libXxf86dga: 1.1.4
  10.         Installing mplayer-skins: 1.1.3_1
  11.         Installing mplayer: 1.1.r20130308
  12.         Reinstalling vim-7.3.1314 (options changed)
  13.         Reinstalling elementary-1.7.8 (needed shared library changed)
  14.         Reinstalling enlightenment-0.17.4_1,2 (needed shared library changed)
  15.         Reinstalling libbonoboui-2.24.4_1 (direct dependency changed)
  16.         Reinstalling libgnomeui-2.24.4_2 (direct dependency changed)
  17.         Reinstalling smplayer-0.8.6 (direct dependency changed)
  18.         Reinstalling gnome-themes-extras-2.22.0_9 (direct dependency changed)

  19. The upgrade will require 19 MB more space

  20. 5 MB to be downloaded

  21. Proceed with upgrading packages [y/N]:
复制代码
PKGNG总是认为远端仓库的ecore-x11才是"正确"的包,提示重新安装。
Reinstalling ecore-x11-1.7.8 (needed shared library changed)

这种情况下,该如何处理?google了以下,目前好像没有好的解决方案。只能每次手动从Ports中更新
这几个软件包,很大的不方便就是以后无法运行pkg upgrade省级软件包了。所以,貌似以后升级软件包的话,
最省事的做法是使用portupgrade或portmaster了。

PS:为啥ports不能既保持原有的数据库,而pkgin在每次更新或者安装软件包时,从原有的ports包数据库注册到pkgng数据库?
        目前NetBSD的pkgin是这么处理的。

论坛徽章:
0
2 [报告]
发表于 2013-11-13 23:40 |显示全部楼层
回复 2# zeissoctopus


   

方法一值得一试。
方法二暂时不打算使用

论坛徽章:
0
3 [报告]
发表于 2013-11-17 21:13 |显示全部楼层
回复 4# HonestQiao
深有同感。尤其像ecore这样的软件包,支持composite的支持是编译时加进去,ports并不提供这个option。花了好久时间定位出来。


   

论坛徽章:
0
4 [报告]
发表于 2013-11-17 23:00 |显示全部楼层
本帖最后由 wolf_london 于 2013-11-17 23:11 编辑

回复 2# zeissoctopus
准备采用pkg lock。
  1. #!/usr/local/bin/bash

  2. TMPFILE=/tmp/test.$  #make sure the test file the only one
  3. pkg upgrade -n > $TMPFILE  #hmm, "-n" works
  4. pkgs=$(cat $TMPFILE| grep Reinstall | awk '{print $2}')

  5. #rpkg stands for "raw pkg"
  6. for pkg in  $pkgs ; do
  7.                 rpkg=${pkg%-*};
  8.                 echo "lock $rpkg";
  9.                 pkg lock -y $rpkg
  10. done

  11. for pkgs in  $pkgs ; do  
  12.                 rpkg=${pkgs%-*};
  13.                 pos=$(whereis $rpkg| awk '{print $NF}') # AFAIK,whereis search ports position finally
  14.                 echo "&&&&&&&&&&&&&&&&&&&"$pos"&&&&&&&&&&&&&&&&&&&"
  15.                 pushd $pos && make reinstall  clean && popd
  16. done

  17. rm  -rf $TMPFILE
复制代码

pkg_co.sh.gz

347 Bytes, 下载次数: 12

论坛徽章:
0
5 [报告]
发表于 2013-11-18 23:43 |显示全部楼层
回复 9# zeissoctopus

lock所有需要Reinstall的文件,其实ecore-x11只是举个例子而已。
是从pkg2ng转换而来,所以不需要再次安装ecore-x11的依赖。如果不unlock的话,pkg upgrade -n的中Reinstall的软件包应该不会有太大的变化吧。



   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP