Search Results: "Jose Parrella"

3 June 2006

Jos Parrella: On BTS s merge action

Yesterday I was making some operations on the BTS Control Server and found some nice behaviours that I already reported to owner, and Don answered right the way. If you use reportbug to make an ITP (because, err, you want to) it will say that your mail should be cc’ed to debian-devel, per Policy. It will also cc the report to your address. So yesterday I made an ITP and the mail went out with the following headers:
From: Jose Parrella <joseparrella cantv.net>
...
X-Debbugs-Cc: <debian-devel lists.debian.org>
Everything ok. When it arrived to the BTS, a new header appeared:
Resent-CC: <debian-devel lists.debian.org>,
<wnpp debian.org>, jose parrella <joseparrella cantv.net>
Notice my lowered-case name. I didn’t notice this, and I was merging bugs later, but the merge operation failed because of a case-sensitive mismatch between “Jose Parrella” and “jose parrella”. So there’s an incongruence in what happens when it tries to get the owner from the pseudo headers and when you try to set it through Control Bugs. At least if you use reportbug, be careful if your name is being lc’ed since merges will fail.

30 March 2006

Jos Parrella: auto-eject-cdrom 0.3

Today my boss asked me for a method to clearly umount and afterwards eject a CDROM media on the event of trying to eject the tray using the drive button. I googled around a bit and found auto-eject-cdrom, in the public domain, and originally written by Jens Axboe, from SuSe, and Peter Willis, in 2001 and 2005 respectively. The problem with this little application is that it was unable to eject both my boss drive and mine. It did umount the filesystem but did not eject the tray. So I dig into the code and found that it used plain, old cdrom events, handled by the cdrom kernel module. The event was, in fact, defined in <linux/cdrom.h> as:
#define CDROMEJECT 0×5309 /* Ejects the cdrom media */ I found out that using system (”eject”); as my quick and dirty solution after the umount was working ok, but I was losing performance because eject is used for ejecting floppy disks, tapes and several other media. In fact, eject can figure out which media is he working with so he selects the proper method of ejecting, but I was bitten by the curiosity. So I implemented both the cdrom commands and the SCSI commands for ejecting the tray, in two functions, copypasted from the eject.c, previously apt-get source‘ed and I’m putting this interesting piece of code to the public domain (most likely it should go with a GPL license, since I used GPL’ed code on it) here: auto-eject-cdrom v0.3. A relevant and important piece of code goes now:
        /* Here I use two different methods for ejecting the CDROM. This is for fun only,
           since I could use system(\"eject\"); but this is the dirty hack. Here I use the only
           two CDROM-related eject functions from the eject.c file of the eject program
           by Jeff Tranter (tranter@pobox.com) - Note by Jose Parrella  */
Installing is just a matter of compiling and copying to /usr/local/sbin and running it as auto-eject-cdrom &. I hope it’s useful for those of you who can not afford to use one of the keys of your keyboard to assign the eject command to it. Enjoy!

1 February 2006

Jos Parrella: auto-eject-cdrom 0.3

Today my boss asked me for a method to clearly umount and afterwards eject a CDROM media on the event of trying to eject the tray using the drive button. I googled around a bit and found auto-eject-cdrom, in the public domain, and originally written by Jens Axboe, from SuSe, and Peter Willis, in 2001 and 2005 respectively. The problem with this little application is that it was unable to eject both my boss drive and mine. It did umount the filesystem but did not eject the tray. So I dig into the code and found that it used plain, old cdrom events, handled by the cdrom kernel module. The event was, in fact, defined in <linux/cdrom.h> as:
#define CDROMEJECT 0×5309 /* Ejects the cdrom media */ I found out that using system (”eject”); as my quick and dirty solution after the umount was working ok, but I was losing performance because eject is used for ejecting floppy disks, tapes and several other media. In fact, eject can figure out which media is he working with so he selects the proper method of ejecting, but I was bitten by the curiosity. So I implemented both the cdrom commands and the SCSI commands for ejecting the tray, in two functions, copypasted from the eject.c, previously apt-get source‘ed and I’m putting this interesting piece of code to the public domain (most likely it should go with a GPL license, since I used GPL’ed code on it) here: auto-eject-cdrom v0.3. A relevant and important piece of code goes now:
        /* Here I use two different methods for ejecting the CDROM. This is for fun only,
           since I could use system(\"eject\"); but this is the dirty hack. Here I use the only
           two CDROM-related eject functions from the eject.c file of the eject program
           by Jeff Tranter (tranter@pobox.com) - Note by Jose Parrella  */
Installing is just a matter of compiling and copying to /usr/local/sbin and running it as auto-eject-cdrom &. I hope it’s useful for those of you who can not afford to use one of the keys of your keyboard to assign the eject command to it. Enjoy!