Ted's Blog

Happy coding

Portage用户使用指南

Ted posted @ 2008年8月23日 18:42 in 未分类 with tags portage gentoo , 2798 阅读

Debentoo Gao译 2002.12.16



1 初步认识


 取得最新的Portage软件包列表



在你安装了Gentoo Linux,使用了一段时间以后,发现一些软件有着这样那样的bugs,觉得不满意,或是想升级到最新的Gentoo Linux所带的软件包时,你需要下载我们的Portage树。我提供了一些匿名的rsync服务器以供您升级到最新的Portage树。下面我将告诉您如何使用它。



使用以下命令同步更新你的Portage树


#emerge rsync



请注意emerge rsync;命令会自动附带—clean参数,清除你在/usr/portage里做的个人设置。如果你想保存你的主Portage树个人设置不变的话,请使用PORTDIR_OVERLAY选项:



把下面一行加入/etc/make.conf


PORTDIR_OVERLAY="/dir/where/your/ebuilds/are"



如果你已经动手修改ebuilds,修正bugs。你可以考虑加入Gentoo Linux开发团队,成为我们的一员。具体事项可以和Daniel Robbins或Seemant Kulleen联系。



升级Portage


 在使用我们的Portage树前,升级它是一件很重要的工作。你可以这么做:


#emerge -up system *它会告诉你要升级哪些包


#emerge -u system *开始升级你的所需要的包


现在你的Portage升级到了最新版本,接下去你就可以随心所欲用我们的ebuild系统升级你所需的软件了。



2 emerge命令的介绍



emerge ?pretend


在安装一个软件包前,看看它和其他包的倚赖关系或哪些包会被升级是个不错的主意。你可以使用emerge ?pretend或emerge -p命令来察看。



比如说:# emerge -p xchat


These are the packages that I would merge, in order.



Calculating dependencies......... done!


[ebuild U] sys-libs/zlib-1.1.3-r2 to /


[ebuild U] dev-libs/glib-1.2.10 to /


[ebuild N ] media-libs/jpeg-6b-r2 to /


[ebuild N ] x11-base/xfree-4.0.3-r3 to /


[ebuild N ] x11-libs/gtk+-1.2.10-r1 to /


[ebuild N ] media-libs/giflib-4.1.0-r3 to /


[ebuild N ] media-libs/tiff-3.5.6_beta to /


[ebuild N ] media-libs/imlib-1.9.10 to /


[ebuild N ] net-irc/xchat-1.4.3 to /



如上所示,我们试着在一台没有安装X的机器上emerge xchat.emerge ?pretend正确的列出了所必需满足的倚赖关系。并明确的指出了sys-libs/zlib和dev-libs/glib需要升级,emerge xchat时,这些所倚赖的包(当然包括x11-base/xfree会被一同安装。



USE和emerge


以上,我在一个/etc/make.conf文件USE环境变量没有定义gnome的系统上执行了emerge ?pretend命令。就是说GNOME支持是可选项,一般是不打开的。那既然有这个选项,那我们就试着打开它,在执行emerge ?pretend命令看看输出有什么不同。


# emerge -p xchat



These are the packages that I would merge, in order.



Calculating dependencies............................ done!


[ebuild N ] media-libs/jpeg-6b-r2 to /


[ebuild N ] gnome-base/libghttp-1.0.9 to /


[ebuild N ] media-libs/audiofile-0.2.1 to /


[ebuild N ] media-sound/esound-0.2.22-r2 to /


[ebuild N ] gnome-base/gnome-env-1.0 to /


[ebuild N ] gnome-base/libxml-1.8.11 to /


[ebuild N ] gnome-base/ORBit-0.5.8 to /


[ebuild N ] gnome-base/oaf-0.6.5 to /


[ebuild U] dev-libs/glib-1.2.10 to /


[ebuild N ] net-libs/libwww-5.3.2-r1 to /


[ebuild N ] media-libs/giflib-4.1.0-r3 to /


[ebuild N ] dev-util/guile-1.4-r3 to /


[ebuild U] sys-libs/zlib-1.1.3-r2 to /


[ebuild N ] x11-base/xfree-4.0.3-r3 to /


[ebuild N ] x11-libs/gtk+-1.2.10-r1 to /


[ebuild N ] media-libs/tiff-3.5.6_beta to /


[ebuild N ] media-libs/imlib-1.9.10 to /


[ebuild N ] gnome-base/gnome-libs-1.2.13 to /


[ebuild N ] gnome-base/glibwww-0.2-r1 to /


[ebuild N ] gnome-base/gdk-pixbuf-0.11.0 to /


[ebuild N ] gnome-base/gconf-1.0.0 to /


[ebuild N ] gnome-base/gnome-vfs-1.0.1 to /


[ebuild N ] gnome-base/control-center-1.4.0.1 to /


[ebuild N ] gnome-base/scrollkeeper-0.2 to /


[ebuild N ] dev-util/xml-i18n-tools-0.8.1 to /


[ebuild N ] gnome-base/libglade-0.16-r1 to /


[ebuild N ] gnome-base/gnome-core-1.4.0.4 to /


[ebuild N ] net-irc/xchat-1.4.3 to /



很清楚地,在USE变量中加入gnome,emerge很快的知道安装xchat要加入对gnome的支持。当然为了GNOME选项的正确编译和运行, GNOME必需被首先安装,emerge会计算GNOME 安装所倚赖的包,并从它的ebuild列表中加入。当USE变量设置错误的时候,emerge命令很可能无法正确执行。那也是我们为什么建议在实际 emerge软件包,特别是比较新的,自己不熟悉的ebuild前先用emerge ?pretend命令察看一下的原因。接下去,你该知道怎么做了吧:)。 一切顺利的话,你可以撇开--pretend选项emerge了。


