not marked as auto-downloadable because $other_file is smaller

Alexandre Detiste alexandre.detiste at gmail.com
Sun Jan 24 10:55:42 UTC 2016


Hi,

fill_gap() should be now smart enough to always pick the smallest possible provider first.

(The "or 0" is needed for the handfull of files without a known size)



  UnrealGoldPatch227i.7z:
    download:
      oldunreal-mirrors:
        path: .
    provides:
      - UnrealGoldPatch227i.exe
    unpack:
      format: 7z

  UnrealGoldPatch227i.zip:
    # not marked as auto-downloadable because the 7z is smaller        <---- XXX
    provides:
      - UnrealGoldPatch227i.exe
    unpack:
      format: zip


http://anonscm.debian.org/cgit/pkg-games/game-data-packager.git/tree/game_data_packager/build.py#n950

    def fill_gap(...):
        ....
        # pick smallest possible provider to download
        # example: this huge archive is a superset of the smaller one
        # 103M /var/www/html/ETQW-client-1.4-1.5-update.x86.run
        # 531M /var/www/html/ETQW-client-1.5-full.x86.run
        if len(providers) > 1:
            sizes = dict()
            for provider_name in providers:
                sizes[provider_name] = self.game.files[provider_name].size or 0
            providers = sorted(sizes, key=sizes.get)


Alexandre





More information about the Pkg-games-devel mailing list