On Fri, 04 Jun 2010 11:03:37 +0400 Vasiliy G Tolstov <[email protected]> wrote: > Hello. I need to get all installed packages with their versions like > this: > > sys-libs/timezone-data-2010j > sys-libs/zlib-1.2.5-r1 > > How can i get it?
cave print-ids --matching '*/*::/' will give you the full names of everything you've got installed. Why exactly do you need the data in name-version form, and what should be done for packages where there're multiple identical name-versions of the same thing installed? Adding a --format parameter to print-ids wouldn't be hard if there's a use case. > (stupid way > > /usr/bin/find /var/db/paludis/repositories/installed -type d | sed > 's/\/var\/db\/paludis\/repositories\/installed\///g' | /bin/grep -v > 'virtual/' | /bin/grep '/' > ) Which is utterly wrong, since not all installed packages live there, possibly no installed packages live there, and there can be things in there that don't map to installed packages. > cave show -t package -f '*/*::installed' displays ambiguous output. If you're doing that, use ::/ rather than ::installed, since there can be multiple installed repositories. Also note that you aren't allowed to parse the output of most 'cave' commands, since we change the output arbitrarily. Only the 'cave print-' commands are designed to be machine readable. -- Ciaran McCreesh
signature.asc
Description: PGP signature
_______________________________________________ paludis-user mailing list [email protected] http://lists.pioto.org/mailman/listinfo/paludis-user
