Closed jianingy closed 11 years ago
Instead of "uname -m", why not "dpkg --print-architecture". The latter will return the architecture in the "official" debian format, e.g. amd64.
Well, that's my ignorant to debian system :P. I'll try use 'arch' command to get arch string on Redhat/CentOS and 'dpkg --print-architecture' on debian. What do you think about it?
First, I've added a control.template for making debian package.
In addition, I've changed architecture choosing rule. The logic of my patch is that if there is no 'arch' specified in package's index.yaml or system-wide default.yaml it will set self->info->data->{arch} to the architecture of current box using 'uname -m'.
Moreover, though x86_64 debian reports its arch 'x86_64', debian is actually not comfortable with this string. So, I've added some code to replace 'x86_64' with 'amd64' which is debian's flavor.
I've tested this patch on my ubuntu and CentOS 6. it works and it seems not to break other things.
Thanks very much.