#emerge xchat



等满足了所有的倚赖关系(如果这种关系存在,不是所有的包都有这种倚赖关系。),接着xchat源码包会被下载(存储到 /usr/portage/distfiles目录),并在一个叫sandbox的零时目录下校验MD5,解压,编译和安装。接着他们被合并到本地文件系统,在/var/db/pkg/net-irc/xchat-1.4.3/CONTENTS目录下建立该包的数据库,包括所有安装的包和它们的 md5sum。



3 升级软件包


一般的我们升级一个软件包所用到的命令包括 emerge --update or emerge -u。



# emerge -u xchat


Portage使用一个被称为“Safe”的umerge命令负责拆卸原来的文件。如果一个文件已经被手动复盖或改写,它会先被从系统中移出,(也许,你已经安装了新版本的软件。)。如此一来,当你merge了新版本的xchat后umerge一个旧的版本,xhchat可执行文件不会被你的系统删除,因为它已有了新的时间信息和不同的md5sum。Safe unmerges 真得很棒,它可以在任何时候确认可用的软件版本。如果你先执行了unmerge命令,那么直到你下载安装了新版本的xchat,它才可被继续使用。



重点:


现在Portage加入了被称为“配置文件保护”的新特性。设计这个新特性的目的是为了防止新装的软件破坏原有的配置文件。一般的,配置文件保护特性默认在/etc和KDE配置目录下打开,将来会加入到更多其他的配置目录中。详情请执行emerge --help config命令察看。

Avatar_small
seoagency 说:
2020年1月07日 20:46

 

I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed... ezdrummer 2 crack 2020 free download

Avatar_small
aileen 说:
2020年1月08日 16:12

I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... Rent a car Dubai

Avatar_small
Cap Logo Embroidery 说:
2020年2月04日 19:19

Cap Logo Embroidery Digitizer is one specialized field that requires extensive training and experience to be mastered at.
Out of the many components associate with embroidery digitization, jacket back digitization is one unique component.
One of the limitation of jacket back digitizing is the amount of energy and time required to execute it precisely.

Avatar_small
hankstruckingca@gmai 说:
2020年4月13日 10:24

Nice to read your article! I am looking forward to sharing your adventures and experiences.

Avatar_small
Hp Timed 说:
2020年4月18日 14:02

Get News Update and read <a href="https://hptimespk.com/category/business-ideas/">Urdu business news</a>.

Avatar_small
free movies 说:
2020年4月24日 21:56

Watch free movies and TV shows online in HD on any device. Tubi of fers streaming movies in genres like Action, Horror, Sci-Fi, Crime and Comedy. Watch now.

Avatar_small
topsoil supplier 说:
2020年5月15日 13:40

Its a great pleasure reading your post. Great work<a href="https://www.hankstrucking.ca/">topsoil supplier</a>

Avatar_small
topsoil supplier 说:
2020年5月15日 13:43

