Skip to content

Installing into / instead of /opt #443

Open
@bkauler

Description

@bkauler

I read somewhere, someone asking this question, maybe it was on the mail-list. The reply was, yes, it can be done.
Is that still the case? If If so, for the default set to install into /, what variable would I have to change?
Perhaps some recipes are hard-coded to install into /opt? -- when I first started writing recipes, I am guilty of that. But then, that should be ok, some packages can be installed into /opt, even though the default is /.

Just an extra note: I wrote some code that converts all of the symlinks into /opt, to hard-links. And symlinks-to-symlinks changed to symlink to the local hard-link -- for example /bin/ls was a symlink to /opt/busybox/bin/ls, now becomes symlink to /bin/busybox.
The result is faster operation, smaller size (as hard-links are smaller than symlinks), and looking at the file with a graphical file manager, it looks like a normal filesystem, instead of a window full of symlinks.

In fact, after doing that, most of /opt can be deleted, if desired for any reason. Although there is /opt/busybox/bin/busybox and /bin/busybox, they are hard-links to the same inode, the same file, and deleting one of them does not delete the file. Both hard-links have to be deleted.

...this is actually a very roundabout way of ending up with a "normal" filesystem, with most pkgs in /.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions