RPM Community Forums

Mailing List Message of <rpm-devel>

Re: RPM 5.3 pre-alpha snapshot

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 28 Dec 2009 - 22:37:18 CET
Message-id: <135E82C7-8049-4CA8-AFBA-1C42E3717F32@mac.com>

On Dec 28, 2009, at 12:48 PM, Jeff Johnson wrote:
> 
> This snapshot is most of the "database ACID" first phase of TPPM.
> 
> What I most needed to see was the coverage of development over the
> last year. This link has LCOV/GCOV reports for current "make check"
> coverage
> 	http://jbj.org/files/rpm/rpm-5.3/lcov/
> 

I should start describing some of the "features" I expect in rpm-5.3 ...

Embedded JavaScript, while peripheral to TPPM, is getting rather complete.

E.g, here's "rpm -qa" done as a standalone JS script:
	cat << EOF >> /tmp/qa.js
	var ts = new Ts();
	for (var [xxx,h] in Iterator(new Mi(ts)))
	    print(h.NVRA);
	EOF
	/usr/lib/rpm/bin/tjs /tmp/qa.js

Here's another example, printing all package(s) that start with "a":
	cat << EOF >> /tmp/q.js
	var ts = new Ts();
	for (var [xxx,h] in Iterator(new Mi(ts), "nvra", "^a.*"))
	    print(h.NVRA);
	EOF
	/usr/lib/rpm/bin/tjs /tmp/q.js

(aside)
The above won't work with embedded JS syntax like "rpm -E %{js:...}" because
the JS interpreter in -lrpmio doesn't know how to load RPM JS modules in
js/*. But that won't be hard to fix if/when the time comes.

Hint: The %{perl:...} and %{python:...} embeddings, unlike JS, *DO* load RPM
specific bindings. So ether of the above toy scripts could be done in perl/python
quite easily.

hth

73 de Jeff
Received on Mon Dec 28 22:37:37 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.