#138 Fix good_dirs validation

closed-out-of-date
Max Horn
None
5
2011-10-03
2008-05-23
Thomas Kho
No

I asked to get %p/Library/Frameworks/ into the list of good_dirs in Validation.pm. Unfortunately, the current code doesn't allow the parent %p/Library/ to exist in the .deb.

This patch does two things:

* fixes a bug where the directories populated in good_dirs don't terminate in a slash (/). This allows paths like /sw/binaries (matches /sw/bin) to validate correctly.

* fixes the check for allowed files in the .deb to allow parent directories of any directories specified in good_dirs. So, for %p/Library/Frameworks, it now allows %p/Library/ but not, for example, %p/Library/blah.

Also attached is a small test script to validate the change with a handful of test cases.

Discussion

  • Thomas Kho
    Thomas Kho
    2008-05-23

    patch to fix good_dirs validation

     
  • Thomas Kho
    Thomas Kho
    2008-05-23

    short perl script to test change in matching logic

     
    Attachments
  • Thomas Kho
    Thomas Kho
    2008-05-23

    Logged In: YES
    user_id=151387
    Originator: YES

    File Added: test-validation.pl

     
  • Max Horn
    Max Horn
    2011-10-03

    • assigned_to: nobody --> fingolfin
    • status: open --> closed-out-of-date
     
  • Max Horn
    Max Horn
    2011-10-03

    Thank you for your contribution, and sorry for it being ignored for so long ... :-(

    In the meantime (*cough* this patch is only 3 years old, after all... ;)), drm added another solution for the /Library issue.

    But I used your patch here as inspiration for some further cleanup / improvements of the good_dirs / bad_dirs code, see

    <https://github.com/fingolfin/fink/compare/git-cleanup...fix-good_dirs-validation>

    <https://github.com/fingolfin/fink/tree/fix-good_dirs-validation>