Public bug reported:

Binary package hint: easycrypt

easycrypt Version: 0.2.2.5-0ubuntu1
installed onto a standard gutsy system with latest truecrypt installed
My home directory is nfs mounted.

When trying to create a crypt in my home directory it gave the following output:
[EMAIL PROTECTED] easycrypt 
failed to load localised text, defaulting to English (en)
Easy Crypt 0.2.2.5 (2008/01/23 22:34:45)
root is /usr/share/easycrypt
home is /home/username/
first run show them the welcome
sudo command will be gksudo
checking : ps -ef | grep "pyt[h]on ./EasyCrypt.py"
looking for truecrypt
found truecrypt
df -k /home/user/ | tail -1 | awk {'print $4'}
size left 99%
Traceback (most recent call last):
  File "./EasyCrypt.py", line 1504, in doFirstCreateEvent
    self.getCryptPasswordThenAction("create")
  File "./EasyCrypt.py", line 872, in getCryptPasswordThenAction
    spaceleft = self.howMuchSpaceInKb()
  File "./EasyCrypt.py", line 408, in howMuchSpaceInKb
    return int(checkAmountLeft)
ValueError: invalid literal for int() with base 10: '99%'


This is caused by df using two lines to display long mounted filesystem
names.

e.g. 
% df -k ~
Filesystem           1K-blocks      Used Available Use% Mounted on
fileserver:/home/username
                      21165056  20751360    413696  99% /home/username

A solution is to patch /usr/share/easycrypt/EasyCrypt.py to use df's -P
(posix compatibility) flag.

e.g.
% df -Pk ~
Filesystem         1024-blocks      Used Available Capacity Mounted on
fileserver:/home/username  21165056  20751360    413696      99% /home/username

Patch:
% diff -u /usr/share/easycrypt/EasyCrypt.py-dist 
/usr/share/easycrypt/EasyCrypt.py     
--- /usr/share/easycrypt/EasyCrypt.py-dist      2008-01-23 23:07:10.000000000 
+0000
+++ /usr/share/easycrypt/EasyCrypt.py   2008-01-23 22:43:15.000000000 +0000
@@ -393,8 +393,8 @@
                        print "max size is 2000"
                        capMax = True
    
-               print "df -k "+self.workingFolder+" | tail -1 | awk {'print 
$4'}"
-               checkAmountLeft = commands.getoutput("df -k 
"+self.workingFolder+" | tail -1 | awk {'print $4'}")
+               print "df -Pk "+self.workingFolder+" | tail -1 | awk {'print 
$4'}"
+               checkAmountLeft = commands.getoutput("df -Pk 
"+self.workingFolder+" | tail -1 | awk {'print $4'}")
                print "size left", checkAmountLeft
 
                if capMax:

** Affects: easycrypt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Fails to calculate free space for long mount points
https://bugs.launchpad.net/bugs/185497
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to