Roundup Tracker - Issues

Message7365

Author rouilj
Recipients marcus.priesch, rouilj
Date 2021-11-09.22:51:58
Message-id <20211109225155.CBBB76A02DE@pe15.cs.umb.edu>
In-reply-to <c093fec4-798d-57b4-a6c6-df7ce48ad111@priesch.co.at>
In message <c093fec4-798d-57b4-a6c6-df7ce48ad111@priesch.co.at>,
Marcus Priesch writes:
>you are definitely right, we should solve the infinite loop ;)
>
>its happening here:
>
> >          while tail != 'lib' and head != '':
> >              head, tail = os.path.split(head)
>
> >>> get_path("platlib")
>'/home/pr/work/projects/5t-roundup/ve2/lib64/python2.7/site-packages'
>
>it consumes everything (as no "lib" anywhere) and stays at head == "/"

Ah I have the wrong stop condition. Ok that's a good catch.

I wonder if we can do better on the lib check. Would:

  if tail not in [ 'lib', 'lib64' ] and head != '/':

work? I am thinking of a user libby who creates a virtual env under
/home/libby/roundup. Matching ^lib would make a mess of her home
directory.  (Yes, a libby born in 1964 could have username lib64
but....)

Thoughts?
History
Date User Action Args
2021-11-09 22:51:58rouiljsetrecipients: + rouilj, marcus.priesch
2021-11-09 22:51:58rouiljlinkissue2551169 messages
2021-11-09 22:51:58rouiljcreate