Post details: Package Musings From the Core...

6 September, 2006

Permalink 17:59 UTC, by Elfyn Email , 198 words, 1771 views   English (US)
Categories: Gentoo

Package Musings From the Core...

So, it seems that I'm destined to blog a lot today! ;)

pkgcore
I've started working on pkgcore this (fine, sunny) afternoon, and I'll be working on supporting binpkgs completely in pkgcore - hopefully! ;) Thus far, I have a minimal doc (which will appear in my overlay shortly) with some random musings about, essentially, how we tac metadata onto a binpkg .tbz2 archive. Since binpkg code will be easy to do - it's mainly just keeping the metadata packed on the end of a binpkg up-to-date and reading/writing said metadata; basically, being able to introspect metadata for a binpkg easily... :)

I currently have a following "not all all pseudo" code:

  1. mmap() open binpkg fd;
  2. cast base + offset to a struct containing metadata;
  3. ... manipulate data ...;
  4. write-out data (if write operation) with a memcpy and msync();
  5. munmap() binpkg fd.

Once this is done, we essentially do the following for all write operations:

  1. fsync() all fds;
  2. fsync all binpkg directory fds (to ensure sync!);
  3. ... wait for disk for flush ...;
  4. report status to user.

Pretty simple, fast, and effective. :) Note that this is just for the "update all binpkgs" case, not a single inspect/change binpkg metadata... Time to put this to the test! :>

Trackback address for this post:

http://planet.gentoo.org/developers/htsrv/trackback.php/914

Comments, Trackbacks:

No Comments/Trackbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Elfyn McBratney

September 2008
Mon Tue Wed Thu Fri Sat Sun
<< <     
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 39

powered by
b2evolution