SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,095
Rep:
Execute by File Date?
For the last hour or so I've been searching the 'Net to see if
it is possible to upgrade or install a package by its file date
instead of its file name.
I've never had much luck using search engines for whatever reason,
and today is no different. Regardless of what combination of words I enter, the results are usually about using the "date" command.
So, is it possible to execute a package by its file date?
Many Thanks.
(Something I should have learned twenty years ago. )
So, is it possible to execute a package by its file date?
Yes, if by 'date' you mean previous versions. All Slackware packages use a naming convention to distinguish versions, which is the same as distinguishing by file date.
With Slackware the installpkg and upgradepkg commands do not check for dependencies. Users can install or replace any version of a package. The commands will not complain or resist.
That said, you need a copy of the older or newer package you want to replace. One challenge is most Slackware mirrors do not retain previous versions. After you find and copy the version of the package you want locally, the installpkg and upgradepkg will work the same.
Often I have thought the upgradepkg command should be named replacepkg.
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,095
Original Poster
Rep:
Many thanks to everyone for their replies.
For example, let us say I just downloaded half a dozen different packages into a directory containing various other packages, including some with the same name, but a earlier version.
What I want to do is run upgradepkg or installpkg on the most recently downloaded files all at the same time.
So, I might issue something like,
upgradepkg --reinstall --install-new
and then on the same line whatever option needed along with the date, so it would be something like,
That thing does not exists in PKGTOOLS, as you know.
Otherwise, IF you intend to propose an extension to PKGTOOLS, better look first to my own mega-thread, where was just about four lines code addition. And optionally a ton of work. BUT, only optionally.
IF you want us to talk theoretically, honestly I will look suspicious at idea to leave upgradepkg to mess with what it like in the "range" of 12.12.2017
Last edited by Darth Vader; 12-12-2017 at 10:20 PM.
I don't think this is possible without some ls -la piped into greps, uniq, xargs and possibly (probably) more. If you give an example of your ls -la output and what packages you'd want to install, something might be able to be worked up by people here.
upgradepkg expects as target a package or a list of packages with their paths given as arguments, period.
You could use the date to choose which packages to upgrade, in other words which ones you will make targets of upgradepkg, but in my opinion this is risky, as an "older" package can be rebuilt at a later time that a "newer" one.
I fail to see why you want to put in the same directory several packages with the same base name, maybe you could shed some light on your rationale doing so?
For example, let us say I just downloaded half a dozen different packages into a directory containing various other packages, including some with the same name, but a earlier version.
What I want to do is run upgradepkg or installpkg on the most recently downloaded files all at the same time.
So, I might issue something like,
upgradepkg --reinstall --install-new
and then on the same line whatever option needed along with the date, so it would be something like,
Since you don't want to use a package manager, but prefer to manually scan downloaded packages for date, perhaps you can do one more manual step and just grab a list of existing packages in your local directory every time before downloading new ones, do it again after you add new content, sort those lists, compute the diff, and just install the new ones?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.