$config->{'substitute'} = {};
$config->{'optflags'} = {};
$config->{'rawmacros'} = '';
+ $config->{'repotype'} = [];
for my $l (@spec) {
$l = $l->[1] if ref $l;
next unless defined $l;
next unless @l;
$ll = shift @l;
$config->{'optflags'}->{$ll} = join(' ', @l);
+ } elsif ($l0 eq 'repotype:') {
+ $config->{'repotype'} = [ @l ];
} elsif ($l0 !~ /^[#%]/) {
warn("unknown keyword in config: $l0\n");
}
}
- for my $l (qw{preinstall required support keep runscripts}) {
+ for my $l (qw{preinstall required support keep runscripts repotype}) {
$config->{$l} = [ unify(@{$config->{$l}}) ];
}
for my $l (keys %{$config->{'substitute'}}) {
} elsif ($t eq '!') {
($v, $expr) = expr(substr($expr, 1), 0);
return undef unless defined $v;
+ $v = 0 if $v && $v eq '\"\"';
+ $v =~ s/^0+/0/ if $v;
$v = !$v;
} elsif ($t eq '-') {
($v, $expr) = expr(substr($expr, 1), 0);
if ($line =~ /^\s*%if(.*)$/) {
my ($v, $r) = expr($1);
$v = 0 if $v && $v eq '\"\"';
+ $v =~ s/^0+/0/ if $v;
$skip = 1 unless $v;
$hasif = 1;
next;
}
}
+sub rpm_verscmp_part {
+ my ($s1, $s2) = @_;
+ if (!defined($s1)) {
+ return defined($s2) ? -1 : 0;
+ }
+ return 1 if !defined $s2;
+ return 0 if $s1 eq $s2;
+ while (1) {
+ $s1 =~ s/^[^a-zA-Z0-9]+//;
+ $s2 =~ s/^[^a-zA-Z0-9]+//;
+ my ($x1, $x2, $r);
+ if ($s1 =~ /^([0-9]+)(.*?)$/) {
+ $x1 = $1;
+ $s1 = $2;
+ $s2 =~ /^([0-9]*)(.*?)$/;
+ $x2 = $1;
+ $s2 = $2;
+ return 1 if $x2 eq '';
+ $x1 =~ s/^0+//;
+ $x2 =~ s/^0+//;
+ $r = length($x1) - length($x2) || $x1 cmp $x2;
+ } elsif ($s1 ne '' && $s2 ne '') {
+ $s1 =~ /^([a-zA-Z]*)(.*?)$/;
+ $x1 = $1;
+ $s1 = $2;
+ $s2 =~ /^([a-zA-Z]*)(.*?)$/;
+ $x2 = $1;
+ $s2 = $2;
+ return -1 if $x1 eq '' || $x2 eq '';
+ $r = $x1 cmp $x2;
+ }
+ return $r if $r;
+ if ($s1 eq '') {
+ return $s2 eq '' ? 0 : -1;
+ }
+ return 1 if $s2 eq ''
+ }
+}
+
+sub rpm_verscmp {
+ my ($s1, $s2) = @_;
+
+ return 0 if $s1 eq $s2;
+ my ($e1, $v1, $r1) = $s1 =~ /^(?:(\d+):)?(.*?)(?:-([^-]*))?$/s;
+ $e1 = 0 unless defined $e1;
+ $r1 = '' unless defined $r1;
+ my ($e2, $v2, $r2) = $s2 =~ /^(?:(\d+):)?(.*?)(?:-([^-]*))?$/s;
+ $e2 = 0 unless defined $e2;
+ $r2 = '' unless defined $r2;
+ if ($e1 ne $e2) {
+ my $r = rpm_verscmp_part($e1, $e2);
+ return $r if $r;
+ }
+ if ($v1 ne $v2) {
+ my $r = rpm_verscmp_part($v1, $v2);
+ return $r if $r;
+ }
+ if ($r1 ne $r2) {
+ return rpm_verscmp_part($r1, $r2);
+ }
+ return 0;
+}
+
###########################################################################
my $have_zlib;
+Repotype: debian
+
Preinstall: bash perl-base sed grep coreutils debianutils
Preinstall: libc6 libncurses5 libacl1 libattr1
Preinstall: libreadline4 tar gawk dpkg
Preinstall: sysv-rc gzip base-files
+Runscripts: base-files
+
Required: autoconf automake binutils bzip2 gcc gettext libc6
Required: libtool libncurses5 perl zlib1g dpkg
+Repotype: rpm-md suse
+
Preinstall: aaa_base acl attr bash bzip2 coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libnscd libselinux libxcrypt m4 ncurses pam
Preinstall: permissions popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
Preinstall: libgcc libnscd libxcrypt m4 ncurses pam
Preinstall: permissions popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
%endif
Macros:
-%insserv_prereq insserv sed devs
+%insserv_prereq insserv sed
%fillup_prereq fillup coreutils
%suseconfig_fonts_prereq perl aaa_base
%install_info_prereq info
Preinstall: libgcc41 libnscd libxcrypt m4 ncurses pam
Preinstall: permissions popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gcc41
Required: gdbm gettext glibc libtool ncurses perl rpm zlib
Keep: patch perl rcs timezone
Prefer: xorg-x11-libs libpng fam mozilla mozilla-nss xorg-x11-Mesa
-Prefer: unixODBC libsoup glitz java-1_4_2-sun gnome-panel
+Prefer: unixODBC libsoup glitz java-1_4_2-sun java-1_4_2-sun-jdbc gnome-panel
Prefer: desktop-data-SuSE gnome2-SuSE mono-nunit gecko-sharp2
-Prefer: apache2-prefork openmotif-libs ghostscript-mini gtk-sharp
-Prefer: glib-sharp libzypp-zmd-backend mDNSResponder
+Prefer: apache2-prefork Mesa openmotif-libs ghostscript-mini ghostscript-library gtk-sharp
+Prefer: glib-sharp libzypp-zmd-backend mDNSResponder-lib
Prefer: gnome-sharp2:art-sharp2 gnome-sharp:art-sharp
Prefer: ifolder3:gnome-sharp2 ifolder3:gconf-sharp2
Prefer: tomboy:gconf-sharp tomboy:gnome-sharp
Prefer: zmd:libzypp-zmd-backend
Prefer: yast2-packagemanager-devel:yast2-packagemanager
+Prefer: glitz-32bit:Mesa-32bit libcdio-mini faac-min
Prefer: -libgcc-mainline -libstdc++-mainline -gcc-mainline-c++
Prefer: -libgcj-mainline -viewperf -compat -compat-openssl097g
Prefer: -zmd -OpenOffice_org -pam-laus -libgcc-tree-ssa -busybox-links
-Prefer: -crossover-office
+Prefer: -crossover-office -java-1_5_0-ibm -java-1_5_0-ibm-jdbc
+Prefer: -java-1_4_2-gcj-compat -NX
Conflict: ghostscript-library:ghostscript-mini
Ignore: kdebase3-SuSE:release-notes
Ignore: jack:alsa,libsndfile
Ignore: libxml2-devel:readline-devel
-Ignore: gnome-vfs2:gnome-mime-data,desktop-file-utils,cdparanoia,dbus-1,dbus-1-glib,krb5,hal,libsmbclient,fam,file_alteration
+Ignore: gnome-vfs2:gnome-mime-data,desktop-file-utils,cdparanoia,dbus-1,dbus-1-glib,hal,libsmbclient,fam,file_alteration
Ignore: libgda:file_alteration
Ignore: gnutls:lzo,libopencdk
Ignore: gnutls-devel:lzo-devel,libopencdk-devel
Ignore: java-1_4_2-sun:xorg-x11-libs
Ignore: java-1_4_2-sun-devel:xorg-x11-libs
Ignore: kernel-um:xorg-x11-libs
-Ignore: tetex:xorg-x11-libs,expat,fontconfig,freetype2,libjpeg,libpng,ghostscript-x11,xaw3d,gd,dialog,ed
+Ignore: tetex:xorg-x11-libs,expat,fontconfig,freetype2,libjpeg,ghostscript-x11,xaw3d,gd,dialog,ed
Ignore: yast2-country:yast2-trans-stats
+Ignore: tpb:tpctl-kmp
+Ignore: tpctl:tpctl-kmp
+Ignore: mkinitrd:pciutils
Ignore: libgcc:glibc-32bit
Ignore: libstdc++:glibc-32bit
Ignore: susehelp:susehelp_lang,suse_help_viewer
Ignore: cron:smtp_daemon
Ignore: hotplug:syslog
Ignore: pcmcia:syslog
+Ignore: openct:syslog
Ignore: avalon-logkit:servlet
Ignore: jython:servlet
Ignore: ispell:ispell_dictionary,ispell_english_dictionary
%endif
Macros:
-%insserv_prereq insserv sed devs
+%insserv_prereq insserv sed
%fillup_prereq fillup coreutils
%suseconfig_fonts_prereq perl aaa_base
%install_info_prereq info
+Repotype: suse
+
Preinstall: aaa_base acl attr bash db devs diffutils filesystem
Preinstall: fileutils fillup glibc grep libgcc libxcrypt m4 ncurses
Preinstall: pam permissions readline rpm sed sh-utils shadow tar
Preinstall: textutils
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 cracklib db gcc gdbm gettext
Required: glibc libtool ncurses pam perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libxcrypt m4 ncurses pam permissions readline
Preinstall: rpm sed shadow tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 cracklib db gcc gdbm gettext
Required: glibc libtool ncurses pam perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash bzip2 coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libxcrypt m4 ncurses pam permissions popt readline
Preinstall: rpm sed shadow tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 cracklib db gcc gdbm gettext
Required: glibc libtool ncurses perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash bzip2 coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libselinux libxcrypt m4 ncurses pam permissions
Preinstall: popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash bzip2 coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libnscd libselinux libxcrypt m4 ncurses pam
Preinstall: permissions popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash bzip2 coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libnscd libselinux libxcrypt m4 ncurses pam
Preinstall: permissions popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
Preinstall: libgcc libnscd libxcrypt m4 ncurses pam
Preinstall: permissions popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash db devs diffutils filesystem
Preinstall: fileutils fillup glibc grep libgcc libxcrypt m4 ncurses
Preinstall: pam permissions readline rpm sed sh-utils shadow tar
Preinstall: textutils
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 cracklib db gcc gdbm gettext
Required: glibc libtool ncurses pam perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash bzip2 coreutils db devs diffutils
Preinstall: filesystem fillup glibc grep insserv libacl libattr
Preinstall: libgcc libselinux libxcrypt m4 ncurses pam permissions
Preinstall: popt pwdutils readline rpm sed tar zlib
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 db gcc gdbm gettext glibc
Required: libtool ncurses perl rpm zlib
+Repotype: suse
+
Preinstall: aaa_base acl attr bash db devs diffutils filesystem
Preinstall: fileutils fillup glibc grep libgcc libxcrypt m4 ncurses
Preinstall: pam permissions readline rpm sed sh-utils shadow tar
Preinstall: textutils
+Runscripts: aaa_base
+
Required: autoconf automake binutils bzip2 cracklib db gcc gdbm gettext
Required: glibc libtool ncurses pam perl rpm zlib