addressed issue 50 (-o does nothing)

Applied patch by Mauro which modified get_source_names() to only attempt
to ls SRCNAME if SRCNAME is not empty so that it doesn't list the entire
cache directory and break get_obsolete_sources(). This was triggered by
django, whose DOWNLOAD was given as
"http://www.djangoproject.com/download/1.2.3/tarball/"

Signed-off-by: slakmagik <slakmagik@gmail.com>
This commit is contained in:
slakmagik 2010-12-02 00:49:34 +00:00
parent f17e5ae404
commit d51de9267c

View file

@ -2752,7 +2752,7 @@ get_source_names() {
# after, rather than grepping. And the conditionals ensure that we # after, rather than grepping. And the conditionals ensure that we
# only return PLACEHOLDER when we don't have any other results and # only return PLACEHOLDER when we don't have any other results and
# PLACEHOLDER is actually called for and set. # PLACEHOLDER is actually called for and set.
if ! ls -A $SRCDIR | grep "^${SRCNAME##*/}"; then if [[ -z $SRCNAME ]] || ! ls -A $SRCDIR | grep "^${SRCNAME##*/}"; then
if [[ $PLACEHOLDER ]]; then if [[ $PLACEHOLDER ]]; then
echo $PLACEHOLDER echo $PLACEHOLDER
fi fi