Hi Natanael & list

Thanks for the update. I wanted to let you all know that I didn't
disappear, it's just that my laptop has been a bit broken, thus causing
a code blockage.

I have some important questions, though, regarding the packages file. So
far the structure is like this:

PF: which-2.16
CATEGORY: sys-apps
CHOST: i686-pc-linux-gnu
LICENSE: GPL-2
CFLAGS: -march=i686 -Os -pipe -fforce-addr -fomit-frame-pointer
-Wformat=2
RDEPEND: virtual/libc sys-apps/texinfo
SIZE: 42849

There is a separate entry for every package and a separate entry for
every *version* of every package. I'm writing some code that will parse
all this and make big hunky-dory data structures so emerge knows what
all to install.

What I need to know is, what data is static for a particular Package
file? What can I assume will be the same between two same-package
entries (ie what will be the same for the entries for which-2.16 and
which-2.17)?

This is important because I can save a lot of memory space (and thus
minimize search space) by knowing what's static. And since we're talking
about devices, which are targetted, I figure, some of it has just gotta
be static.

For instance, things I figure are static (and I mean static *within a
certain Package file at a certain time*):

CHOST
CATEGORY
CFLAGS

I'd like it if RDEPENDS were static but can imagine that they are not.

On a side note, if anyone is bored, how about you write a standard
sorting function that determines the sort of two package-version strings
(like 2.4.10-r1 and 2.4.10-r2)

Ben

On Tue, 2005-03-15 at 17:05 +0100, Natanael Copa wrote:
> Since the temporary cvs is still down I post what I have so far here.
> 
> http://home.tiscali.no/natanael/software/busybox/tbz2pkg.c
> http://home.tiscali.no/natanael/software/busybox/tbz2pkg.h
> 
> It still not caluclates the file hashes, just compares the date and size
> of the files.
> 
> BusyBox v1.00 (2005.03.09-15:47+0000) multi-call binary
> 
> Usage: tbz2pkg [OPTIONS] ... [FILE]
> 
> Install binary gentoo tbz2 package
> When FILE is '-' or unspecified, reads standard input.
> Options:
>         -d|--debug            : Debug info
>         -h|--help             : This help
>         -i|--install          : Install a package
>         -M|--install-mask     : define INSTALL_MASK=
>         -L|--list             : List installed files for pacakge
>         -p|--pretend          : Pretend
>         -P|--purge            : Purge package
>         -R|--root=<dir>       : define ROOT=
>         -v|--verbose          : set verbose flag
> 
> Those things are supposed to work.
> 
> The idea is that emerge.c and tbz2pkg.c share the configureables
> structure for config. tbz2pkg is then called with:
> 
> tbz2pkg_init(&conf);
> tbz2_install_file(downloaded_tbz2);
> 
> I have been doing this when have some time over here and there so excuse
> me if the code is not very clear.
> 
> --
> Natanael Copa
> 
> 
> 
> 
> 
> --
> [email protected] mailing list
> 
-- 
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711



--
[email protected] mailing list

Reply via email to