- if ((mask & PFM_MD5SUM) && is_field("MD5sum:", line))
- pkg_set_string(pkg, PKG_MD5SUM, line + strlen("MD5sum") + 1);
- /* The old opkg wrote out status files with the wrong
- * case for MD5sum, let's parse it either way */
- else if ((mask & PFM_MD5SUM) && is_field("MD5Sum:", line))
- pkg_set_string(pkg, PKG_MD5SUM, line + strlen("MD5Sum") + 1);
+ if ((mask & PFM_MD5SUM) && (is_field("MD5sum:", line) || is_field("MD5Sum:", line)))
+ pkg_set_md5(pkg, line + strlen("MD5sum") + 1);