Oh, I thought of some ways people could help me out here in an
independent fashion, if anyone's got the gumption:
1) write a function that, given a package name (like dev-apps/xyz),
return the name of the latest ebuild (i.e xyz-2.3-p2.ebuild)
2) need the fetch function written, given the data filename
(a question about this: when I fetch the data file, how do I know
exactly what to fetch? If the ebuild is name xyz-2.3-p2, how do I learn
what the data file is named? Is there a set guarantee? does the -p2
change anything?)
Thanks
Ben
On Tue, 2005-02-15 at 10:56 -0500, Ned Ludd wrote:
> On Tue, 2005-02-15 at 16:25 +0100, Benjamin Collar wrote:
> > Hello list
> >
> > just wanted to let you know: I didn't drop off the earth. I worked on
> > the emerge.c a little this weekend. So far I've been learning a bit of
> > busybox's structure, planning the emerge.c, and integrating some of
> > busybox's api. Nothing worth testing so far, though.
>
> If you mail me offlist what you have so far I can bbify it and send it
> back to you.
>
> > Next week I'll have some vacation, so I'll have time to work on it.
> >
>
> > I have a question, though: what's the INDEX file? I don't exactly find
> > one on my system, and I'm not sure what I'm supposed to be doing to
> > update it. Any hints?
>
> Sadly I've learned new info about the file known as INDEX. portage no
> longer uses this if I understand the python portage developers right.
> It now uses some has data stored in a metadata.idx that's cpickle
> format. This is useless to us as it's python compiled bytecode or other.
>
> > Also, regarding the tbz2 format: the tbz2tool packs a dbfile onto the
> > end of the package itself. what data is in this dbfile? how is this data
> > generated?
>
> It's not really a dbfile.
> The data is made via these commands from dyn_compile in ebuild.sh
>
> set > environment
> export -p | sed 's:declare -rx:declare -x:' >> environment
> bzip2 -9 environment
>
> In my last mail I said that getting the pkg_{pre,post}inst commands
> out of this 'environment' might be a little tricky.
> I was wrong and it's
> really rather easy because the generated data in a .tbz2 comes via the
> 'set' command so everything will have proper indentation.
>
> This extracts a function on an uncompressed 'environment'
> http://dev.gentoo.org/~solar/portage_misc/pkg-function.c
>
> I'll see if I can whip something up which does the same for a variables.
>
>
> > Pardon me, if those are silly questions, but I haven't programmed
> > anything in portage so far...
> >
> > Thanks
> > Ben
> >
--
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711
--
[email protected] mailing list