[pacman-dev] [PATCH] Removed multiple definitions of pkgfrom_t

Diogo Sousa diogogsousa at gmail.com
Sun Aug 28 21:19:50 EDT 2011


On 08/29/2011 02:06 AM, Dave Reisner wrote:
> On Sun, Aug 28, 2011 at 08:02:39PM -0500, Dan McGee wrote:
>> On Sat, Aug 27, 2011 at 12:25 AM, Diogo Sousa <diogogsousa at gmail.com> wrote:
>>> libalpm now exports type alpm_pkgfrom_t in alpm.h, which may be
>>> used by frontends.
>>> Pacman now uses alpm_pkgfrom_t instead
>>> of replicating that type (pkg_from as was in
>>> src/pacman/package.h)
>> This is a bit nitpicky, but what's up with your line wrapping here?
>> Either make this all one paragraph, or put a blank line between them
>> and wrap around 76 characters consistently, please.
>>
>>> Signed-off-by: Diogo Sousa <diogogsousa at gmail.com>
>>> ---
>>>  lib/libalpm/alpm.h    |    6 ++++++
>>>  lib/libalpm/package.h |    6 ------
>>>  src/pacman/package.c  |    2 +-
>>>  src/pacman/package.h  |    9 +--------
>>>  4 files changed, 8 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
>>> index fc8f0bc..b1e9a88 100644
>>> --- a/lib/libalpm/alpm.h
>>> +++ b/lib/libalpm/alpm.h
>>> @@ -197,6 +197,12 @@ typedef struct _alpm_file_t {
>>>        mode_t mode;
>>>  } alpm_file_t;
>>>
>>> +typedef enum _alpm_pkgfrom_t {
>>> +       PKG_FROM_FILE = 1,
>>> +       PKG_FROM_LOCALDB,
>>> +       PKG_FROM_SYNCDB
>>> +} alpm_pkgfrom_t;
>>> +
>> Good to move this. However, I have no idea whatsoever provoked you to
>> put it in the middle of a bunch of structs, not to mention two structs
>> that don't even use the enum! This should probably go right underneath
>> the pkgreason enum definition.
> 
> seconding, this.
> 
>> Otherwise looks good- resubmit with these changes and I'll commit it.
>>
>> -Dan
>>
> 
> Please make sure to update the README to account for the API addition.
> We've already got a section for added enums that you can add this to.
> 
> dave
> 

Will do,

Thanks



More information about the pacman-dev mailing list