Bernhard R. Link wrote: > * Max Bowsher <m...@f2s.com> [090801 17:32]: >> The --keepunreferencedfiles option is most useful in the conf/options >> file to set policy for a repository to not remove files at time of >> obsoletion. >> >> However, if you put it in conf/options, you then cannot use "reprepro >> deleteunreferenced" at all, as reprepro complains: >> >> Calling deleteunreferenced with --keepunreferencedfiles does not >> really make sense, does it? >> >> Whilst I agree calling "reprepro --keepunreferencedfiles >> deleteunreferenced" is nonsense, calling "reprepro deleteunreferenced" >> with keepunreferencedfiles in conf/options is quite reasonable. >> >> I would like to suggest simply removing the "does not make sense" check >> to allow this to work, and not bothering with any special handling of >> the edge case of "reprepro --keepunreferencedfiles deleteunreferenced" >> on the command line, since it's such a nonsensical command to give. > > I consider deleteunreferenced a normal maintaince command that should > not break things. If someone does not want things deleted at all, > having that command delete things is therefor a bit problematic in my > eyes. (And I do not want to check if allowing this to be run with > keepunreferenced causes any funny effects in the general code). > > I've changed the error message to suggest running with > '--nokeepunreferencedfiles' in case one really want to delete things. > > Is that an acceptable compromise for you?
My desired configuration is that unreferenced files are deleted when this is explicitly asked for, but are not deleted implicitly when they become unreferenced as a result of including a new version into the archive. Having to type "reprepro --nokeepunreferencedfiles deleteunreferenced" to trigger the explicit deletion rather than the more concise "reprepro deleteunreferenced" is a bit of a UI wart, but a minor one that I can live with. In an ideal world, "reprepro deleteunreferenced" would error if --keepunrefererencedfiles was used with it on the command line, but ignore the setting if it came from the conf/options file. However, I expect that would require making the configuration code a lot more complex just for this one edge case, so it's probably not practical. Max.
signature.asc
Description: OpenPGP digital signature