#6419: Unnecessary generation of epel-release-latest-* symlinks
-----------------------------+------------------------
Reporter: tibbs | Owner: rel-eng@…
Type: task | Status: new
Milestone: Fedora 24 Alpha | Component: koji
Keywords: | Blocked By:
Blocking: |
-----------------------------+------------------------
There are a couple of errors in fedora-epel-push which cause the /pub/epel
/epel-release-latest-* symlinks to be regenerated each time the script
runs even though the script tries to avoid doing this.
First, DEST is defined with a trailing directory separator, which means
some strings have a doubled slash. This isn't a problem except when you
want to compare those strings against what's on the filesystem.
It appears that each use of $DEST is followed by a trailing slash, so it
should be safe to remove it from the definition.
Secondly, the comparison on line 101 never succeeds. Relative links are
explicitly created, and so the readlink call returns a relative path, but
CANDIDATE is a full path. Also, candidate has a doubled slash in it due
to the first issue.
You can't just use -ef to compare the two paths, because that will never
match unless the current directory happens to be $DEST.
Solutions:
Remove trailing slash from $DEST definition and use readlink -e to get the
link as a full path.
pushd to $DEST before making any comparisons.
I will attach a patch for each option.
--
Ticket URL: <
https://fedorahosted.org/rel-eng/ticket/6419>
Fedora Release Engineering <
http://fedorahosted.org/rel-eng>
Release Engineering for the Fedora Project