Hi Holger,

> --- piuparts.py (revision 678)
> +++ piuparts.py (working copy)
> @@ -426,7 +426,7 @@
>     # Inspired by pbuilder's pbuilder-satisfydepends-aptitude
>
>     tmpdir = tempfile.mkdtemp(dir=settings.tmpdir)
> -    os.makedirs(os.path.join(tmpdir, name, 'DEBIAN'))
> +    os.makedirs(os.path.join(tmpdir, name, 'DEBIAN'), mode = 0755)
>     control = deb822.Deb822()
>     control['Package'] = name
>     control['Version'] = '0.invalid.0'

I think the patch modification is wrong. IMO, you need to set umask to
0 because it is applied between the mode specified in os.makedirs
function. You may also substract the umask value to 755, but I don't
find any python function for getting umask value (without modify it
previously). I have tested this patch with piuparts sid version and
fails when current umask is, for example, 0270.

I relied on http://docs.python.org/library/os.html#os.makedirs.

>
> piuparts checks at the beginning if it's running as root (and refuses to run
> if it doesn't) so IMO your error checking code is not needed.
>
> (Granted, error checking is supposed to be always "good", but it also makes
> the code less readable and in this case IMO for no win.)

Yes, I aggree with you... Sorry, it is possible I have activated the
paranoic mode :-).

Regards,
Cleto



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to