encode flags into rpmdb cookie