1 |
Il giorno dom 11 nov 2018 alle ore 09:29 Michał Górny <mgorny@g.o> |
2 |
ha scritto: |
3 |
|
4 |
> On Sat, 2018-11-10 at 09:37 -0500, Alec Warner wrote: |
5 |
> > On Sat, Nov 10, 2018 at 8:09 AM Michał Górny <mgorny@g.o> wrote: |
6 |
> [...] |
7 |
> > > My proposal |
8 |
> > > =========== |
9 |
> > > |
10 |
> > > Basic format |
11 |
> > > ------------ |
12 |
> > > The base of the format is a regular compressed tarball. There's no |
13 |
> junk |
14 |
> > > appended to it but the metadata is stored inside it as |
15 |
> > > /var/db/pkg/${PF}. The contents are as compatible with the actual vdb |
16 |
> > > format as possible. |
17 |
> > > |
18 |
> > |
19 |
> > Just to clarify, you are suggesting we store the metadata inside the |
20 |
> > contents of the binary package itself (e.g. where the other files that |
21 |
> get |
22 |
> > merged to the liveFS are?) What about collisions? |
23 |
> > |
24 |
> > E.g. I install 'machine-images/gentoo-disk-image-1.2.3' on a machine that |
25 |
> > already has 'machine-images/gentoo-disk-image-1.2.3' installed, won't it |
26 |
> > overwrite files in the VDB at qmerge time? |
27 |
> |
28 |
> Portage will obviously move the files out, and process them as metadata. |
29 |
> The idea is to precisely use a directory that can't be normally part |
30 |
> of binary packages, so can't cause collisions with real files (even if |
31 |
> they're very unlikely to ever happen). |
32 |
> |
33 |
> > > This has the following advantages: |
34 |
> > > |
35 |
> > > + Binary package is still stored as a single file. |
36 |
> > > |
37 |
> > > + It uses a standard compressed .tar format, with minimal |
38 |
> customization. |
39 |
> > > |
40 |
> > > + The user can easily inspect and modify the packages with standard |
41 |
> > > tools (tar and the compressor). |
42 |
> > > |
43 |
> > > + If we can maintain reasonable level of vdb compatibility, the user |
44 |
> can |
45 |
> > > even emergency-install a package without causing too much hassle (as it |
46 |
> > > will be recorded in vdb); ideally Portage would detect this vdb entry |
47 |
> > > and support fixing the install afterwards. |
48 |
> > > |
49 |
> > |
50 |
> > I'm not certain this is really desired. |
51 |
> |
52 |
> Are you saying it's better that user emergency-installs a package |
53 |
> without recording it in vdb, and ends up with mess of collisions |
54 |
> and untracked files? |
55 |
> |
56 |
> Just because you don't like some use case doesn't mean it's not gonna |
57 |
> happen. Either you prepare for it and make the best of it, or you |
58 |
> pretend it's not gonna happen and cause extra pain to users. |
59 |
> |
60 |
> |
61 |
Another option would be to install in a near but not overlapping directory, |
62 |
example: |
63 |
/var/db/pkg/${PF}-binpkg |
64 |
|
65 |
this way the user that know what to do with that data can play with it, |
66 |
also portage could be instructed to stat() that directory and take action |
67 |
(halt maybe?) if present. |