[aur-dev] [PATCH] git-update: Check for missing install and source files

carstene1ns arch at carsten-teibes.de
Mon Jun 1 16:42:21 UTC 2015


Am 31.05.2015 um 20:14 schrieb Daniel Wallace:
> How does this affect stuff like the different humble bundle games in the aur?
> 
> You have to download the source and put it in the source directory so I don't think it will be in the commit tree?
> 
> Thanks 
> 
> Sent from my iPhone
> 
>> On May 31, 2015, at 12:54 PM, Lukas Fleischer <lfleischer at archlinux.org> wrote:
>>
>> Suggested-by: Marcel Korpel <marcel.lists at gmail.com>
>> Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
>> ---
>> scripts/git-integration/git-update.py | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py
>> index 161d42f..0fa1ce2 100755
>> --- a/scripts/git-integration/git-update.py
>> +++ b/scripts/git-integration/git-update.py
>> @@ -235,6 +235,16 @@ for commit in walker:
>>                 die_commit('%s field too long: %s' % (field, pkginfo[field]),
>>                            commit.id)
>>
>> +        if 'install' in pkginfo and not pkginfo['install'] in commit.tree:
>> +            die_commit('missing install file: %s' % (pkginfo['install']),
>> +                       commit.id)
>> +
>> +        for fname in pkginfo['source']:
>> +            if "://" in fname or "lp:" in fname:
>> +                continue
>> +            if not fname in commit.tree:
>> +                die_commit('missing source file: %s' % (fname), commit.id)
>> +
>> srcinfo_raw = repo[repo[sha1_new].tree['.SRCINFO'].id].data.decode()
>> srcinfo_raw = srcinfo_raw.split('\n')
>> srcinfo = aurinfo.ParseAurinfoFromIterable(srcinfo_raw)
>> -- 
>> 2.4.1

Mostly maintainers use pseudo URLs[1] like:
* hib:// or hb:// for the humble bundle stuff
* gog:// or gogdownloader:// for gog.com games
* local:// or file:// for files you need to download yourself
With a custom download agent and a fallback message, this has worked for
quite some time.

Following this scheme, there should be no problem even with this patch.
Maybe we can (mis)use local:// as a general solution, at least for files
where no specific DLAGENT is available.

About the patch: I think changelog[2] files should be checked also, even
if they are not common (anymore). Maybe they will be deprecated soon,
but at least now they are used by 778[3] packages.

best regards,
carstene1ns

[1]: https://paste.xinu.at/2YKm1/ (grep'ed through the aur-mirror, list
not filtered for false positives - for example in description field)
[2]:
https://www.archlinux.org/pacman/PKGBUILD.5.html#_options_and_directives
[3]: https://paste.xinu.at/blblaK/ (grep'ed through the aur-mirror)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20150601/989657fa/attachment.asc>


More information about the aur-dev mailing list