gnewsense-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnewsense-dev] Debderive


From: Sam Geeraerts
Subject: Re: [Gnewsense-dev] Debderive
Date: Thu, 16 Feb 2012 10:28:17 +0100
User-agent: Thunderbird 2.0.0.24 (X11/20101029)

I've had some time to test your patches.

Sam Geeraerts wrote:
Stayvoid wrote:
(Maybe we shouldn't use IOError for this purpose. I'm not sure.)

Indeed. Every exception should be caught, so raising one in the main code is not good practice.

+    # Check if `/etc/debderiver' already exists
+    # Create it if the dir doesn't exist
+    if not os.path.exists('/etc/debderiver'):
+        print 'Creating `/etc/debderiver\'...'
+        os.makedirs('/etc/debderiver')
+        print 'Done.'

This should also be handled by the installation procedure. I guess it's good to have this in for now. It should also check if there's a configuration file. If it's not there, it should suggest to copy the example file and edit it.

It should be possible to run debderive as a regular user. That directory can only be created by root. The error message in the parse method ("Unable to load %s") is sufficient to tell the user what's going, I think.

+    # Check for reprepro
+    if not os.path.exists('/usr/bin/reprepro'):
+ raise IOError, 'Missing dependency: install reprepro and try again.'
+
     CONF_DIR_PATH = '/etc/debderiver'

     conf = parse(CONF_DIR_PATH)

I merged this into our main branch.

If you're interested, I added a few more items to TODO.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]