On Wed, 3 Sep 2014 10:25:39 +0200 Baptiste Daroussin <[email protected]> wrote: > On of the most borring thing IMHO in the plist maintainance is all the > directories. > > I have been working on some evolutions I want to share and discuss before > making them official. > > First you have to know that since pkg 1.3 @dirrm and @dirrmtry are > equivalent. > > Evolutions: > 1/ stop prepending directories in plist with @dir*: let pkg discover > the path correspond to a directory and handle it as such (easy)
Good. > 2/ make pkg automatically remove directories under PREFIX without the > need of adding them in plist, such as only empty directories and > directories not under PREFIX will have to be listed. Of course pkg will > not try to remove directories owned by another package. > > To achieve the point 2 that will mean we will stop using the mtree > inside packages and create a "hier" package that will have the default > hierarchy and every package but pkg will depend on this hier package > (except if PREFIX != LOCALBASE) I think you can avoid the hier package and thus the PREFIX != LOCALBASE problem. Assume there are no packages with empty directories, then pkg can always remove empty directories when deinstalling a package, because no files in the directory means no package requires it. You don't need a hier package in this case. You can add support for packages with empty directories in two ways: - Put a dummy file in the directory, e.g. .PKGNAME.keepme (simple to implement, but maybe some packages really need the directory to be empty or maybe they only expect a specific type of files) - Record something like .PKGNAME.keepme in the pkg db but don't actually create that file. _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[email protected]"
