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

Check in https://github.com/quattor/scdb/blob/master/utils/yum/yum_snapshot #37

Open
Pansanel opened this issue Apr 1, 2015 · 0 comments

Comments

@Pansanel
Copy link
Contributor

Pansanel commented Apr 1, 2015

The script contains the following command:

rpm_list=$(ls ${src_repo_path}/*.rpm 2>/dev/null)
if [ $? -ne 0 -a ! -d ${src_repo_path}/Packages ]
then
echo "${src_repo_path} doesn't appear to be a YUM repository. Aborting..."
exit 4
fi

which makes that it fails when there is no RPM file at the root of the YUM repo. How to deal the case when they are all in subdirs (i.e., it is the case for the DELL yum repo).

The script works recursively in the repository path. Are this check really needed? If yes, can we replace the ls command by find?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant