slkbuild and depfinder

General talk about packaging procedures and packages.
Post Reply
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

slkbuild and depfinder

Post by pwatk »

Hi all,

I'm not sure if you guys (dev's) consider this a good idea or not but in the past I've always had my .SlackBuild's automatically create a slack-required file for the package I was creating.

Example:

Code: Select all

# Create slack-required file
if [ -x "`type -path requiredbuilder`" ]; then
  requiredbuilder -v -y -s $CWD $PKG/install
fi
Could something similar be included in the slkbuild script (using depfinder of course)?

Edit: I probably should have posted this in suggestions, sorry.
Image
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: slkbuild and depfinder

Post by gapan »

Including dependency information inside the package is not a good idea. That's why we have .dep files. If you put the dependency list inside the package, then if you want to edit the dependencies is going to require rebuilding the whole package, which also means that the entire package has to be uploaded/replaced in the repositories. Users will also have to upgrade a package that will be exactly the same as the one they already have, which would be pointless and just a waste of bandwidth. Having them separately as a .dep file means that you only have to edit a text file. The simplest solution is always the best. There have been many cases where we had to edit the dependencies already and I'm sure there will be many more in the future.

Almost every other slackware related project that supports dependencies out there uses a slack-required file inside the package. That is a bad design decision that has stuck. You can still do that if you want, but that information will not be parsed by the scripts that maintain the salix repositories, those look for .dep files, only. Also pkgtools and/or spkg doesn't care about dependencies at all, either in slack-required format or .dep files, so it wouldn't matter anyway.
Image
Image
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: slkbuild and depfinder

Post by Shador »

This was in the original buildpkg which slkbuild is built on/forked from.
The appropriate file for Salix isn't slack-required btw instead it's named like the pkg with .dep appended and the tool we use is called depfinder.

But this feature has been removed because it made packagers lazy. Dependencies are not something which can be done completely automatic. It requires human intervention. On top of that it's often enough to just copy the old depfile over especially for rebuilds. If done that way no handmade changes are lost either. That makes it also a time-consuming overhead especially for bigger packagers where retrieving the deps is no matter of seconds.

gapan was faster. :D
Image
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: slkbuild and depfinder

Post by pwatk »

Something else I like about this project... ask a question and get a full answer :).

I've been used to having no dependency resolution for a very long time but other distro's do allow for the installation media to act as a repo for the package manager.

Including the .dep files on the disc could save people time when installing packages without a network (I'm saying no more here :D) after installing core or basic.

Just a thought!
Image
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: slkbuild and depfinder

Post by Shador »

Yes, I already thought the one or other time that having the possibility to use the installation disk as a repository could be quite useful.
Of course everything on there gets installed with a full install. But perhaps one wants to reinstall a deleted/broken package.
The use for core and basic installations would be even greater as it would allow one to cherry-pick a system to a limited extent without internet access.
Still I consider this not very important. The only case where it really provides an advantage are non-full installs, otherwise it's pretty much useless.
Image
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: slkbuild and depfinder

Post by pwatk »

Fair enough.
Image
Post Reply