Ebuild 学习笔记

Ebuild 学习笔记


1、Ebuild文件格式

一个ebuild文件的命名必须以 “软件包名称-版本号.ebuild”命名。
名称部分应仅包含小写的非重音字母,数字0-9,连字符,下划线和加号字符。强烈建议不要使用大写字符,但技术上有效。

Ebuild标题信息

所有提交给树的ebuild应该在开始时立即有两行标题,表示版权,然后是空行。这必须是 header.txt Gentoo存储库顶级目录中内容的精确副本 。

# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

缩进和制表符

在ebuild文件中所有的缩进必须是制表符,长度为四个空格。Tab只能用于缩进,不能在字符串中使用。

避免尾随空格

在你提交ebuild的时候如果出现前导空格和尾随空格,则repoman 会发出警告。

每行字数限制

ebuild文件中每行的长度不应该超过80个字符。

注意:所有的ebuild文件都应该使用UTF-8格式的字符。

2、EAPI的使用

Gentoo的portage包管理器用来统一管理ebuild的书写格式,因此ebuild提供了自己的API,方便编程人员书写。EAPI是有版本的,目前最新的版本是第七版,也就是EAPI=7,每一版本的EAPI都有对API或者变量的不同的改变。在书写ebuild时可以指定自己想要用的EPAI版本信息,如:EAPI=5,官方鼓励使用最新的EAPI。如果没有显式给出EAPI的信息,则系统会将EAPI的值默认设置为0,因此,应该在ebuild文件的最开始就知名需要使用的EAPI信息。

相位函数的执行顺序

  • pkg_setup
  • src_unpack
  • src_prepare
  • src_configure
  • src_compile
  • src_test
  • src_install
  • pkg_preinst
  • pkg_postinst
  • pkg_prerm
  • pkg_postrm
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Fetching upstream changes from git@github. com:a792883583/treeHoleScore.git > /usr/bin/git --version # timeout=10 > git --version # 'git version 1.8.3.1' using GIT _ASKPASS to set credentials github > /usr/bin/git fetch --tags --progress git@github. com:a792883583/treeHoleScore.git +refs/heads/*:refs/remotes/origin/* # timeout=10 ERROR: Error fetching remote repo 'origin' hudson. plugins.git.GitException: Failed to fetch from git@github. com:a792883583/treeHoleScore.git at hudson. plugins . git .GitSCM. fetchFrom(GitSCM. java:1003) at hudson. plugins .git .GitSCM. retrieveChanges(GitSCM. java:1245) at hudson.plugins.git.GitsCM. checkout(GitSCM. java:1309) at hudson.scm. SCM. checkout(SCM. java:540) at hudson. mode1. AbstractProject . checkout(AbstractProject . java:1240) at hudson. model AbstractBuild$AbstractBuildExecution. def aultCheckout (AbstractBuild. java:649) at jenkins .scm. SCMCheckoutStrategy . checkout(SCMCheckoutStrategy . java:85) at hudson . model. AbstractBuild$AbstractBuildExecution. run(AbstractBuild. java:521) at hudson.model . Run. execute(Run. java:1900) at hudson.model. FreeSty1eBuild.run(FreeStyleBuild.java:44) at hudson. model. ResourceController . execute(ResourceController . java:101) at hudson. model. Executor .run(Executor. java:442) Caused by: hudson. plugins.git .GitException: Command "/usr/bin/git fetch --tags --progress git@github . com: a792883583/treeHoleScore.git +refs/heads/* :refs/remotes/origin/*" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci .plugins.gitclient .CliGitAPIImp1.1aunchCommandIn(CliGitAPImp1.java:2734) at org.jenkinsci .plugins.gitclient .CliGitAPIImp1.1aunchCommandWithCredentials(CliGitAPIImpl.java:2111) at org.jenkinsci.plugins . gitclient .CliGitAPIImp1$1. execute(CliGitAPIImp1.java:623) at hudson.p1ugins . git .GitSCM. fetchFrom (GitSCM. java:1001) 11 more ERROR: Error fetching remote repo ' origin' Finished: FAILURE
最新发布
02-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值