I admit that you are correct when you say Genealogy of Jesus. But there is still the issue of the bloodline.
Even in the example, Ishmail does not gain Isaac's inheritance due to the fact that the promise is made to both Abraham and Sarah. So, yes, you can call Ishmail the son of Sarah, but Ishmail is not of Sarah's bloodline. Hence there is a distinction and the issue of inheritance is followed along this distinction.
Well more to the point, Ishmael didn't receive the inheritance because after Isaac was born, Sarah saw to it that Hagar and Ishmael were banished. This is why the Muslims/Arabs and the Jews have been at each other's throats ever since. The Muslims argue that Ishmael was to inherit because he was the legal and cultural son of Abraham and Sarah. The Jews argue that Isaac was to inherit because Sarah gave birth to him. They are both right and hence the dilemma.
Likewise is with the Prophecy of the Messiah. It says that the messiah will be of the bloodline of David.(David relation to Abraham we can consider known and thus redundant in repeating). Hence any blood son of Joseph would work. However, any adopted son does not.
I understand, but that's not how the ancients looked at it. Adopted children were considered blood. Consider Dave and Tom that lived in antiquity. Dave was married to Debbie and Dave dies without giving her children. It becomes Tom's responsibility to give her a son, BUT that son is considered Dave's son and not Tom's. They didn't distinguish the way we do today. Jesus would have been considered Joseph's son, blood and all, because because Mary gave birth to him while married to Joseph. The only time that didn't happen is if you were charging your wife with adultery . Depending on the era that would result in a divorce, her death, the unborn child's death, or death of both the woman and the unborn child.
Also note, the Jewish prophecies also states the Messiah will be of man. If I am to follow this concept literally, then either I have to reject Jesus as the messiah(as claimed through his birth through the Holy Spirit), assume he is of David's bloodline through Mary(again, making the Genealogy of Joseph pointless) or assume later authors of these books intentionally rewritten how Jesus was conceived in order to make Jesus divine--which clearly undermines the credibility of the authors themselves.
Yes, I would agree, but I don't think it undermines their credibility. The authors were reading from the Septuagint which had simply mistranslated the prophecy given to Ahaz due to linguistic problems between the Hebrew and Greek languages. This is the problem of translation so often referred to between the Hebrew world 'almah' and the Greek word 'parthenos' as well as problems involving Hebrew tenses. So it doesn't undermine their credibility because what they were reading in Greek had a different meaning than when read in Hebrew, the language in which it was written. In other words, they were not knowingly lying, they simply knew no better