Kaydet (Commit) 3e3f83fb authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

gid ve uid tanımlama hataları düzeltildi.

üst 2aaec287
......@@ -302,7 +302,7 @@ def dosym(sourceFile, destinationFile):
makedirs(join_path(get.installDIR(), os.path.dirname(destinationFile)))
try:
os.symlink(join_path(get.installDIR(), sourceFile) , join_path(get.installDIR() ,destinationFile))
os.symlink(sourceFile, join_path(get.installDIR() ,destinationFile))
except OSError:
error(_('ActionsAPI [dosym]: File already exists: {}').format(destinationFile))
......
......@@ -988,26 +988,21 @@ class Builder:
# FIXME: Better way?
if frpath == util.removepathprefix("/",afile.target):
# This is an additional file, uid and gid will change
if afile.owner:
try:
_uid = str(pwd.getpwnam(afile.owner)[2])
except KeyError:
ctx.ui.warning(_("No user named '%s' found "
if afile.owner is None:
afile.owner="root"
if afile.group is None:
afile.group="root"
try:
_uid = str(pwd.getpwnam(afile.owner)[2])
except KeyError:
ctx.ui.warning(_("No user named '%s' found "
"on the system") % afile.owner)
if afile.group:
try:
_gid = str(grp.getgrnam(afile.group)[2])
except KeyError:
ctx.ui.warning(_("No group named '%s' found "
try:
_gid = str(grp.getgrnam(afile.group)[2])
except KeyError:
ctx.ui.warning(_("No group named '%s' found "
"on the system") % afile.group)
else:
try:
# Assume owner == root if no group is given
_gid = str(grp.getgrnam(afile.owner)[2])
except KeyError:
ctx.ui.warning(_("No group named '%s' (value "
"guessed from owner) found "
"on the system") % afile.owner)
break
d[frpath] = Files.FileInfo(path=frpath, type=ftype, permanent=permanent,
size=fsize, hash=fhash, uid=_uid, gid=_gid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment