Browse Source

* changed mnemosyne.pl to generate awk file in dir order and not hash order

* replace DISABLE_ALL with a 00-mnemosyne.all module on top which disables everything
legacy/multilib
Alejandro Mery 19 years ago
parent
commit
b1c737e58d
3 changed files with 24 additions and 18 deletions
  1. +22
    -17
      mnemosyne.pl
  2. +1
    -1
      pkgsel.in
  3. +1
    -0
      pkgsel/00-mnemosyne.all

+ 22
- 17
mnemosyne.pl

@ -379,8 +379,11 @@ sub pkgsel_parse {
print "\techo '$address ) { $action; }'\n";
return 1;
}
sub render_awkgen {
open(my $OUTPUT,'>',$_[0]);
my $root="CFGTEMP_$_[1]";
select $OUTPUT;
# initially change packages $4 and $5 to be able to correctly match repo based.
@ -389,17 +392,28 @@ sub render_awkgen {
print "echo '\tpkg=\$5 ;'\n";
print "echo '\t\$5 = \$4 \"/\" \$5 ;'\n";
print "echo '\t\$4 = \"placeholder\" ;'\n";
print "echo '}'\n";
# if awkgen is sourced with DISABLE_ALL as argument
# we disable everything before starting
print "if [ \"\$1\" == DISABLE_ALL ]; then\n";
print "\techo '\t\$1=\"O\" ;'\n";
print "fi\n";
render_awkgen_folder($::FOLDER{$root});
# ... restore $4 and $5, and print the resulting line
print "echo '\n{'\n";
print "echo '\t\$4=repo ;'\n";
print "echo '\t\$5=pkg ;'\n";
print "echo '\tprint ;'\n";
print "echo '}'\n";
for (values %::MODULE) {
my $module=$_;
select STDOUT;
close($OUTPUT);
}
sub render_awkgen_folder {
my ($folder) = @_;
for (@{$folder->{children}}) {
if (/^CFGTEMP/) {
render_awkgen_folder($::FOLDER{$_});
} else {
my $module=$::MODULE{$_};
if ($module->{kind} == CHOICE) {
my %options;
@ -451,16 +465,7 @@ sub render_awkgen {
print "fi\n";
}
}
# ... restore $4 and $5, and print the resulting line
print "echo '\n{'\n";
print "echo '\t\$4=repo ;'\n";
print "echo '\t\$5=pkg ;'\n";
print "echo '\tprint ;'\n";
print "echo '}'\n";
select STDOUT;
close($OUTPUT);
}
}
sub render_rules_module {

+ 1
- 1
pkgsel.in

@ -14,7 +14,7 @@
# --- T2-COPYRIGHT-NOTE-END ---
if [ -s $cfgtmpdir/mnemosyne.awkgen.in ]; then
. $cfgtmpdir/mnemosyne.awkgen.in DISABLE_ALL \
. $cfgtmpdir/mnemosyne.awkgen.in \
> $cfgtmpdir/mnemosyne.pkgsel.awk
pkgfilter awk -f $cfgtmpdir/mnemosyne.pkgsel.awk
fi

+ 1
- 0
pkgsel/00-mnemosyne.all

@ -0,0 +1 @@
O *

Loading…
Cancel
Save