Hi,
I'm trying to use the apt-conf format to store some settings for
ia32-apt-get. For example the architecture ia32-apt-get should fetch
packages from. Currently the file only contains
IA32::Architectures {"amd64"; "i386";};
% apt-config -c ia32-libs-tools/00ia32-libs-tools dump | grep IA32
IA32 "";
IA32::Architectures "";
IA32::Architectures:: "amd64";
IA32::Architectures:: "i386";
% apt-config -c ia32-libs-tools/00ia32-libs-tools shell FOO IA32::Architectures
FOO=''
% apt-config -c ia32-libs-tools/00ia32-libs-tools shell FOO IA32::Architectures::
There seems to be no option in shell mode to extract the Architectures
values. I can't think of a way how to do it without involving bashism
for arrays or get problems with whitespaces so this might not actually
be fixable. But then it should be documented in the manpage on how to
extract the values via "dump", e.g:
for i in $(apt-config -c ia32-libs-tools/00ia32-libs-tools dump \
| grep "^IA32::Architectures:: " \
| sed 's/^[^ ]* \(.*\);$/\1/'); do
echo "Got arch '$(eval echo $i)'"
done
MfG
Goswin