From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 18 Dec 2009 02:40:01 +0300 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20091217234001.GP9864@altlinux.org> Mail-Followup-To: devel@lists.altlinux.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QVgWX4+QEldMe/r9" Content-Disposition: inline Subject: [devel] apt-0.5.15lorg2-alt31 installable.lua X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 23:40:06 -0000 Archived-At: List-Archive: List-Post: --QVgWX4+QEldMe/r9 Content-Type: multipart/mixed; boundary="1LW0Rr0Uq98qh6Rv" Content-Disposition: inline --1LW0Rr0Uq98qh6Rv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline apt-0.5.15lorg2-alt31 provides better possibilities for e.g. checking if every single package in the repo can be installed on top of basesystem. $ hsh --init --no-stuff --pkg-build-list=basesystem ... $ time ./build/aptbox/apt-get -qq --dry-run script ./installable.lua cannot install: libsundance-devel cannot install: branding-altlinux-workbench-kde3-settings cannot install: libtrilinos-new_package-devel-static cannot install: libsundance-devel-static cannot install: libtrilinos-devel cannot install: kile cannot install: libtrilinos-devel-static ./build/aptbox/apt-get -qq --dry-run script ./installable.lua 317.24s user 1.54s system 97% cpu 5:26.02 total $ This check should ultimately replace our check for unmet dependencies in girar-builder. Especially if I manage to make it even faster. --1LW0Rr0Uq98qh6Rv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="installable.lua" markinstall("basesystem") savestate() for _,pkg in ipairs(pkglist()) do verlist = pkgverlist(pkg) vercur = pkgvercur(pkg) installed = false nver = 0 for _,ver in ipairs(verlist) do if ver == vercur then installed = true end nver = nver + 1 end if not installed and nver > 0 then markinstall(pkg) if statinstbroken(pkg) then print("cannot install: " .. pkgname(pkg)) end restorestate() end end os.exit(0) --1LW0Rr0Uq98qh6Rv-- --QVgWX4+QEldMe/r9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAksqwVEACgkQfBKgtDjnu0a0nACgy/m5Ji/YiGOTcaUI/QqB7E3A oVMAoK+UmXiBeo60koEAyPQ2Jcte+se4 =P8mt -----END PGP SIGNATURE----- --QVgWX4+QEldMe/r9--