projg2 / flaggie

A smart CLI mangler for package.* files
MIT License
48 stars 7 forks source link

Flaggie doesn't understand make.conf as used by gentoo-lto #23

Closed reedriley closed 1 year ago

reedriley commented 4 years ago

Failure stack trace:

❯ sudo flaggie --sort-flags --drop-ineffective --drop-unmatched-pkgs --drop-unmatched-flags
Password:
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/flaggie", line 25, in <module>
    sys.exit(main(sys.argv))
  File "/usr/lib64/python3.6/site-packages/flaggie/cli.py", line 195, in main
    porttree, cache)
  File "/usr/lib64/python3.6/site-packages/flaggie/makeconf.py", line 537, in __init__
    self.parse(mf, path)
  File "/usr/lib64/python3.6/site-packages/flaggie/makeconf.py", line 582, in parse
    self.files[fn] = self.MakeConfFile(fn, path)
  File "/usr/lib64/python3.6/site-packages/flaggie/makeconf.py", line 455, in __init__
    f = codecs.open(path, 'r', 'utf8')
  File "/usr/lib64/python3.6/codecs.py", line 897, in open
    file = builtins.open(filename, mode, buffering)
NotADirectoryError: [Errno 20] Not a directory: '/etc/portage/make.conf/make.conf.lto'

Version:

❯ flaggie --version
flaggie 0.2.1
mgorny commented 4 years ago

make.conf support was removed from master branch and won't return.

elsandosgrande commented 4 years ago

I take it that you are referring to this commit. If the support for make.conf has been removed, why is the file still being parsed?

mgorny commented 4 years ago

You're using an old version.