bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 56.


From: Collin Funk
Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 56.
Date: Tue, 12 Mar 2024 13:23:24 -0700
User-agent: Mozilla Thunderbird

This patch adds the reminders to use AC_PROG_CC macro instead of
the obsolete AC_PROG_CC_STDC or AC_PROG_CC_C99.

This change is pretty small so it seemed like a good place to remove
the exit() from GLImport.execute(). The output differs slightly from
the shell script but shouldn't be too much work to fix.

The only spooky line is:

    sp.call(['rm', '-rf', self.config['tempdir']], shell=False)

but this seems generally safe to me. The GLConfig's tempdir is set
unconditionally before anything else is done in GLConfig.__init__()
using mkdtemp(). Since a GLConfig object is always created in
GLImport.__init__() it seems that self.config['tempdir'] will always
be a safe directory to remove in '/tmp', or similar. That is the hope
atleast.

Here is a test script that I used if you would like to double check:

gnulib-tool.py --create-testdir --dir test-python readme-release
gnulib-tool --create-testdir --dir test-shell readme-release
# Comment one and check the other.
sed -i -e 's/AC_PROG_CC/AC_PROG_CC_STDC/g' test-python/configure.ac 
test-shell/configure.ac
#sed -i -e 's/AC_PROG_CC/AC_PROG_CC_C99/g' test-python/configure.ac 
test-shell/configure.ac
cd test-python
gnulib-tool.py --import --with-tests fts > stdout
cd ..
cd test-shell
gnulib-tool --import --with-tests fts > stdout
cd ..
git diff --no-index test-python test-shell

Collin

Attachment: 0001-gnulib-tool.py-Follow-gnulib-tool-changes-part-56.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]