the ostype is determined by the package management tools being used, eg. dpkg for debian, rpm for opensuse etc.
But there are package converting tools like alien that exist, in which case there might be two package manage tools co-existing in the system, eg. dpkg and rpm can both exist.
In my case, I'm using openSUSE, which uses rpm, but I have installed alien, so dpkg also exist in my system. But in the determineos function, dpkg is checked first, so the ostype of mine is incorrected detected as deb-based.
Not sure how this case can be elegantly avoided so far, but I think we should be aware of this special situation.