mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-04-28 06:33:36 +00:00
gnulib-tool.py: Fix default handling for --local-{symlink,hardlink}.
* pygnulib/GLConfig.py (GLConfig.__init__): Allow lcopymode to remain None. (GLConfig.default): Change lcopymode's default to be None. (GLConfig.checkLCopyMode): Update signature. (GLConfig.resetLCopyMode): Change default value to None. * pygnulib/GLFileSystem.py (GLFileSystem.shouldLink): Update.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2026-03-06 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
gnulib-tool.py: Fix default handling for --local-{symlink,hardlink}.
|
||||||
|
* pygnulib/GLConfig.py (GLConfig.__init__): Allow lcopymode to remain
|
||||||
|
None.
|
||||||
|
(GLConfig.default): Change lcopymode's default to be None.
|
||||||
|
(GLConfig.checkLCopyMode): Update signature.
|
||||||
|
(GLConfig.resetLCopyMode): Change default value to None.
|
||||||
|
* pygnulib/GLFileSystem.py (GLFileSystem.shouldLink): Update.
|
||||||
|
|
||||||
2026-03-05 Collin Funk <collin.funk1@gmail.com>
|
2026-03-05 Collin Funk <collin.funk1@gmail.com>
|
||||||
|
|
||||||
gnulib-tool.py: Use --symlink or --hardlink for local modules.
|
gnulib-tool.py: Use --symlink or --hardlink for local modules.
|
||||||
|
|||||||
@@ -208,9 +208,7 @@ class GLConfig:
|
|||||||
self.setCopyMode(copymode)
|
self.setCopyMode(copymode)
|
||||||
# lcopymode (--local-symlink and --local-hardlink)
|
# lcopymode (--local-symlink and --local-hardlink)
|
||||||
self.resetLCopyMode()
|
self.resetLCopyMode()
|
||||||
if lcopymode == None:
|
if lcopymode != None:
|
||||||
# Default to the mode used for non-local modules.
|
|
||||||
lcopymode = copymode
|
|
||||||
self.setLCopyMode(lcopymode)
|
self.setLCopyMode(lcopymode)
|
||||||
# configure_ac
|
# configure_ac
|
||||||
self.resetAutoconfFile()
|
self.resetAutoconfFile()
|
||||||
@@ -321,9 +319,9 @@ class GLConfig:
|
|||||||
'automake_subdir', 'automake_subdir_tests',
|
'automake_subdir', 'automake_subdir_tests',
|
||||||
'libtests', 'dryrun']:
|
'libtests', 'dryrun']:
|
||||||
return False
|
return False
|
||||||
elif key in ['copymode', 'lcopymode']:
|
elif key in ['copymode']:
|
||||||
return CopyAction.Copy
|
return CopyAction.Copy
|
||||||
elif key in ['lgpl', 'gpl', 'libtool', 'conddeps', 'vc_files']:
|
elif key in ['lgpl', 'gpl', 'libtool', 'conddeps', 'vc_files', 'lcopymode']:
|
||||||
return None
|
return None
|
||||||
elif key == 'errors':
|
elif key == 'errors':
|
||||||
return True
|
return True
|
||||||
@@ -1113,7 +1111,7 @@ class GLConfig:
|
|||||||
self.table['copymode'] = CopyAction.Copy
|
self.table['copymode'] = CopyAction.Copy
|
||||||
|
|
||||||
# Define lcopymode methods.
|
# Define lcopymode methods.
|
||||||
def checkLCopyMode(self) -> CopyAction:
|
def checkLCopyMode(self) -> CopyAction | None:
|
||||||
'''Check if pygnulib will copy files, create symlinks, or create hard links,
|
'''Check if pygnulib will copy files, create symlinks, or create hard links,
|
||||||
only for files from the local override directories.'''
|
only for files from the local override directories.'''
|
||||||
return self.table['lcopymode']
|
return self.table['lcopymode']
|
||||||
@@ -1128,9 +1126,9 @@ class GLConfig:
|
|||||||
% type(value).__name__)
|
% type(value).__name__)
|
||||||
|
|
||||||
def resetLCopyMode(self) -> None:
|
def resetLCopyMode(self) -> None:
|
||||||
'''Reset the method used for creating files to copying instead of linking,
|
'''Reset the method used for creating files,
|
||||||
only for files from the local override directories.'''
|
only for files from the local override directories.'''
|
||||||
self.table['lcopymode'] = CopyAction.Copy
|
self.table['lcopymode'] = None
|
||||||
|
|
||||||
# Define verbosity methods.
|
# Define verbosity methods.
|
||||||
def getVerbosity(self) -> int:
|
def getVerbosity(self) -> int:
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class GLFileSystem:
|
|||||||
|
|
||||||
# Don't bother checking the localpath's if we end up performing the same
|
# Don't bother checking the localpath's if we end up performing the same
|
||||||
# action anyways.
|
# action anyways.
|
||||||
if copymode != lcopymode:
|
if lcopymode != None and lcopymode != copymode:
|
||||||
for localdir in localpath:
|
for localdir in localpath:
|
||||||
if lookedup == joinpath(localdir, original):
|
if lookedup == joinpath(localdir, original):
|
||||||
return lcopymode
|
return lcopymode
|
||||||
|
|||||||
Reference in New Issue
Block a user