fix package state detection for opkg