Nice information..[url=https://www.hankstrucking.ca/]topsoil supplier [/url]

 
Avatar_small
Private Investigator 说:
2020年6月07日 18:06

Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.

Avatar_small
Legal Translation ce 说:
2020年8月11日 19:29

MikDoss Best Legal Translation centre in dubai has seen a lot of transformation since we began our operation over 10 years ago. From offering Legal Translation in Dubai, Legal Translation in Sharjah, Legal Translation in UAE & translation of websites for international business to localize, to developing our own in-house Translation Software with AI artificial intelligence.

Avatar_small
Sports flooring duba 说:
2020年8月11日 19:30

Our trowel applied concrete finish flooring with a wide range of different color and finishes to give a raw, natural industrial look to your environment. In order to prevent any cracking or if there are movements on the substrate, we make sure to add reinforced fiber mesh.

Avatar_small
automotive industry 说:
2020年9月02日 11:19

I am simply amazed. I hope that you proceed to do your work like this in the future also

Avatar_small
파워볼 说:
2020年9月18日 01:46

Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post.

Avatar_small
Navodaya Result 说:
2021年1月26日 23:12

The Result of Navodaya Vidyalaya will be declared in online mode. The candidate can check results by login to the official webs announced online, it has been announced in login and candidates can check it by entering registration number and date of birth. Merit list for the exam shall be available soon. Exam for JNVST class 6 was held on https://www.navodayaresult2019.com/ Navodaya Result Result 2021 Chhattisgarh January 11 and for class 9 it was conducted on February 08, 2020. The new date for phase 2 is yet to be announced and for class 11 admission the merit list will be released directly on the basis of qualifying marks score. Check more details on JNVST 2020 result from this page.

Avatar_small
scooterguys2021@gmai 说:
2021年2月02日 00:17

great work

Avatar_small
electric scooter uk 说:
2021年3月27日 15:18

MAK 1 Pro is an electric scooter for adults. this scooter has been carefully selected based on its performance,comparing to the more popular models

Avatar_small
cheap party bus rent 说:
2021年3月27日 17:02

Celebrate your wedding, grad or any other event in the luxury and elegance

Avatar_small
Siding Cleaning in S 说:
2021年4月01日 01:09

Taking care of your space with regular cleaning and maintenance is essential to preserving its longevity.

Avatar_small
rent a car in Islama 说:
2021年4月07日 00:13

we are providing more than fifty different types of vehicles to our clients to ensure we can serve our customers with appropriate rent a car Islamabad packages. Providing our clients a topnotch car hire Islamabad services has helped our team to be reckoned as one of the best Rent a car Islamabad.

Avatar_small
cheap prom limo rent 说:
2021年4月13日 01:31

We can work with you to choose the right vehicle in your budget. When you book our prom limos,

Avatar_small
Siding Cleaning in S 说:
2021年4月13日 15:11

Please take a look around our website and if you have any comments or questions,

Avatar_small
Best Assignment Writ 说:
2021年4月14日 15:02

We are known for writing content that is fine-tuned for the target audience!

Avatar_small
Online Exam Services 说:
2021年4月19日 13:16

We have served around 500+ clients with over a 95% success rate. Our professional writers also provide professional thesis writing help services in UK.

Avatar_small
rent a car in Islama 说:
2021年4月21日 22:53

Rent a Car in Islamabad can provide you with a vehicle that sits your traveling needs. We provide car rentals in Islamabad and across major cities in Pakistan.

Avatar_small
Siding Cleaning in S 说:
2021年4月22日 13:52

We started DMC Cleaning & Maintenance in January 2016. My skills and experience during my time in the trades has proven to be extremely beneficial.

Avatar_small
Online Exam Services 说:
2021年4月26日 17:30

Our expert writers provide the best professional academic writing services in UK.

Avatar_small
Best Power Washing S 说:
2021年4月26日 17:31

We provide hands on services and as such take great pride in our work.

Avatar_small
Wakeboard Lessons in 说:
2021年5月11日 16:13

Sarah Tallon, professional surfer, will be making a few guest stops this summer.

Avatar_small
Family friendly Rest 说:
2021年5月19日 20:21

next time you’re looking to grab the best pizza in Sicamous, think Moose Mulligan’s as we are one of the finest restaurants in town.

Avatar_small
Best Power Washing S 说:
2021年5月28日 15:15

I was in the trades for over 10 years, specializing in new construction plumbing in the commercial and housing industry. Something told me it was time to try something new so after my wife and I got married in August of 2015 we decided to start our own business.

Avatar_small
suzishairdesign 说:
2021年6月07日 13:31

One thing that is great about this lifestyle is getting to do what you love everyday. I am fortunate to be able to help men, women and children all look and feel their best! Book your appointment today to see what the buzz is all about.

Avatar_small
Best Realism Tattoo 说:
2021年6月14日 17:14

I specialize in watercolour, realism, new school, and neotraditional designs, and enjoy putting my own signature style into any tattoo I create.

Avatar_small
Hair Salon in Salmon 说:
2021年7月23日 14:08

How does a hairdresser stop herself from cutting her own hair? By SHEAR willpower! Have a great Monday!

Avatar_small
Revelstoke Mountain 说:
2021年7月23日 19:58

Revelstoke Mountain Resort is just a 40-minute drive, with world class champagne powder and the longest vertical in North America. It’s the best place to go if you’re looking for short line ups and deep powder.

Avatar_small
Expert Hair Stylist 说:
2021年7月28日 14:09

No outfit is complete unless you’ve got a great ‘do! We can help you get a hairstyle you love!

Avatar_small
Direct Vent Gas Fire 说:
2021年8月09日 13:24

At Archifire, we provide you with the best direct vent gas fireplaces in Australia. You can even call us and discuss the type of fireplace you would like for us to build in your home.

Avatar_small
Natural SkinCare Pro 说:
2021年8月09日 17:52

At CANN & Co., we believe in the potential of CBD to make consumers happier and healthier. So, it is no surprise that the CANN & Co.

Avatar_small
Top Ski Resorts in B 说:
2021年9月02日 16:15

There are 11 lifts that service the ski runs and snowboard terrain park. The resort also provides Nordic and heli-skiing opportunities.

Avatar_small
Top Ski Resorts in B 说:
2021年9月14日 22:48

Paradise Motel is the place to stay in Sicamous, BC, Canada. Whether coming to experience snowmobiling in the Shuswap, skiing or some family fun on Shuswap Lake

Avatar_small
echub 说:
2021年10月09日 02:14

ECHub will ensure that the time you spend in the application process is spent wisely on viewing those worth considering. We then become an extension of Your HR or actually the HR of a company that does not have one.

Avatar_small
Essay Writing Servic 说:
2021年10月13日 13:39

Write lancers is a bunch of talented individuals providing the best professional academic writing services in UAE

Avatar_small
dark web/deep web/d 说:
2022年8月04日 18:50

There is no header to indicate which domain or page is linked to. Each link is invisible until you click on it, making it impossible to track or scan for viruses or harmful software.   dark web links

Avatar_small
dark web/deep web/d 说:
2022年8月04日 19:34

There are many different reasons why these hackers choose to target websites that have a JavaScript code. One of the primary reasons is because these sites often contain many graphics that many users do not want to open.   deep web

Avatar_small
dark web/deep web/d 说:
2022年8月04日 19:50

Hackers can easily create new sites to steal your identity, and you could unknowingly become a victim of scams and other criminal activity. dark web links

Avatar_small
dark web/deep web/d 说:
2022年8月04日 20:12

I am sure that some of you are saying; well I know plenty of individuals who frequent the dark web, they are just normal users. Others argue that such links lead only to criminals, drug dealers, hackers, and identity thieves, well that's just not true. I know plenty of people who visit the dark web, and also live in cyberspace as well.   dark web sites

Avatar_small
dark web/deep web/d 说:
2022年8月04日 20:28

This way, you can get around the dangerous individuals and dangers that may pop up while you are looking at links. I use both the Mac interface and Windows interface to surf the net, and the privacy that you get with the VPN service is worth the price you pay.  dark web

Avatar_small
dark web/deep web/d 说:
2022年8月04日 20:43

The next thing that Chia teaches you in his course, and that you will find helpful in your own affiliate marketing business, is how to choose the right affiliate programs.   work from home jobs

Avatar_small
dark web/deep web/d 说:
2022年8月04日 20:58

One of the top affiliate marketing success stories of the year was Fathead, which launched an email series that targeted obese people looking to lose weight.   affiliate marketing success


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter