On Sun, Oct 25, 2009 at 12:13 PM, Allan McRae <[email protected]> wrote:
> Laszlo Papp wrote: > >> On Sun, Oct 25, 2009 at 11:58 AM, Allan McRae <[email protected]> >> wrote: >> >> >> >>> Laszlo Papp wrote: >>> >>> >>> >>>> * The alpm_rmrf function is available from the api, which does the >>>> same as this function did, with a small sanity check. >>>> >>>> * It was worth to establish alpm_rmrf for _alpm_rmrf for pacman frontend >>>> as a wrapper to be able to use it in the future or for other frontend, >>>> so >>>> the >>>> function declaration was deleted in the frontend, and the new alpm_rmrf >>>> wrapper function was established for future usage with SYMEXPORT >>>> modifier. >>>> >>>> Signed-off-by: Laszlo Papp <[email protected]> >>>> --- >>>> >>>> What about this approach ? >>>> >>>> >>>> >>>> >>> What is different and how does this address the comments Xavier and Dan >>> made earlier? >>> >>> Allan >>> >>> >>> >>> >> Allan, as you see this is another approach for avoiding the unneccesary >> function definitition duplication between the library and the frontend. >> Tt's >> not exactly the continue of the previous theory. >> >> That's what I tried to do it, just making a wrapper and 'visible' function >> for the frontend to avoid the unneccesary duplication in the codebase, >> using >> the existing, working internal _alpm_rmrf function, without introducing a >> new insecure function or something. I can't mention easier solution for it >> to avoid the unneccesary replicating, maybe you've got better idea. >> >> > > But Dan and Xavier both pointed out that exposing this function publicly > was not a good idea. You seem to have just exposed it in a different way. > > Allan > > > > Hm, you're the pacman developers :) I can't mention better idea to avoid the duplication then, because I think it's a typical common used function by frontends, so it's not a frontend specific function for pacman-frontend only. (e.g. mkdir -p like _alpm_makepath_mode too) I don't understand Xavier's sentence: "alpm is not a general system utility." Just see _alpm_makepath_mode or similar functions. (mkdir -p). Isn't this a system utility like function ? And I've never said it's a general system utility. Otherwise Dan's right maybe, if there is such an issued function. Best Regards, Laszlo Papp
