Skip to content

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

@Pansanel

Description

@Pansanel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions