Filtros no synaptic
Fala, pessoal, td bem?
Estou com probleminhas nos filtros do Synaptic, no Ubuntu: criei um
pacote que adiciona um filtro meu. Até aí tudo bem, é só criar/alterar
o arquivo /root/.synaptic/filters
Para facilitar, coloquei um comentário no final da entrada do meu
filtro(copiado abaixo).
Na desintalação do pacote, eu removo a entrada do meu filtro, conforme
script também copiado abaixo.
Só tem um caso que tá me dando problema:
ao criar novos filtros *após* instalar meu pacote, o synaptic remove
meu comentário!! Invalidando o meu script de remoção. :-(
Alguém tem alguma sugestão de melhoria? Pode ser no filtro, ou no script... :)
Obrigada desde já,
Andrea
--- MEU FILTRO ----
filter "AVB Packages" {
section {
inclusive false;
sections {
};
};
status {
flags 0xbf5;
};
pattern {
andMode 1;
patterns {
};
};
priority {
};
reducedview {
enabled false;
};
}; #endoffilter
--- POSTRM -----
#!/bin/bash
#DEBHELPER#
#Just some initial thoughts.
if [ `whoami` != "root" ]; then
echo "You must be root in order to run this script."
echo "Please, type 'sudo - su' and try again."
exit 1
fi
if [ -e /root/.synaptic/filters ];
then
# We just have to remove the "AVB Packages" entry from the file
sed '/filter "AVB Packages"/,/"}; #endoffilter"/c oi'
/root/.synaptic/filters >> /tmp/mynewfilter
mv /tmp/mynewfilter /root/.synaptic/filters
# If the file doesn't exist, there is nothing to do.
fi
Reply to: