编译时记录已安装的文件

发布于 2025-01-20 12:58:27 字数 428 浏览 3 评论 0原文

我目前正在构建 LFS 并寻找包管理解决方案,

特别是一个程序,该程序可以跟踪编译时安装的文件 源代码中的某些内容还有一种删除这些文件的方法,以防不存在 make uninstall

我已经研究了诸如 install-logcheckinstall 但无法同时编译

任何帮助,谢谢!

im currently building LFS and looking for a package management solution

specifically a program that keeps track of what files got installed when you compiled
something from source also has a method for removing those files in case make uninstall isnt present

i have looked into programs like install-log and checkinstall but couldnt get both to compile

any help is appreciated, thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

圈圈圆圆圈圈 2025-01-27 12:58:27

就我个人而言,我一直使用用户的管理(又称“软件包用户”),如节 8.2。软件包管理。即使在LFS社区中,它也没有得到太多的爱,尽管它(仍然)在书中,并且是唯一的“ LFS独特”方法。

对于第一个计时器来说,这并不是很棒,因为它确实会迫使您有时深入研究问题并做出重要的决定。我建议您完成第一个LFS系统构建,然后考虑下次包装用户。

但是,一旦您习惯了,它就可以很好。

另一个简单的方法是基于 Timestamp的技术(在同一链接中进行了描述)。

例如,当需要将软件包的文件复制到系统时,您可以做类似的事情:

touch timestamp_start
    
make install
    
# do other stuff as instructed
    
touch timestamp_stop

find / -newer timestamp_start -not -newer timestamp_stop > list_of_files_affected

在安装NVIDIA专有驱动程序时,我确实使用这种方法,因为用非根本帐户成功安装它们是一个真正的痛苦。

Personally, I have always used the User Based Management (aka "Package Users"), as described in section 8.2. Package Management. It doesn't get much love, even from the LFS community, despite it (still) being in the book and being the only method "unique to LFS".

It's not great for the first timer as it will really force you to dig deep at times to solve issues and make important decisions. I suggest you complete your first LFS system build, then consider Package Users your next time around.

But once you get used to it, it works great.

Another, simpler, method is the Timestamp Based technique (described in the same link).

For example, when it comes time to copy a package's files to your system, you can do something like this:

touch timestamp_start
    
make install
    
# do other stuff as instructed
    
touch timestamp_stop

find / -newer timestamp_start -not -newer timestamp_stop > list_of_files_affected

And I do use this approach when installing the Nvidia proprietary drivers, because successfully installing them with a non-root account is a real pain.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文