[pacman-dev] [PATCH 2/2] libalpm: Add accessors for the base field

Johannes Löthberg johannes at kyriasis.com
Mon Dec 22 13:09:58 UTC 2014


On 22/12, Allan McRae wrote:
>On 21/12/14 02:25, Johannes Löthberg wrote:
>> This commit adds the necessary accessor functions to get the PKGBASE of
>> a package, forcing the desc file to be parsed.
>>
>> Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
>> ---
>>  lib/libalpm/alpm.h     | 6 ++++++
>>  lib/libalpm/be_local.c | 7 +++++++
>>  lib/libalpm/package.c  | 9 +++++++++
>>  lib/libalpm/package.h  | 1 +
>>  4 files changed, 23 insertions(+)
>
>Are we expecting a third patch to actually do something with this?
>Maybe something like:
>
>$ pacman -Si gcc-libs
>Repository     : core
>Name           : gcc-libs (gcc)
>Version        : 4.9.2-1
>

Not right now, but that would be useful sometimes too, either in parens 
or as a separate line in -Sii maybe.

>>
>> diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
>> index e6ef3ae..91b9461 100644
>> --- a/lib/libalpm/alpm.h
>> +++ b/lib/libalpm/alpm.h
>> @@ -1101,6 +1101,12 @@ int alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg);
>>   */
>>  const char *alpm_pkg_get_filename(alpm_pkg_t *pkg);
>>
>> +/** Returns the package base name.
>> + * @param pkg a pointer to package
>> + * @return a reference to an internal string
>> + */
>> +const char *alpm_pkg_get_base(alpm_pkg_t *pkg);
>> +
>
>OK - see my new rule about adding this change to README.  Give that was
>posted after you submitted this, I can handle it.
>

Should I add another header from 4.2→4.3 in that case?

-- 
Sincerely,
  Johannes Löthberg
  PGP Key ID: 0x50FB9B273A9D0BB5
  https://theos.kyriasis.com/~kyrias/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 1495 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20141222/0b3bd946/attachment.bin>


More information about the pacman-dev mailing list