[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

New `dpkg --print-subarchitecture' option



There are a reasonable number of utilities (update-modules, X
configuration, hwclock) that need to know more than just the processor
architecture that they're running on -- they need the type of hardware
as well (e.g. m68k does this).

For ARM, I wanted to have a centralised location for this information,
and thus propose to add an option to dpkg, `--print-subarchitecture',
which will open /proc/cpuinfo or /proc/hardware (or whatever you need
on your architecture to determine the hardware type) and spit out a
single, canonicalised word representing the hardware type.  On the ARM
architecture, examples of these are `acorn', `acorn26', `netwinder',
`shark', and so on.

I have an example patch which implements this which is included in the
version of this message that was posted to the `debian-dpkg' list.

There are, however, other ways that spring to mind to implement this,
including:

  * make `dpkg-architecture' do the work instead, possibly using its
    shell variable scheme;
  * have a separate shell script / small C program;
  * duplicate the code to calculate this in several different places;
  * rename the dpkg option to something else.

I'm posting this here to try and solicit some comment on what the best
thing to do is -- obviously I'd like the changes I make to be folded
back into the respective packages!

Thanks,

c.




Reply to: