aaronmgriffin at gmail.com
Wed Nov 12 00:03:44 EST 2008
On Tue, Nov 11, 2008 at 6:13 PM, Chris Brannon <cmbrannon at cox.net> wrote:
> "Aaron Griffin" <aaronmgriffin at gmail.com> writes:
>> is related to the AUR backend daemon (tupkgupdate ?), which is in the
>> AUR repository. A rewrite would be HUGELY appreciated.... the steps
>> are simple: find new packages in upload dir, add to pacman DB, add to
>> mysql DB. It's not all that hard, yet the current daemon runs through
>> ALL packages when it does this, IIRC
> I had a look at the tupkgupdate code. The main source of I/O seems to be
> the following loop:
> a_files = pkgbuildsInTree(pkgbuild_dir)
> for a_file in a_files:
> pkgname, ver, desc, url, depends, sources, category = \
> infoFromPkgbuildFile forks and execs bash to process a PKGBUILD.
> All of the code that deals with binary packages only extracts
> information from filenames, as far as I can tell.
> Would it be reasonable to use timestamps to determine which packages
> have been updated?
Ah, it's all PKGBUILDs, not all packages.
It would make more sense to use the package files first, and then find
the corresponding PKGBUILD, instead of scanning all PKGBUILDs and
checking for the package file.
Still, keeping a "last run" timestamp somewhere, and scanning for all
PKGBUILDs newer than that timestamp should be ok. At least it will
reduce the IO
More information about the aur-dev