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

gam-install.sh - Linux/MacOS directory builds accumulating old dist-info files #1732

Open
taers232c opened this issue Dec 23, 2024 · 4 comments
Assignees
Labels

Comments

@taers232c
Copy link
Contributor

taers232c commented Dec 23, 2024

When updating an existing gam7 installation, the tar extraction updates files in the lib subdirectory getting the latest dist-info files but leaves old versions of dest-info files in the directory.

mkdir -p "$target_dir"

echo_yellow "Extracting archive to $target_dir"
if [[ "$name" =~ tar.xz|tar.gz|tar ]]; then
  tar $strip_gam -xf "$temp_archive_dir"/"$name" -C "$target_dir"
elif [[ "$name" == *.zip ]]; then
  unzip -o "${temp_archive_dir}/${name}" -d "${target_dir}"
else
  echo "I don't know what to do with files like ${name}. Giving up."
  exit 1
fi

Adding this rm -fr "$target_dir/gam7/lib/*" after the mkdir -p "$target_dir" will empty the lib subdirectory and old dist-info files will not accumulate.

@jay0lee
Copy link
Member

jay0lee commented Dec 23, 2024

This is in gam-install.sh, right?

@jay0lee
Copy link
Member

jay0lee commented Dec 23, 2024

Does GAM throw an error due to the old files or is it just that we shouldn't leave old files around?

@taers232c
Copy link
Contributor Author

taers232c commented Dec 23, 2024 via email

@jay0lee
Copy link
Member

jay0lee commented Dec 23, 2024 via email

taers232c added a commit that referenced this issue Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants