On Jan 27, 2008 4:48 AM, Xavier <shiningxc@gmail.com> wrote:
I am confused by all the db scripts we have : gensync, updatesync, repo-add, repo-remove. So I had a look a bit at git history. It seems like originally, there were only gensync and updatesync. Then repo-add and repo-remove were created, doing mostly what gensync and updatesync did. But then, gensync and updatesync were rewritten using repo-add and repo-remove. What this done for a compatibility purpose maybe?
Yes. For all intents and purposes, these two tools are/should be deprecated.
What bothers me here is that there is apparently a functionality that is only found in updatesync/gensync, not repo-add : force flag support. Apparently, updatesync need both the PKGBUILD and the package. It reads the PKGBUILD, look if the force option is specified, and then calls repo-add (with --force option if force flag was found) on the package. That sounds rather ugly.
The only solution to this would be to place the FORCE flag into the package metadata so that repo-add can handle the flag without having to read the PKGBUILD. At this point, the force flag is ONLY in the DB and PKGBUILD so there is no way around it.
Why don't we handle this the more usual way? makepkg could add a force line in .PKGINFO if it finds the force option in the PKGBUILD. And then repo-add add the force flag if it finds it in .PKGINFO.
And you said that same thing! That's what I get for responding until reading the full message