trespect defined architectures in amprolla_init - amprolla - devuan's apt repo merger
 (HTM) git clone git://parazyd.org/amprolla.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bc9fc0927f2f256f2902fa06a7f8095b09be32e3
 (DIR) parent f46479d83e4ef4fdf4a050b281755a6908151f14
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Thu, 29 Jun 2017 14:40:59 +0200
       
       respect defined architectures in amprolla_init
       
       Diffstat:
         M TODO.md                             |       1 -
         M amprolla_init.py                    |       9 ++++++---
       
       2 files changed, 6 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/TODO.md b/TODO.md
       t@@ -1,7 +1,6 @@
        amprolla TODO
        =============
        
       -* Fix amprolla_init.py to honor defined architectures
        * Import devuan/debian keyrings as git submodules and make a script to
          verify them via a keyserver
        * Make obsolete package logging aware of the suite they're in (HELP NEEDED)
 (DIR) diff --git a/amprolla_init.py b/amprolla_init.py
       t@@ -10,7 +10,8 @@ from os.path import join
        from multiprocessing import Pool
        from time import time
        
       -from lib.config import aliases, cpunm, mainrepofiles, repos, spooldir, suites
       +from lib.config import (aliases, arches, cpunm, mainrepofiles, repos, spooldir,
       +                        suites)
        from lib.net import download
        from lib.parse import parse_release
        
       t@@ -72,8 +73,10 @@ def main():
                    tpl = []
                    for k in release_contents:
                        # if k.endswith('/binary-armhf/Packages.gz'):
       -                urls = (join(url[0], k), join(url[1], k))
       -                tpl.append(urls)
       +                for a in arches:
       +                    if a in k:
       +                        urls = (join(url[0], k), join(url[1], k))
       +                        tpl.append(urls)
                    dlpool = Pool(cpunm)
                    dlpool.map(download, tpl)
                    dlpool.close()