Hi!
Numerous Golang packages are plagued with an issue caused when jchaloup uploaded Glide
files. In a lot of case he has doubled the glide.yaml instead of adding the qlide.lock:
Source1: glide.yaml
Source2: glide.yaml
The problem is that when goinstall doesn't find the glide.lock file:
%goinstall glide.lock glide.yaml
it creates a folder instead.
Now when we try to fix the problem by re-adding the glide.lock file to the Sources, we are
asking RPM to replace a folder by a file at update time, which it refuses to do so to
avoid losing data the user might have placed there.
We get errors like:
Error: Transaction check error:
file /usr/share/gocode/src/github.com/mitchellh/go-homedir/glide.lock from install of
golang-github-mitchellh-go-homedir-devel-1.1.0-1.fc29.noarch conflicts with file from
package golang-github-mitchellh-go-homedir-devel-0-0.10.20180708gitdf55a15.fc29.noarch
This is a PITA. the only workaround it to add a %pretrans lua macro to deal with the
mess.
# Remove in F33
# Remove erroneous glide.lock folder
%pretrans devel -p <lua>
path = "%{gopath}/src/%{goipath}/glide.lock"
st = posix.stat(path)
if st and st.type == "directory" then
os.remove(path)
end
See
https://fedoraproject.org/wiki/Packaging:Directory_Replacement#Scriptlet_...
I have no idea how many packages are affected. But it's more work on our already full
plates.
Best regards,
Robert-André