Gentoo Archives: gentoo-dev

From: drobbins@g.o
To: gentoo-dev@g.o
Subject: [gentoo-dev] Portage 1.5_pre Update
Date: Fri, 16 Feb 2001 09:18:11
Message-Id: 20010216091811.A25764@cvs.gentoo.org
1 Hello all,
2
3 Right now, there's a new version of Portage (1.5_pre1) on CVS that features
4 many major improvements (several that were suggested on this list). It breaks
5 compatibility with our older .tbz2 package format, so at this point it's
6 intended for testers only. Here's an outline of all changes:
7
8 Second-generation .tbz2 format
9 ==============================
10
11 Our new second-generation .tbz2 format features a new double-envelope design
12 for enhanced performance. Package metadata is encoded in our own lightweight
13 and fast "xpak" format and appended to the end of the .tbz2 archive, so that it
14 can be quickly and easily read by our package installation programs. Packages
15 can still be installed this way if you're in a pinch (although nothing will be
16 recorded in the package database):
17
18 # cat mypkg-1.0.tbz2 | bzip2 -dq | tar xvf - -C /
19
20 All the ebuild components have been updated to to use this second-generation
21 .tbz2 format, which will be the default package format for Gentoo Linux 1.0 and
22 beyond. ***Portage 1.5_pre1 is incompatible with old-style .tbz2 archives***
23
24 Enhanced package metadata
25 =========================
26
27 Binary packages as well as packages merged from sources now record additional
28 helpful metadata in /var/db/pkg. Right now, we're recording the following information:
29
30 /var/db/pkg/sys-apps/foo-1.0
31
32 CFLAGS Optimization flags used to compile foo-1.0
33 CXXFLAGS C++ optimization flags used to compile foo-1.0
34 CHOST The setting of CHOST used to compile foo-1.0
35 USE The "use" settings enabled at the time foo-1.0 was compiled
36 PROVIDES The virtual packages that foo-1.0 provides
37 CATEGORY Package category
38 PF Full package name
39 RDEPEND Runtime dependencies
40 LICENSE License information
41
42 You'll notice a new "LICENSE" setting. Developers can begin to add a LICENSE field
43 to their ebuilds and use it to record the licensing information for the package.
44 Examples:
45
46 #you'll use this most of the time
47 LICENSE="gpl"
48
49 #for BSD-like stuff
50 LICENSE="bsd"
51
52 #if a package offers multiple licensing options
53 LICENSE="gpl artistic"
54
55 Recursive pkgmerge
56 ==================
57
58 Thanks to our second-generation .tbz2 format, "recursive pkgmerge" now becomes
59 easy. Our new, enhanced pkgmerge command now performs the following steps:
60
61 # pkgmerge foo-1.0.tbz2
62
63 1. Scan foo-1.0.tbz2 for runtime dependencies
64 2. If any, scan PKGDIR, creating a directed graph of all runtime dependency information
65 3. Begin installing all necessary packages in optimal order
66
67 To use pkgmerge, you'll need to set PKGDIR to point to the location of your
68 .tbz2 packages. PKGDIR defaults to /usr/portage/packages. Portage expects to
69 find an "All" directory inside PKGDIR that contains all the packages. Please
70 remember that the new pkgmerge is incompatible with our old package format, so
71 you can't use this to recursively merge your current (old-style) packages.
72 However, Gentoo Linux 1.0_rc4 will use this new packaging format, and recursive
73 pkgmerges will be fully supported :)
74
75 pkgmerge also supports a new option, "--pretend". If you specify it as the first
76 argument, pkgmerge will tell you the packages it would install (in order), rather
77 than actually installing them.
78
79 Safe auto-unmerge
80 =================
81
82 You probably know that if you try to merge an already-installed package, the
83 current (old) version of ebuild doesn't let you. Instead, it asks you to
84 unmerge the currently-installed version first. This doesn't happen anymore.
85 Instead, the original instance of the package will be automatically safely
86 unmerged after the new instance has been merged. So, if you have gimp-1.2
87 already installed, but you update your gimp-1.2.ebuild with a few fixes, you
88 can simply type:
89
90 # ebuild gimp-1.2.ebuild merge
91
92 The new version will be compiled and merged, and then the older instance of
93 gimp-1.2 will be automatically and safely unmerged, removing any files no
94 longer used by the new instance.
95
96 ebuild updates
97 ==============
98
99 The "ebuild" program itself has been updated in several ways. First, the
100 "remerge" command has been removed (it's no longer needed, just use "merge").
101 Secondly, Achim's FHS 2.1 fixes have been incorporated into Portage, so that
102 all documentation and man pages (installed using doman and dobin only) will end
103 up in /usr/share rather than /usr/.
104
105 python updates
106 ==============
107
108 We have a new module called xpak.py that handles the creation and parsing of
109 xpak metadata. The portage.py code has been majorly overhauled. We now use an
110 object-based "dblink" system to access the /var/db/pkg object database. By
111 providing this object API, in the future we will be able to re-implement the
112 database code in C/C++, write a mySQL package database backend, or do whatever
113 we like. Of course, our new .tbz2 format is package database independent,
114 unlike old ebuilds that directly reference /var/db/pkg.
115
116 There are also a host of other cleanups and improvements, resulting in a
117 portage.py that has a bunch of new functionality, but is actually somewhat
118 _smaller_ than the original version.
119
120 new file locations
121 ==================
122
123 All Portage binaries now reside in /usr/lib/portage/bin, and symlinks are
124 created in /usr/sbin and /usr/bin for popular binaries. ebuild is now in
125 /usr/sbin, along with pkgmerge. The new tbz2tool and xpak binaries live in
126 /usr/bin. If you're going to test Portage 1.5_pre1, be sure to delete
127 your old /usr/bin/ebuild script!
128
129 That's all for now :)
130
131 Best Regards,
132
133 --
134 Daniel Robbins <drobbins@g.o>
135 President/CEO http://www.gentoo.org
136 Gentoo Technologies, Inc.

Replies

Subject Author
Re: [gentoo-dev] Portage 1.5_pre Update Thomas Flavel <thomasfl@××××××××××××.uk>
Re: [gentoo-dev] Portage 1.5_pre Update Jerry A! <jerry@×××××××.org>
Re: [gentoo-dev] Portage 1.5_pre Update 320095285153-0001@t-online.de (Achim Gottinger)