Stayvoid wrote:
diff6vsorig.txt replaces _do with _do2 and removes \
I only took the backslash removal. See below.
diff7vsorig.txt removes print (again)
diff8vsorig.txt fixes length
Both merged.
I have no idea why
subprocess.Popen(['reprepro', '--noskipold', '-Vb',
'/srv/backuppc/repo/debderiver/base', 'processincoming all'])
doesn't work.
['processincoming', 'all'] works.
It took me a while to understand this, but I still don't understand
the cause of the problem.
os.system passes the command string straight to the shell.
subprocess.Popen is a bit more intelligent: it knows about parameters.
More specifically, each list item is a positional parameter in the
shell. E.g. the difference between:
subprocess.Popen(['grep', 'bash', '/etc/passwd']) = grep bash /etc/passwd
subprocess.Popen(['grep', 'bash /etc/passwd']) = grep 'bash /etc/passwd'
Also note the example [1] in Python documentation.
So your change for update and processincoming is correct. The one for
include still uses a single string, which is valid, but it's cleaner and
more consistent to pass a list. The one for removesrc uses '
'.join(...).split(), which are reverse operations of each other.
BTW, both files (orig and sixth ver) output this:
Error parsing /srv/backuppc/repo/debderiver/base/conf/updates, line 1:
Unknown header 'FilterSrcList'!
To ignore unknown fields use --ignore=unknownfield
There have been errors!
I have no time to investigate this, but AFAICT it's only connected with updates.
Most likely your reprepro version is too old.
[1] http://docs.python.org/library/subprocess.html#subprocess.Popen
_______________________________________________
gNewSense-dev mailing list
gNewSense-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnewsense-dev