Remove useless information from awesome -v
Most of this information isn't interesting. If you are getting awesome from a distro, then the time, hostname and username of the build are likely 'random stuff' and if you are building awesome yourself, then the hostname and username are obviously yours and the time can still be interfered based on the awesome's binary ctime. The GCC version shouldn't make any difference at all. Closes https://github.com/awesomeWM/awesome/pull/566. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
56e85d45d4
commit
97048de60e
|
@ -2,9 +2,6 @@
|
|||
#define _AWE_VERSION_INTERNAL_H_
|
||||
|
||||
#define AWESOME_VERSION "@AWESOME_VERSION@"
|
||||
#define AWESOME_COMPILE_MACHINE "@AWESOME_COMPILE_MACHINE@"
|
||||
#define AWESOME_COMPILE_BY "@AWESOME_COMPILE_BY@"
|
||||
#define AWESOME_COMPILE_HOSTNAME "@AWESOME_COMPILE_HOSTNAME@"
|
||||
#define AWESOME_RELEASE "@AWESOME_RELEASE@"
|
||||
|
||||
#endif //_AWE_VERSION_INTERNAL_H_
|
||||
|
|
|
@ -35,7 +35,6 @@ macro(a_find_program var prg req)
|
|||
endmacro()
|
||||
|
||||
a_find_program(GIT_EXECUTABLE git FALSE)
|
||||
a_find_program(HOSTNAME_EXECUTABLE hostname FALSE)
|
||||
# programs needed for man pages
|
||||
a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE)
|
||||
a_find_program(XMLTO_EXECUTABLE xmlto FALSE)
|
||||
|
@ -100,14 +99,6 @@ elseif( EXISTS ${SOURCE_DIR}/.version_stamp )
|
|||
endif()
|
||||
# }}}
|
||||
|
||||
# {{{ Get hostname
|
||||
execute_process(
|
||||
COMMAND ${HOSTNAME_EXECUTABLE}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE BUILDHOSTNAME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# }}}
|
||||
|
||||
# {{{ Required libraries
|
||||
#
|
||||
# this sets up:
|
||||
|
@ -297,9 +288,6 @@ endif()
|
|||
mark_as_advanced(CMAKE_INSTALL_CMAKE_INSTALL_PREFIX)
|
||||
|
||||
set(AWESOME_VERSION ${VERSION})
|
||||
set(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
|
||||
set(AWESOME_COMPILE_HOSTNAME ${BUILDHOSTNAME})
|
||||
set(AWESOME_COMPILE_BY $ENV{USER})
|
||||
set(AWESOME_RELEASE ${CODENAME})
|
||||
set(AWESOME_SYSCONFDIR ${XDG_CONFIG_DIR}/${PROJECT_AWE_NAME})
|
||||
set(AWESOME_LUA_LIB_PATH ${AWESOME_DATA_PATH}/lib)
|
||||
|
|
|
@ -35,34 +35,24 @@
|
|||
void
|
||||
eprint_version(void)
|
||||
{
|
||||
printf("awesome " AWESOME_VERSION
|
||||
" (" AWESOME_RELEASE ")\n"
|
||||
" • Build:");
|
||||
#if defined(__DATE__) && defined(__TIME__)
|
||||
printf(" " __DATE__ " " __TIME__);
|
||||
#endif
|
||||
printf(" for %s", AWESOME_COMPILE_MACHINE);
|
||||
#if defined(__GNUC__) \
|
||||
&& defined(__GNUC_MINOR__) \
|
||||
&& defined(__GNUC_PATCHLEVEL__)
|
||||
printf(" by gcc version %d.%d.%d",
|
||||
__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
||||
#endif
|
||||
printf(" (%s@%s)\n", AWESOME_COMPILE_BY, AWESOME_COMPILE_HOSTNAME);
|
||||
|
||||
lua_State *L = luaL_newstate();
|
||||
luaopen_base(L);
|
||||
lua_getglobal(L, "_VERSION");
|
||||
printf(" • Compiled against " LUA_RELEASE
|
||||
" (running with %s)\n", lua_tostring(L, -1));
|
||||
|
||||
#ifdef WITH_DBUS
|
||||
const char *has_dbus = "✔";
|
||||
#else
|
||||
const char *has_dbus = "✘";
|
||||
#endif
|
||||
|
||||
printf("awesome %s (%s)\n"
|
||||
" • Compiled against %s (running with %s)\n"
|
||||
" • D-Bus support: %s\n",
|
||||
AWESOME_VERSION, AWESOME_RELEASE,
|
||||
LUA_RELEASE, lua_tostring(L, -1),
|
||||
has_dbus);
|
||||
lua_close(L);
|
||||
|
||||
printf(" • D-Bus support: ");
|
||||
#ifdef WITH_DBUS
|
||||
printf("✔\n");
|
||||
#else
|
||||
printf("✘\n");
|
||||
#endif
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue