Browse files

use dpkg --print-architecture to find arch string on debian system

  • Loading branch information...
1 parent c81b577 commit 1fd65739bee46e51021d80cac86e59a05b6057e1 @jianingy jianingy committed Mar 20, 2013
Showing with 8 additions and 8 deletions.
  1. +8 −8 source/lib/Seco/Multipkg.pm
View
16 source/lib/Seco/Multipkg.pm
@@ -803,6 +803,11 @@ sub makepackage {
$self->info->data->{rpmtemprepo} = $self->tmpdir . "/rpm";
+ if ( !$self->info->data->{arch} ) {
+ $self->info->data->{arch} = `arch`;
+ chomp $self->info->data->{arch};
+ }
+
$self->template_file( $self->info->confdir . "/templates/spec.template",
$self->tmpdir . "/spec" );
@@ -970,9 +975,9 @@ sub makepackage {
mkdir $self->installdir . "/DEBIAN"
unless ( -d $self->installdir . "/DEBIAN" );
- # rename x86_64 to debian's amd64
- if ($self->info->data->{arch} eq 'x86_64') {
- $self->info->data->{arch} = 'amd64';
+ if ( !$self->info->data->{arch} ) {
+ $self->info->data->{arch} = `dpkg --print-architecture`;
+ chomp $self->info->data->{arch};
}
$self->template_file( $self->info->confdir . "/templates/control.template",
@@ -1195,11 +1200,6 @@ sub _init {
}
}
- if ( !$finaldata->{arch} ) {
- $finaldata->{arch} = `uname -m`;
- chomp $finaldata->{arch};
- }
-
if ( !$finaldata->{packagetype} ) {
for ( reverse @platforms ) {
$finaldata->{packagetype} ||= 'gem'

0 comments on commit 1fd6573

Please sign in to comment.