LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Script to revert to previous version (https://www.linuxquestions.org/questions/slackware-14/script-to-revert-to-previous-version-4175735368/)

marav 03-27-2024 07:56 AM

Script to revert to previous version
 
Hi,

Here is a script, that point to slackware.uk "cumulative" repo, to revert easily to a previous version of a package, in some case this can be the only workaround to avoid a temporarily breakage in -current

https://gitlab.com/maravtdm/slackbui...ref_type=heads

As for example:
Code:

blackstar :: ~ » pkg_cumul
Run this script as root

Code:

blackstar:~:# pkg_cumul
Please enter a package name.

Code:

blackstar:~:# pkg_cumul enchant
Last 3 previous enchant packages available :

  1    enchant-2.6.5-x86_64-1.txz
  2    enchant-2.6.6-x86_64-1.txz
  3    enchant-2.6.7-x86_64-1.txz

Package to download (1...3 or "q" to quit) ? 2

Code:

Package /tmp/enchant-2.6.6-x86_64-1.txz (55.54 KiB) downloaded successfully !

Install or delete /tmp/enchant-2.6.6-x86_64-1.txz (i/R) ? i

Code:

+==============================================================================
| Upgrading enchant-2.6.8-x86_64-1 package using /tmp/enchant-2.6.6-x86_64-1.txz
+==============================================================================
Pre-installing package enchant-2.6.6-x86_64-1...
Removing package: enchant-2.6.8-x86_64-1-upgraded-2024-03-27,13:43:00
  --> Deleting /usr/doc/enchant-2.6.8/AUTHORS
  --> Deleting /usr/doc/enchant-2.6.8/COPYING.LIB
  --> Deleting /usr/doc/enchant-2.6.8/HACKING
  --> Deleting /usr/doc/enchant-2.6.8/NEWS
  --> Deleting /usr/doc/enchant-2.6.8/README
  --> Deleting /usr/doc/enchant-2.6.8/enchant-2.html
  --> Deleting /usr/doc/enchant-2.6.8/enchant-lsmod-2.html
  --> Deleting /usr/doc/enchant-2.6.8/enchant.html
  --> Deleting /usr/lib64/libenchant-2.so.2.6.8
  --> Deleting empty directory /usr/doc/enchant-2.6.8/
Verifying package enchant-2.6.6-x86_64-1.txz.
Installing package enchant-2.6.6-x86_64-1.txz:
PACKAGE DESCRIPTION:
# enchant (a wrapper for spellcheck libraries)
#
# Enchant supports:
#  * Aspell/Pspell
#  * Ispell
#  * MySpell/HunSpell
#  * Uspell (Yiddish, Hebrew and Eastern European languages)
#  * Hspell (Hebrew) and others
#
# Homepage: https://abiword.github.io/enchant/
#
Executing install script for enchant-2.6.6-x86_64-1.txz.
Package enchant-2.6.6-x86_64-1.txz installed.
Package enchant-2.6.8-x86_64-1 upgraded with new package /tmp/enchant-2.6.6-x86_64-1.txz.

Site note:
The mirror (slackware.uk) and the number of previous versions can be easily changed in the script

j12i 03-27-2024 08:10 AM

I'm not on current so I don't have use for this, but if I did I'd add the GPG check.

reddog83 03-27-2024 11:21 AM

This can be used with personal repos as well??

marav 03-27-2024 12:20 PM

Quote:

Originally Posted by reddog83 (Post 6492300)
This can be used with personal repos as??

You have a personal cumulative repo ?

marav 03-27-2024 01:14 PM

Quote:

Originally Posted by j12i (Post 6492255)
I'm not on current so I don't have use for this, but if I did I'd add the GPG check.

Be my guest!

reddog83 03-27-2024 07:12 PM

Quote:

Originally Posted by marav (Post 6492319)
You have a personal cumulative repo ?

Actually I do for Gnome version's.:hattip:

marav 03-27-2024 07:29 PM

Quote:

Originally Posted by reddog83 (Post 6492402)
Actually I do for Gnome version's.:hattip:

This tool is mainly designed for official Slackware packages / cumulative repo (slackware.uk)
But it would be trivial to adapt it to other repositories

chrisretusn 03-27-2024 10:13 PM

Nifty tool marav!


Tool added to my tool box. I don't normally need to revert packages but when I do I will use this nice script. :hattip:

ethelack 03-29-2024 06:05 AM

Very useful tool.

Isn't that a typo in the code stating "download success"

You have "install or delete". (i/R)

Shouldn't it be install or remove or (i/D)?

marav 03-29-2024 07:59 AM

Quote:

Originally Posted by ethelack (Post 6492670)
Very useful tool.

Isn't that a typo in the code stating "download success"

You have "install or delete". (i/R)

Shouldn't it be install or remove or (i/D)?

Thanks !

Catch the last commit, I made a few corrections
i.e.
(I/d) : Install is now the default option


All times are GMT -5. The time now is 02:00 AM.