Ann*_*nna 10 arch-linux package-management
我即将转向 Arch Linux。查看 AUR 中的包,有很多包遵循命名方案“project-name-git date”,例如:
adonthell-git 20100408-1
akonadi-facebook-git 20111117-1
wesnoth-svn 40587-1
vimprobable-git 20110829-1
vimprobable2-git 20111214-1
Run Code Online (Sandbox Code Playgroud)
这些包是什么?它们只是来自指定时间点的 adonthell/wesnoth/etc 存储库的快照吗?如果是这样,则包无法在不更改名称的情况下进行更新,这会使包管理变得非常复杂。
如果我想要最新版本的,比如说,来自 git repo 的 vimprobable,我应该使用 AUR 还是自己编译?
简而言之:只需构建包,它将是 Git 存储库中的最新版本;这是由 自动处理的makepkg
。
通过阅读包PKGBUILD
文件-git
(例如adonthell-git),您可以看到:
cd $_gitname && git pull origin
msg "The local files are updated."
Run Code Online (Sandbox Code Playgroud)
因此,每次makepkg
运行时,它都会从 Git 存储库下载最新版本。
该pkgver
参数是因为makepkg
需要在一个版本号PKGBUILD
,并在最终的包装; 约会在这里最有意义。
如果检测到它是来自 Git 的包,则相应地makepkg
处理特殊情况:
(第 1687-1771 行makepkg
,函数devel_check
)
elif [[ -n ${_gitroot} && -n ${_gitname} ]] ; then
if ! type -p git >/dev/null; then
warning "$(gettext "Cannot find the %s binary required to determine latest %s revision.")" "git" "git"
return 0
fi
msg "$(gettext "Determining latest %s revision...")" 'git'
newpkgver=$(date +%Y%m%d)
Run Code Online (Sandbox Code Playgroud)
[剪断许多其他案件的darcs
,hg
,svn
等...]
(第 1773-1792 行makepkg
,函数devel_update
)
# This is lame, but if we're wanting to use an updated pkgver for
# retrieving svn/cvs/etc sources, we'll update the PKGBUILD with
# the new pkgver and then re-source it. This is the most robust
# method for dealing with PKGBUILDs that use, e.g.:
Run Code Online (Sandbox Code Playgroud)
因此,您最终会得到一个包,其版本号是您构建它的日期。
归档时间: |
|
查看次数: |
3321 次 |
最近记录: |