Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
timezone-java.955
tzcode-link.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tzcode-link.diff of Package timezone-java.955
This patch is used on openSUSE versions older than 12.2. Back then, /etc/localtime was either a hard link to a zone file in /usr/share/zoneinfo or a copy of it. By default, zic tries the following approaches to create /etc/localtime: 1. Hard link 2. Symbolic link 3. File copy This patch changes the order to: 1. Hard link 2. File copy 3. Symbolic link Index: timezone-2015f/zic.c =================================================================== --- timezone-2015f.orig/zic.c +++ timezone-2015f/zic.c @@ -738,6 +738,23 @@ relname(char const *dir, char const *bas } } +static int +copy(fromname, toname) +const char * const fromname; +const char * const toname; +{ + if (!fork()) { + execl("/bin/cp", "cp", fromname, toname, (char*) NULL); + _exit(1); + } + int s; + if (wait(&s) < 0) + return -1; + if (!WIFEXITED(s)) + return -1; + return -WEXITSTATUS(s); +} + static void dolink(char const *fromfield, char const *tofield) { @@ -767,6 +784,8 @@ dolink(char const *fromfield, char const exit(EXIT_FAILURE); result = link(fromname, toname); + if (result != 0) + result = copy(fromname, toname); if (result != 0) { const char *s = fromname; const char *t;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor