Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 May 2010 21:00:03 -0700
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Garrett Cooper <gcooper@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>, Julien Laffaye <jlaffaye@freebsd.org>
Subject:   Re: PERFORCE change 178963 for review
Message-ID:  <AANLkTik7Q4k8t2wmX7mN4x0O1p_lT8rGe75zgbCSSAQW@mail.gmail.com>
In-Reply-To: <AANLkTild3urn0qv6kEAH7XtZ3XXvIb8oyAqiyO_vbWdV@mail.gmail.com>
References:  <201005300157.o4U1vbnm051835@repoman.freebsd.org> <AANLkTild3urn0qv6kEAH7XtZ3XXvIb8oyAqiyO_vbWdV@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 29, 2010 at 8:55 PM, Garrett Cooper <gcooper@freebsd.org> wrote=
:
> On Sat, May 29, 2010 at 6:57 PM, Julien Laffaye <jlaffaye@freebsd.org> wr=
ote:
>> http://p4web.freebsd.org/@@178963?ac=3D10
>>
>> Change 178963 by jlaffaye@gsoc on 2010/05/30 01:57:14
>>
>> =A0 =A0 =A0 =A0Plans and thoughts for complete packages support.
>>
>> Affected files ...
>>
>> .. //depot/projects/soc2010/pkg_complete/Milestones#2 edit
>>
>> Differences ...
>>
>> =3D=3D=3D=3D //depot/projects/soc2010/pkg_complete/Milestones#2 (text+ko=
) =3D=3D=3D=3D
>>
>> @@ -1,0 +1,26 @@
>> +pkg_create:
>> + =A0 =A0 =A0 The options of pkg_create are useless for creating a compl=
ete package.
>> +Should we add support for complete package in pkg_create or into a new =
tool?
>> +The tool for creating a complete package would take for first argument =
the meta
>> +(traditionnal) package. Then the tool read the plist to look for @pkgde=
p and
>> +repeat the operation for each dependency.
>> +After ordering the dependencies, the tool tar'up all the traditionnal p=
ackages
>> +(without compression as the packages are already bz'ed).
>> +This step would require factorisation of the code in pkg_info into a li=
bpkg
>> +function, with libarchive support for efficiency.

Sorry... some more thoughts.

>From a design perspective, what you're referring to (by some) is a
package bundle where you have a means of specifying the metadata in
the bundle of packages, and you have the payloads themselves.

Some things to think about:

a. What happens if one of the packages fails to install out of the
bundles, but some packages have already been installed?
b. What happens if one of the packages is already installed on the system:
    i. with the same version?
    ii. with a different version?

>> +ports tree:
>> + =A0 =A0 =A0 Add a "complete-package" target which depends on package-r=
ecursive and
>> +call the tool of step 1.
>
> Check with portmgr (at least flz), but it would probably be better to
> stick with the package- prefixed target status quo.
>
> FWIW though this will require rewriting bits of package-noinstall, or
> similar targets, as ports currently doesn't use pkg_install except to
> register the install of all of the bits from ${WRKDIR}
> (/usr/ports/.../work if not specified otherwise) into ${PREFIX}.
>
>> +pkg_add:
>> + =A0 =A0 =A0 Add simple routine to test if the package is a traditionna=
l or complete package.
>> +If the package is complete, loop over the traditionnal packages in it,
>> +call the function to install a traditionnal package (this function may =
work
>> +with streams). If the package is tradionnal, pass directly the stream t=
o the
>> +function.
>> +
>> +As a side effect, remove playpen and embrace libarchive.
>
> Yes... this will be a good thing, as several people have agreed, but
> requires a ton of tests (including negative ones), and there's some
> forethought that needs to be done and potential rewriting that's
> required as whether or not the installed bits exist in the right
> spots, and the permissions are sane will need to be properly evaluated
> beforehand.
>
> You can't completely remove libarchive unless you properly use the
> mktemp(3) family of functions though because there are some files
> (like +CONTENTS) which need to be generated on the fly.
>
>> +pkg_info:
>> + =A0 =A0 =A0 Show if the package is complete (list of contained package=
s) or the
>> +info of the traditionnal package.
>
> s/traditionnal/traditional/

Thanks!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik7Q4k8t2wmX7mN4x0O1p_lT8rGe75zgbCSSAQW>