[pacman-dev] [PATCH] query_fileowner: break/continue pkgfile loop
allan at archlinux.org
Sun Jul 15 09:30:16 EDT 2012
On 15/07/12 23:08, Andrew Gregory wrote:
> On Sun, 15 Jul 2012 19:23:22 +1000
> Allan McRae <allan at archlinux.org> wrote:
>> On 08/07/12 05:12, Andrew Gregory wrote:
>>> Break out of pkgfile loop on match or continue if
>>> the pkgfile path is too long.
>> I agree with the continue - it is stupid we check the length and then do
>> nothing when it fails....
>> However, I do not agree with the two breaks. The breaks make the whole
>> "found = 1" redundant. And that is useful for directory ownership
>> querying with a loop using "(!found || isdir)", which all -Qo <dir>
>> patches have used so far.
>> You can either ping a patch with the just continue or let me know and I
>> will make one to push.
> The breaks are for the *file* loop. "found = 1" is for exiting the
> *package* loop. Breaking the file loop is proper when checking
> directory ownership as well. Right now, when pacman finds a match it
> continues checking the rest of the current package's files. In fact,
> the reason I used break for this instead of adding a !found check in
> the file loop is because that wouldn't be as friendly to the directory
> ownership patches.
Ah crap... going for a fast review of all my pending patches and
obviously went too fast. Patch looks fine. Will pull to my working branch.
More information about the pacman-dev