Gentoo Archives: gentoo-embedded

From: Kfir Lavi <lavi.kfir@×××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] quickpkg and PKG_INSTALL_MASK
Date: Tue, 27 Dec 2011 11:45:34
Message-Id: CAHNvW1+4DiYBEjtovTYEVVicPL3RMJp6PomGxyQo0KbxjhpvoQ@mail.gmail.com
In Reply to: Re: [gentoo-embedded] quickpkg and PKG_INSTALL_MASK by Joakim Tjernlund
1 On Tue, Dec 27, 2011 at 11:40 AM, Joakim Tjernlund <
2 joakim.tjernlund@×××××××××.se> wrote:
3
4 > solar <solar@g.o> wrote on 2011/12/26 21:38:52:
5 > >
6 > > On Mon, 2011-12-26 at 19:03 +0100, Joakim Tjernlund wrote:
7 > > > solar <solar@g.o> wrote on 2011/12/25 18:52:52:
8 > > > >
9 > > > > On Sun, 2011-12-25 at 11:34 +0200, Kfir Lavi wrote:
10 > > > > >
11 > > > > >
12 > > > > > On Fri, Dec 23, 2011 at 3:23 PM, Joakim Tjernlund
13 > > > > > <joakim.tjernlund@×××××××××.se> wrote:
14 > > > > >
15 > > > > > I got the impression from docs that PKG_INSTALL_MASK would
16 > > > > > actually
17 > > > > > mask files out so they never get into the binary package,
18 > this
19 > > > > > doesn't
20 > > > > > seem to happen.
21 > > > > > Did I misunderstand? If I did, I think an MASK to do the
22 > above
23 > > > > > would be a worthy addition to quickpkg, very useful for
24 > > > > > embedded targets to keep the pkg size down.
25 > > > > > Also PKG_INSTALL_KEEP which would list files keep(rest is
26 > > > > > dropped) would be nice.
27 > > > > >
28 > > > > > Oh, something else I wonder about. How does pre/post
29 > install
30 > > > > > work with
31 > > > > > quickpkgs? Is it possible to have such scripts and then
32 > have
33 > > > > > qmerge execute
34 > > > > > them?
35 > > > > >
36 > > > > > Jocke
37 > > > > >
38 > > > > >
39 > > > > > Yes, PKG_INSTALL_MASK on time of installation will mask the files
40 > > > > > defined in it.
41 > > > > > Binary package do contain all files, even the masked files.
42 > > > > > Kfir
43 > > > >
44 > > > >
45 > > > > $PKG_INSTALL_MASK is supposed to omit the files in it's list from
46 > making
47 > > > > it into the binary pkgs in the first place. The idea there was to
48 > make
49 > > > > smaller binary pkgs for embedded devices and such (for use only with
50 > > > > private repos).
51 > > > >
52 > > > > $INSTALL_MASK is supposed to omit the files listed in it from being
53 > > > > installed on the file system.
54 > > >
55 > > > Hi Solar, long time no see :)
56 > > >
57 > > > So the current behaviour is a bug, good to know.
58 > >
59 > > I would not really call it a bug. *INSTALL_MASK is a portage feature
60 > > itself. quickpkg does not support all the features of portage itself.
61 > > You could/should file a feature request bug for quickpkg to add such
62 > > support. Maybe file a bug for portage-utils@ as well because I just
63 > > checked and looks like we never added support for PKG_INSTALL_MASK in
64 > > qpkg.c (c version of quickpkg)
65 >
66 > I don't really get the difference between the two as impl. today.
67 > What can PKG_INSTALL_MASK do that INSTALL_MASK can't(or vice versa)?
68 >
69 > What I undersood is that PKG_INSTALL_MASK will make smaller binary tbz
70 file, and
71 INSTALL_MASK will at install time, mask files, so the tbz will have all
72 files in it.
73
74 Kfir
75
76 > >
77 > >
78 > > > I am contemplating a greater problem too. Our system require we can
79 > install
80 > > > multiple versions of our SW and switch between them. This is easy to
81 > do when it
82 > > > comes to our own app but not when one want to upgrade core parts of
83 > the system, like
84 > > > libc etc.
85 > > >
86 > > > So I am thinking one could use --bind mounts and switch_root to solve
87 > that. Basically
88 > > > one has a skeleton root FS with /bin, /lib, /usr /opt etc.
89 > > > Each upgrade goes into dirs like:
90 > > > bin_1.x.y/ usr_1.x.y/ lib_1.x.y/ opt_1.x.y/ sbin_1.x.y/
91 > > > Then, from an initramfs, one selects which of xxx_1.x.y dir one wants
92 > to use
93 > > > and --bind mounts them under the corresponding skeleton dir.
94 > > >
95 > > > To do that one needs an way to repackage a root fs created by a bunch
96 > of different
97 > > > ebuilds, some of them spanning several of the above dirs, into a
98 > package per xx_1.x.y dir.
99 > > > Not sure if this can be done with the current portage/portage-utils
100 > and how, any
101 > > > ideas welcome :)
102 > > >
103 > > > Perhaps there is a better way then the above?
104 > > >
105 > > > Jocke
106 > >
107 > > Not sure about all this.
108 >
109 > Yeah, it is a bit much :) I either case it would be nice if one
110 > could group several bianry pkgs into one that qmerge can install. Is that
111 > possible?
112 >
113 > Jocke
114 >
115 >
116 >