Detect package source type