Thanks Dunc.
That is not why I recommended adding a tag. Upgradpkg will upgrade what you tell it to unless the packages are identical.
If both "ruby-3.0.6-x86_64-1_slack15.0.txz" and "ruby-3.3.0-x86_64-1ftio.txz" available in the current directory:
1. ruby-3.3.0-x86_64-1ftio.txz is installed, 'upgradepkg ruby-3.3.0-x86_64-1ftio.txz' will not upgrade, it's already installed.
2.ruby-3.0.6-x86_64-1_slack15.0.txz installed, 'upgradepkg ruby-3.3.0-x86_64-1ftio.txz' Will upgrade ruby-3.0.6-x86_64-1_slack15.0.txz to ruby-3.3.0-x86_64-1ftio.txz.
3. ruby-3.3.0-x86_64-1ftio.txz is installed, 'upgradepkg ruby-3.0.6-x86_64-1_slack15.0.txz' will upgrade ruby-3.3.0-x86_64-1ftio.txz to ruby-3.0.6-x86_64-1_slack15.0.txz.
The the tag makes the packages different.
The very fact of creating a package for a newer version of ruby means this package is now a non-slack or third party package.
If using slackpkg without the slackpkg+ plugin, slackpkg 'upgrade-all' as well as 'slackpkg upgrade ruby' will upgrade the package to the "stock" slackware64-current package. slackpkg does not care about tags, it only cares about was is "stock" and what is "not stock". The only way to keep the new ruby-3.3.0-x86_64-1ftio.txz from being upgraded is to blacklist it, by package name, base name "ruby" or blacklist by the tag; e.g., "[0-9]ftio" which is useful if you have multiple packages with the ftio tag.
Now if you are using slackpkg with the slackpkg+ plugin. From this point on when I refer to slackpkg, I am referring to slackpkg with the slackpkg+ plugin installed. There are ways to handle these packages. One is to create a personal repository. This will require using a script to create the needed metadata files for slackpkg to use and a gpg-key for this repository. Useful if there are lot of third party packages. Another method is to put packages in a local directory. With this method no metadata files are needed. I to use both methods. I will describe the local directory method.
For this example I will use what I use the directory I use "/home/non-slack/justpkgs". Change to desired location. I will use the above ruby-3.3.0-x86_64-1ftio.txz for the package. "/home/non-slack/justpkgs/ruby-3.3.0-x86_64-1ftio.txz"
I then add this to /etc/slackpkg/slackpkgplus.conf (I added two commented out situational examples):
Code:
PKGS_PRIORITY=( justpkgs:ruby ) # Just one package.
#PKGS_PRIORITY=( justpkgs:.*ftio ) # Just packages with this tag.
#PKGS_PRIORITY=( justpkgs:.* ) # All packages in justpkgs..
MIRRORPLUS['justpkgs']=dir://home/non-slack/justpkgs/
That is all you need. The first tells slackpkg to use the ruby package in justpkgs, defined in MIRRORPLUS to upgrade the slackware64-15.0 package of the same name.
This is my slackpkgplus.conf (PKGS_PRIORITY, REPOPLUS and MIRRORPLUS) section (includes my reminder comments and comments "##" for this post):
Code:
# Set PKGS_PRIORITY to give priority order for single packages present in
# multiple repositories or to allow repositories to override official
# Slackware packages. Without this variable you cannot override official
# Slackware packages. This only applies to 'slackpkg upgrade-all'
# NOTE if justpkgs is used, specify the package or if all packages
# use ( justpkg:.* )
PKGS_PRIORITY+=( nonslack:ffmpeg-compat32 nonslack:mozilla-firefox ) ## This is my repository. only these two packages override slackware64. I could have use "nonslack" as there is nothing else named the same as slackware64.
PKGS_PRIORITY+=( multilib:aaa_glibc-solibs multilib:gcc multilib:glibc ) ## Same applies to multilib. I could have just used "multilib', I prefer it this way.
PKGS_PRIORITY+=( restricted:ffmpeg ) $ This override slackware64.
# REPOPLUS is to specify the search order in the thrid party repositories
# ('slackpkg upgrade-all'). REPOPLUS is filled (unsorted) from the keys of
# MIRRORPLUS so it is possible to use only PKGS_PRIORITY and MIRRORPLUS.
REPOPLUS+=( nonslack ) # My local repository.
REPOPLUS+=( justpkgs ) # No metadata.
REPOPLUS+=( multilib ) # Using local mirror.
REPOPLUS+=( restricted ) # Using local mirror of only packages I use
REPOPLUS+=( alienbob ) # Using local mirror of only packages I use.
# These are associative arrays, order assigned does not mean order out. In
# summary order here means nothing. The 'keys' of these arrays are used to
# initially fill REPOPLUS. Order is set by order assigned with REPOPLUS.
# NOTE run 'slackpkg update gpg' with changes here.
# NOTE if you remove any big repositiries below, probably should
# wipeout /var/lib/slackpkg and rebuild.
MIRRORPLUS['alienbob']=file://home/non-slack/alienbob/
MIRRORPLUS['justpkgs']=dir://home/non-slack/justpkgs/
MIRRORPLUS['multilib']=file://home/non-slack/multilib/current/
MIRRORPLUS['nonslack']=file://home/non-slack/slackbuilds/
MIRRORPLUS['restricted']=file://home/non-slack/alienbob_restricted/
As you can see above I like to put each repository on separate lines in the PKGS_PRIORITY and REPOPLUS section. Easier to what I have set and makes room for comments. the "+=" in the key. The adds to the variable instead of replacing it.