zrhoffman commented on PR #6525:
URL: https://github.com/apache/trafficcontrol/pull/6525#issuecomment-1254050308

   > Why do you have to rebuild the ATS RPM when you switch git branches? You 
should only have to rebuild if the sources in that directory change.
   
   It's not only about the sources, it's also about the age of the Traffic 
Server RPM in the `dist/` directory. If `make` detects that the sources are 
newer than the already-build Traffic Server RPM, it will try to build the RPM 
again. For example, if `dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm` 
already exists, but you touch the sources to make them newer:
   
   ```shell
   [zrhoffman@computer cdn-in-a-box]$ touch 
../../cache-config/testing/docker/trafficserver/*
   [zrhoffman@computer cdn-in-a-box]$ make --debug cache/trafficserver.rpm
   GNU Make 4.3
   Built for x86_64-pc-linux-gnu
   Copyright (C) 1988-2020 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   Reading makefiles...
   Updating makefiles....
   Updating goal targets....
      Prerequisite 
'../../cache-config/testing/docker/trafficserver/cjose.pic.patch' is newer than 
target '../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
      Prerequisite '../../cache-config/testing/docker/trafficserver/Dockerfile' 
is newer than target 
'../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
      Prerequisite 
'../../cache-config/testing/docker/trafficserver/jansson.pic.patch' is newer 
than target '../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
      Prerequisite '../../cache-config/testing/docker/trafficserver/run.sh' is 
newer than target '../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
      Prerequisite 
'../../cache-config/testing/docker/trafficserver/traffic_server_jemalloc' is 
newer than target '../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
      Prerequisite 
'../../cache-config/testing/docker/trafficserver/trafficserver.spec' is newer 
than target '../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
     Must remake target 
'../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm'.
   docker-compose -f 
./../../cache-config/testing/docker/docker-compose-ats-build.yml build 
--parallel trafficserver_build && docker-compose -f 
./../../cache-config/testing/docker/docker-compose-ats-build.yml run --rm 
trafficserver_build
   [+] Building 0.9s (5/10)
    => [internal] load build definition from Dockerfile                         
                                     0.4s
   [and so on]
   ```
   
   but if you cancel that, then touch the RPM to make it newer:
   
   ```shell
   [zrhoffman@computer cdn-in-a-box]$ touch 
../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm
   [zrhoffman@computer cdn-in-a-box]$ make --debug cache/trafficserver.rpm
   GNU Make 4.3
   Built for x86_64-pc-linux-gnu
   Copyright (C) 1988-2020 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   Reading makefiles...
   Updating makefiles....
   Updating goal targets....
    Prerequisite '../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm' is 
newer than target 'cache/trafficserver.rpm'.
   Must remake target 'cache/trafficserver.rpm'.
   cp -f "../../dist/trafficserver-8.1.5-1.c16631ab0.el8.x86_64.rpm" 
"cache/trafficserver.rpm" || (rm ".//cache/ATS_VERSION"; false)
   Successfully remade target file 'cache/trafficserver.rpm'.
   ```
   
   #6525 fixes this problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to