[arch-dev-public] Time to go forward with arch=any?

Firmicus Firmicus at gmx.net
Tue Jul 21 18:25:40 EDT 2009

> Added some output to the lock/unlock functions to see if it helps
> illustrate the issue better
> I also fiddled with the cleanup function in db-update a bit, so it
> only calls repo_unlock on an error. Didnt commit the changes, but lets
> see if that helps
I think I fixed it. The thing is that through
    trap cleanup 0
the function cleanup() is called automatically at the end of the script.
And since cleanup in turn calls
    repo_unlock $reponame $current_arch
the latter fails because $current_arch is "x86_64" and we have already
unlocked each repo before the end of the for loop, resulting in a spurious
error message.
Replacing repo_unlock by
    rm -f $TMPDIR/.repolock.$reponame.*
in cleanup() solves this. (It might be actually better to have a function
delete_repolocks() in db-function that does this...)

I have also moved a few lines down within the
    if [ -n "$ANYPKGS" ]; then  <...> fi
construct. Otherwise one would get the message
    ==> Processing 0 new/updated arch-independent packages for
even when no package with arch=any is present in staging

See attached patch...

Gute Nacht,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.archlinux.org/pipermail/arch-dev-public/attachments/20090722/4684d10d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-cleanup-in-db-update.patch
Type: text/x-patch
Size: 1784 bytes
Desc: not available
URL: <http://www.archlinux.org/pipermail/arch-dev-public/attachments/20090722/4684d10d/attachment.bin>

More information about the arch-dev-public mailing list