}
} elsif ($l0 eq 'repotype:') { #type of generated repository data
$config->{'repotype'} = [ @l ];
- } elsif ($l0 eq 'type:') { #kind of packaging system (spec, dsc or kiwi)
+ } elsif ($l0 eq 'type:') { #kind of packaging system (spec,dsc,arch,kiwi,...)
$config->{'type'} = $l[0];
+ } elsif ($l0 eq 'binarytype:') { #rpm,deb,arch,...
+ $config->{'binarytype'} = $l[0];
} elsif ($l0 eq 'patterntype:') { #kind of generated patterns in repository
$config->{'patterntype'} = [ @l ];
} elsif ($l0 eq 'release:') {
$config->{'type'} = 'UNDEFINED';
}
}
+ if (!$config->{'binarytype'}) {
+ $config->{'binarytype'} = 'rpm' if $config->{'type'} eq 'spec' || $config->{'type'} eq 'kiwi';
+ $config->{'binarytype'} = 'deb' if $config->{'type'} eq 'dsc';
+ $config->{'binarytype'} = 'arch' if $config->{'type'} eq 'arch';
+ $config->{'binarytype'} ||= 'UNDEFINED';
+ }
# add rawmacros to our macro list
if ($config->{'rawmacros'} ne '') {
for my $rm (split("\n", $config->{'rawmacros'})) {
if ($pp eq $rn) {
# debian: unversioned provides do not match
# kiwi: supports only rpm, so we need to hand it like it
- next if $config->{'type'} eq 'dsc';
+ next if $config->{'binarytype'} eq 'deb';
push @p, $rp;
last;
}
$rr &= 5 unless $pf & 2;
# verscmp for spec and kiwi types
my $vv;
- if ($config->{'type'} eq 'dsc') {
+ if ($config->{'binatytype'} eq 'deb') {
$vv = Build::Deb::verscmp($pv, $rv, 1);
} else {
$vv = Build::Rpm::verscmp($pv, $rv, 1);
die("Usage: gettype --dist <dist> --archpath <archpath> [--configdir <configdir>]\n") if @ARGV;
my $cf = Build::read_config_dist($dist, $archs, $configdir);
-exit 0 unless $cf->{'type'};
-print "$cf->{'type'}\n";
+exit 0 unless $cf->{'binarytype'};
+print "$cf->{'binarytype'}\n";
echo "$GUESSED_DIST" > $BUILD_ROOT/.guessed_dist
test -n "$BUILD_DIST" || BUILD_DIST="$GUESSED_DIST"
- DIST_TYPE=`gettype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"`
- case "$DIST_TYPE" in
- spec) PSUF=rpm ;;
- dsc) PSUF=deb ;;
- arch) PSUF=arch ;;
- *)
+ PSUF=`gettype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"`
+ case "$PSUF" in
+ UNKNOWN|'')
# auto detect from packages
PSUF=rpm
test -L $BUILD_ROOT/.init_b_cache/rpms/dpkg.deb && PSUF=deb