summaryrefslogtreecommitdiffstats
path: root/notes.txt
blob: 3cb92905f3c26019e7a863b2aad43fb8d6e98a9e (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
prokit install [-a <arch>] [-P <plat>] <suite> <chroot>
	<suite>
		e.g. rs1, dev/trunk, or proteanos:dev/trunk
	if <arch> != host-arch
		install host-arch base packages to /inst
prokit shell <chroot>
prokit opkg <chroot> [<option> ...] <command> [<argument> ...]
prokit opkbuild <chroot> [<option> ...] <pkgdir>
	gets build deps, makes and installs metapackage, opkbuilds
	removes metapackage, autoremoves cruft


developer:

    host$ prokit install -a core-linux-eglibc -P dev proteanos:dev/trunk chroot
    host$ prokit opkbuild chroot .

buildd:

    host$ prokit opkg chroot install src-expat
    host$ prokit opkbuild chroot chroot/usr/src/expat_*/


run_cmd()
{
	if $# lt cmd_$cmd_min_args
		help $cmd
		exit 1
	if cmd_$cmd_max_args is set and $# gt cmd_$cmd_max_args
		help $cmd
		exit
	i=0; args=
	while i lt cmd_$cmd_exp_args
		args="$args ''"
	eval cmd_$cmd_main $@ $args
}

cmd_install_min_args=2
cmd_install_exp_args=2
cmd_install_max_args=2

opkg cmd?  parses opts after <chroot>?
maybe <chroot> itself should be an option?


all_deps=
while $new_pkgs not empty
	all_deps="$all_deps $new_pkgs"
	new_deps=
	for each pkg in $new_pkgs
		new_deps=`grep "^$pkg " *depends.list | cut -d ' ' -f 2-`
	new_deps=`printf '%s\n' $new_deps | sort -u`
	new_pkgs=
	for each pkg in $new_deps
		if $pkg not in $all_deps
			new_pkgs="$new_pkgs $pkg"


	for each line in feed index
		if line not empty
			parse control fields
		else
			run profile callback
			if $pkg should be installed
				pkgs="$pkgs $pkg"
				unresolved="$deps"
	while $unresolved not empty
		for each line in feed index
			if line not empty
				parse control fields
			else
				if $unresolved starts with $pkg
					

allpkgs='base'
newpkgs='busybox linux-image opkg'
foreach pkg
	if $pkg in $newpkgs