Page MenuHomeFreeBSD

Don't print all timezones during installworld
ClosedPublic

Authored by arichardson on Jun 12 2017, 8:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 22 2024, 9:30 PM
Unknown Object (File)
Mar 22 2024, 9:30 PM
Unknown Object (File)
Mar 22 2024, 9:30 PM
Unknown Object (File)
Mar 22 2024, 9:30 PM
Unknown Object (File)
Mar 8 2024, 7:54 PM
Unknown Object (File)
Mar 1 2024, 12:06 AM
Unknown Object (File)
Feb 11 2024, 9:26 PM
Unknown Object (File)
Jan 5 2024, 3:47 AM
Subscribers
None

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks edited edge metadata.

I wonder if the -print was intentionally left for debugging purposes. I'm adding Glen who touched this line last.

I wonder if the -print was intentionally left for debugging purposes. I'm adding Glen who touched this line last.

I only added the ${TAG_ARGS}. The '-print' was there beforehand.

trasz edited edge metadata.

Bryan, does this look ok to you? Thanks!

This revision is now accepted and ready to land.Jun 16 2017, 1:50 PM
This revision was automatically updated to reflect the committed changes.

The purpose of the print is to show what is being installed. Without it the -exec install invocation has no output, we don't see which files are installed. In most other cases of installing files we see exactly what is being installed to where. There's a few ways to resolve this:

  • Adding -v to the INSTALL line resolves that.
  • This patch:
# git diff
diff --git share/zoneinfo/Makefile share/zoneinfo/Makefile
index 2f10854cc2e7..044956b856c1 100644
--- share/zoneinfo/Makefile
+++ share/zoneinfo/Makefile
@@ -83,14 +83,19 @@ zoneinfo: yearistype ${TDATA}
        zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
            ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}

+.if make(*install*)
+TZS!= cd ${TZBUILDDIR} && find -s * -type f
+.endif
+
 beforeinstall: install-zoneinfo
 install-zoneinfo:
        mkdir -p ${DESTDIR}/usr/share/zoneinfo
        cd ${DESTDIR}/usr/share/zoneinfo;  mkdir -p ${TZBUILDSUBDIRS}
-       cd ${TZBUILDDIR} && \
-           find -s * -type f -print -exec ${INSTALL} ${TAG_ARGS} \
+.for f in ${TZS}
+       ${INSTALL} ${TAG_ARGS} \
            -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
-           \{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
+           ${TZBUILDDIR:C,^${.OBJDIR}/,,}/${f} ${DESTDIR}/usr/share/zoneinfo/${f}
+.endfor
        ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
            ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/

I (believe I) understand the problem. I'm not sure what the patch does, though. Where's the "-v" there?

I (believe I) understand the problem. I'm not sure what the patch does, though. Where's the "-v" there?

The patch doesn't have one, but you could just change your original line to have -v after ${INSTALL}: ${INSTALL} -v

Okay. But then what exactly is the purpose of the change, compared to eg just adding "-v" to the code currently in the tree?

Okay; Alex explained to me what it actually does. Geez, make(1) is hard...

So it looks like it works just fine. Should I commit it, or do you want to do it yourself - since it's your code anyway? Thanks!

I can confirm this patch works and prints all the timezones during installworld and doesn't print hundreds of lines when make is invoked with -s (which was my original motivation for this patch).
It doesn't work if I run make install inside share/zoneinfo because for some reason TZBUILDDIR is set to /path/to/freebsd-src/share/zoneinfo/buildir. But that is also the case for the previous version so it should be fine.

This revision was automatically updated to reflect the committed changes.