xenserver/planex

Rewrite overridden source lines in generated spec file

euanh opened this issue · 0 comments

euanh commented

When a source defined in the spec file is overridden by a source defined in a link, we currently search all resources for a file with the same basename as the source link in the original spec. This means that we can't override the name of the source - the linked source must have exactly the same name as the original.

Instead, we should rewrite the source line in the generated spec file which ends up in the SRPM. We already rewrite this file to insert patchqueue series files, so this would not be a major change.

One feature of the current behaviour is that the original source URL remains in the SRPM. This could be an advantage when the original source points to a public repository but the link caused the source actually to be fetched from a private mirror - the generated SRPM still refers to the canonical public source. There are various ways in which we could handle this - the simplest might be just to write in the basename for rewritten URLs and avoid the problem entirely.