Skip to contentSkip to conversation

package/skeleton: drop $(HOST_DIR)/usr compatibility symlink

PATCH Applied Arnout Vandecappelle 2 participants 4 messages Apr 9, 2023 – Apr 10, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/skeleton: drop $(HOST_DIR)/usr compatibility symlink

It has been years that we removed $(HOST_DIR)/usr. Because of this symlink, however, there are still packages that install things in $(HOST_DIR)/usr. Remove the symlink so those packages will start to fail.

Note that there's now a check-package check to detect such incorrectly instaled things, so this should only affect external packages.

---
 package/skeleton/skeleton.mk | 4 ----
 1 file changed, 4 deletions(-)
package/skeleton/skeleton.mk +0 -4
index 634c76e437..186cb60189 100644
@@ -11,11 +11,7 @@
 SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
 SKELETON_ADD_SKELETON_DEPENDENCY = NO
 
-# We create a compatibility symlink in case a post-build script still
-# uses $(HOST_DIR)/usr
 define HOST_SKELETON_INSTALL_CMDS
-# check-package DoNotInstallToHostdirUsr
-	$(Q)ln -snf . $(HOST_DIR)/usr
 	$(Q)mkdir -p $(HOST_DIR)/lib
 	$(Q)mkdir -p $(HOST_DIR)/include
 	$(Q)case $(HOSTARCH) in \
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Arnout, All,

On 2023-04-09 23:08 +0200, Arnout Vandecappelle spake thusly:

Quoted 18 lines

It has been years that we removed $(HOST_DIR)/usr. Because of this symlink, however, there are still packages that install things in $(HOST_DIR)/usr. Remove the symlink so those packages will start to fail.

Note that there's now a check-package check to detect such incorrectly instaled things, so this should only affect external packages.

---
 package/skeleton/skeleton.mk | 4 ----
 1 file changed, 4 deletions(-)
package/skeleton/skeleton.mk +0 -0
index 634c76e437..186cb60189 100644

package/skeleton/skeleton.mk line 18

Quoted 8 lines
package/skeleton/skeleton.mk +0 -4
@@ -11,11 +11,7 @@
 SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
 SKELETON_ADD_SKELETON_DEPENDENCY = NO
 
-# We create a compatibility symlink in case a post-build script still
-# uses $(HOST_DIR)/usr
 define HOST_SKELETON_INSTALL_CMDS
-# check-package DoNotInstallToHostdirUsr
-	$(Q)ln -snf . $(HOST_DIR)/usr

Should we have a kind of post-isntall test that checks that a package did not create that (e.g. because their makefile hard-codes something like DESTDIR/usr)?

This is probably a good candidate for GLOBAL_INSTRUMENTATION_HOOKS, no?

Regards,
Yann E. MORIN.

Quoted 10 lines
package/skeleton/skeleton.mk +0 -0
 	$(Q)mkdir -p $(HOST_DIR)/lib
 	$(Q)mkdir -p $(HOST_DIR)/include
 	$(Q)case $(HOSTARCH) in \
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 24 lines · Yann E. MORIN

Arnout, All,

On 2023-04-09 23:08 +0200, Arnout Vandecappelle spake thusly:

Quoted 21 lines

It has been years that we removed $(HOST_DIR)/usr. Because of this symlink, however, there are still packages that install things in $(HOST_DIR)/usr. Remove the symlink so those packages will start to fail.

Note that there's now a check-package check to detect such incorrectly instaled things, so this should only affect external packages.

---
  package/skeleton/skeleton.mk | 4 ----
  1 file changed, 4 deletions(-)
package/skeleton/skeleton.mk +0 -0
index 634c76e437..186cb60189 100644
@@ -11,11 +11,7 @@
  SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
  SKELETON_ADD_SKELETON_DEPENDENCY = NO
 
Quoted 9 lines

package/skeleton/skeleton.mk line 18

Quoted 5 lines
package/skeleton/skeleton.mk +0 -4
-# We create a compatibility symlink in case a post-build script still
-# uses $(HOST_DIR)/usr
  define HOST_SKELETON_INSTALL_CMDS
-# check-package DoNotInstallToHostdirUsr
-	$(Q)ln -snf . $(HOST_DIR)/usr

Should we have a kind of post-isntall test that checks that a package did not create that (e.g. because their makefile hard-codes something like DESTDIR/usr)?

If we are going to keep dragging along stuff to support legacy forever, then
it's probably simpler to just keep this symlink. If something installs in HOST_DIR/usr it's probably going to break somewhere down the line, right? So I don't think we need to bother.

BTW, DESTDIR is empty for host builds. And PREFIX/usr would be completely crazy.

Regards,
Arnout

Quoted 17 lines

This is probably a good candidate for GLOBAL_INSTRUMENTATION_HOOKS, no?

Regards,
Yann E. MORIN.

Quoted 10 lines
package/skeleton/skeleton.mk +0 -0
  	$(Q)mkdir -p $(HOST_DIR)/lib
  	$(Q)mkdir -p $(HOST_DIR)/include
  	$(Q)case $(HOSTARCH) in \
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Arnout, All,

On 2023-04-10 21:05 +0200, Arnout Vandecappelle spake thusly:

Quoted 34 lines · Yann E. MORIN
Quoted 16 lines

Arnout, All,

On 2023-04-09 23:08 +0200, Arnout Vandecappelle spake thusly:

Quoted 13 lines

It has been years that we removed $(HOST_DIR)/usr. Because of this symlink, however, there are still packages that install things in $(HOST_DIR)/usr. Remove the symlink so those packages will start to fail.

Note that there's now a check-package check to detect such incorrectly instaled things, so this should only affect external packages.

---
 package/skeleton/skeleton.mk | 4 ----
 1 file changed, 4 deletions(-)
Quoted 16 lines

package/skeleton/skeleton.mk line 17

Quoted 12 lines
package/skeleton/skeleton.mk +0 -4
index 634c76e437..186cb60189 100644
@@ -11,11 +11,7 @@
 SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
 SKELETON_ADD_SKELETON_DEPENDENCY = NO
-# We create a compatibility symlink in case a post-build script still
-# uses $(HOST_DIR)/usr
 define HOST_SKELETON_INSTALL_CMDS
-# check-package DoNotInstallToHostdirUsr
-	$(Q)ln -snf . $(HOST_DIR)/usr

Should we have a kind of post-isntall test that checks that a package did not create that (e.g. because their makefile hard-codes something like DESTDIR/usr)?

Quoted 4 lines

If we are going to keep dragging along stuff to support legacy forever,
then it's probably simpler to just keep this symlink. If something installs in HOST_DIR/usr it's probably going to break somewhere down the line, right? So I don't think we need to bother.

I am also all for dropping legacy stuf after a while.

Applied to master, thanks.

Quoted 1 line

BTW, DESTDIR is empty for host builds. And PREFIX/usr would be completely crazy.

Damn, of course. But if packages' buildsystems would never do such silly things at all, life would be so much easier for us... ;-]

Regards,
Yann E. MORIN.

Quoted 24 lines

Regards,
Arnout

Quoted 17 lines

This is probably a good candidate for GLOBAL_INSTRUMENTATION_HOOKS, no?

Regards,
Yann E. MORIN.

Quoted 10 lines
package/skeleton/skeleton.mk +0 -0
 	$(Q)mkdir -p $(HOST_DIR)/lib
 	$(Q)mkdir -p $(HOST_DIR)/include
 	$(Q)case $(HOSTARCH) in \
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot