Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigate Name clash on extract / fix cache handling #327

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

e4t
Copy link
Contributor

@e4t e4t commented Sep 7, 2019

These patches resolve two separate issues:

  1. The service creates an SCM directory with the same name as the package. If the package contains a file in its top directory with this name - which is not unlikely - it cannot be extracted.
    The new name of the package is stored in the obsinfo data. For backward compatibility the code falls back to the old behavior if this entry doesn't exist.
    This addresses the issue pointed out in the comment to commit: 9f923f8
  2. Using a cache directory with service 'tar' fails as the code assumes there is a url which does not exist here.

e4t added 3 commits September 7, 2019 23:06
A package may contain a file with the same name as the package.
In this case, this file cannot be extracted, as the repository
directory is already there.
Append '_service' to the name of the directory to clone to to
avoid this trap.
Save the name of this directory for later use in obsinfo.
Make sure to remain backward compatible: retain the old behavior
if scmdir is not set in obsinfo.

Signed-off-by: Egbert Eich <[email protected]>
If a cache directory is used, the 'tar' service fails as the URL hash
cannot be determined.
Check for this and don't use the URL hash.

Signed-off-by: Egbert Eich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant