On Friday 25 February 2005 07:26, Francisco Figueiredo Jr. wrote:
> Hi all,
>
> After using sometime emerge, I noticed that it first compiles the
> programs to somedir/work temp dir and later copy contents to the real
> prefix /
>
>
> Does emerge uses that procedure to be able to keep track of what files
> need to be copied to /prefix?
>
> Does it uses this information too to know what files need to be deleted
> when I emerge -C?
>
>
> Just to confirm, if I did a ebuild which compiles files a.blah and
> b.blah and copies them to /usr/bin when I emerge -C emerge will know it
> needs to delete a.blah and b.blah?
NB: I am not an ebuild writer, but I have played with them on occasion, and I
have read the docs.
That said,
Here's how it works:
The ebuild unpacks the source into ${WORKDIR}
(/var/tmp/portage/foo-x.y.z/work)
The ebuild compiles the source in ${WORKDIR}.
Portage creates ${DESTDIR} (/var/tmp/portage/foo-x.y.z/image)
The ebuild installs the compiled package, not into /, but ${DESTDIR}
(i.e. /usr/bin/foo would actually be installed into ${DESTDIR}/usr/bin/foo).
Portage then copies the contents of ${DESTDIR} into /, recording the file
path, timestamps and an md5sum of each file as it goes.
emerge -C just takes this list, and deletes every file in the list where
(1) the timestamps match
(2) the md5sum matches
(3) the file is not CONFIG_PROTECTed
--
t3h 3l3ctr0n3rd <[EMAIL PROTECTED]>
Supermarket Deli Clerk and Student Programmer
OpenPGP Key Fingerprint:
0A65 EEFA B23A F0AC E6C2 C71C BEA0 E055 BE0E EC25
pgpdIcfLkOHth.pgp
Description: PGP signature
