18 June 2007

dcmd

4:30am and I can't sleep... which in a way is good since it gave me some time to think about the script I posted yesterday and how it could be generalized into a simpler and far more powerful dcmd script which just expands any .dsc/.changes argument found in the command line:

elegiac$ dcmd scp -C /tmp/1/dasher_4.4.2-1.dsc romain@yeast:/tmp
dasher_4.4.2.orig.tar.gz 100% 8728KB 4.3MB/s 00:02
dasher_4.4.2-1.diff.gz 100% 5231 5.1KB/s 00:00
dasher_4.4.2-1.dsc 100% 1259 1.2KB/s 00:00
elegiac$
Its only limitation is that the .dsc/.changes must be local in order for Python to parse it.
elegiac$ dcmd sha1sum dasher_4.4.2-2_amd64.changes                                                   
87cd6eb29d5f54c1547b2bf7531a0e303dbc2fa3 dasher_4.4.2-2.dsc
70d0729c8955309efa230832cf5e82bd5e28cf7c dasher_4.4.2-2.diff.gz
a5c15d3e6c3b297897651e9a5aa40451c73b2420 dasher-data_4.4.2-2_all.deb
68383058289fb41cdf19d57225afafafd4032719 dasher_4.4.2-2_amd64.deb
481e2008ad78be0721335634954dbe3a0439914b dasher_4.4.2-2_amd64.changes
elegiac$
Sound useful?

PS: Christoph, I know that dput supports scp and rsync, but it requires a host definition in ~/.dput.cf, and works only on .changes files.

2 comments:

lool said...

I would love using such a script!

Romain Francoise said...

lool: Hmm, in case it wasn't obvious the script can be downloaded here, so you can use it today. ;)