os.execve should get passed program as first argument

Bug #637556 reported by Daniel Hahler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned
duplicity (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When running duplicity again after it failed before (bug 637528), duplicity restarts itself internally.

The code being used however is:
    os.execve(sys.argv[0], sys.argv[1:], os.environ)
which leads to the first argument not being processed properly.

The python doc says: "the arguments to the child process should start with the name of the command being run, but this is not enforced." (http://docs.python.org/library/os.html)

# /usr/bin/duplicity --name duply_foo --no-encryption --verbosity 5 --volsize 100 --exclude-globbing-filelist /home/user/.duply/foo/exclude / file:///path/to/backup

Last inc backup left a partial set, restarting.
Last full backup date: Mon Sep 13 19:45:01 2010
RESTART: The first volume failed to upload before termination.
         Restart is impossible...starting backup from beginning.
Deleting /path/to/backup/duplicity-inc.20100913T192002Z.to.20100913T203511Z.manifest.part
Deleting /home/user/.cache/duplicity/duply_foo/duplicity-new-signatures.20100913T192002Z.to.20100913T203511Z.sigtar.part
Deleting /home/user/.cache/duplicity/duply_foo/duplicity-inc.20100913T192002Z.to.20100913T203511Z.manifest.part
Command line error: Expected 2 args, got 3
Enter 'duplicity --help' for help screen.
Using temporary directory /tmp/duplicity-V98QSi-tempdir

The correct code to be used appears to be:
    os.execve(sys.argv[0], sys.argv, os.environ)

This is being used twice in Duplicity 0.6.09.

Related branches

Daniel Hahler (blueyed)
Changed in duplicity (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in duplicity:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 0.6.11
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package duplicity - 0.6.11-0ubuntu1

---------------
duplicity (0.6.11-0ubuntu1) natty; urgency=low

  * New upstream release
    - os.execve should get passed program as first argument (LP: #637556)
  * debian/patches/04fixrsyncbackend.patch:
    - Remove previous patch, as it was applied upstream
    - Change it to fix new upstream rsync backend bug, 681980
 -- Michael Terry <email address hidden> Fri, 26 Nov 2010 22:16:04 -0500

Changed in duplicity (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.