# Glueing local systems over union of compact Riemann surfaces

Let $$X,Y$$ be two connected, non-singular compact Riemann surfaces such that $$X$$ intersects $$Y$$ transversely at two distinct points. Let $$L$$ be a $$\mathbb{C}$$-local system on $$X$$. Let $$L'$$ be the trivial local system on $$Y$$. Suppose that the fibers of $$L$$ and $$L'$$ are isomorphic. Does there exist a local system $$L''$$ on $$X \cup Y$$ such that its restriction to $$X$$ (resp. $$Y$$) is $$L$$ (resp. $$L'$$)?

Intuitively, I would think this is not always true i.e., there should be some restriction on $$L$$. This is roughly because (due to Riemann-Hilbert correspondence) local systems are in 1-1 correspondence with representations of the fundamental group. Since fundamental group is a topological invariant (in the curve case depending only on the genus) and the arithmetic genus of $$X$$ is different from that of $$X \cup Y$$, the space of local systems on $$X \cup Y$$ should vary from that on $$X$$. This should give rise to extra conditions on $$X$$.

However, I do not understand why the kernel of the following morphism should not always be a local system: $$L \oplus L' \to \mathbb{C}^r_{X \cap Y}$$ for $$L_{X \cap Y} \cong \mathbb{C}^r_{X \cap Y} \cong L'_{X \cap Y}$$ and the morphism is given by a choice of identification of the fibers of $$L$$ and $$L'$$ at the points $$X \cap Y$$. Here $$\mathbb{C}^r_{X \cap Y}$$ denotes the skyscraper sheaf supported at $$X \cap Y$$ with fibers $$\mathbb{C}^r$$.