You are not logged in.

#1 2019-11-02 07:54:19

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

[SOLVED] Older/multiple versions of package

Hi,

What's the recommended way to keep an older version of a specific package (as a result having multiple versions)?

I'm asking because I have a php instance on a server (webhost) which doesn't have the latest version yet.

I'm not sure an AUR package would be the solution as a future system upgrade could be problematic for the dependencies...

Thx

Last edited by chrisdb (2019-11-02 15:46:39)


Failure is success in progress.
A.E.

Offline

#2 2019-11-02 08:11:17

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Older/multiple versions of package

ArchLiux does not support multiple version of the same package. The only way to have that is to manage the things yourself outside the archlinux packages-management system (for example by compiling the older version yourself and putting it in /usr/local/bin) or to make another non-conflicting package yourself. This can be tricky especially if upstream has not foreseen any mechanism to have multiple versions installed.

You can relatively reliably keep an older version of a package without installing the newer one, see https://wiki.archlinux.org/index.php/do … g_packages. If the old package depends on older libraries, you can try to recompile an older version within the new system, see: https://www.archlinux.org/svn/. You can configure pacman not to update the old version (see the IgnorePkg option).

Note that keeping an old package is not officially supported by archlinux. It is not recommended to do it with packages that are essential for the system.

Last edited by olive (2019-11-02 08:13:48)

Offline

#3 2019-11-02 08:56:48

loqs
Member
Registered: 2014-03-06
Posts: 17,719

Re: [SOLVED] Older/multiple versions of package

chrisdb wrote:

I'm not sure an AUR package would be the solution as a future system upgrade could be problematic for the dependencies...

Do you mean the requirement that you rebuild AUR packages as required by dependency updates?

Offline

#4 2019-11-02 09:17:44

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Older/multiple versions of package

loqs wrote:

Do you mean the requirement that you rebuild AUR packages as required by dependency updates?

I do not understand what the AUR has to do with your problem. If you want to downgrade an official package, my suggestion imply to recompile the official package retrieving the old PKGBUILD and related files according to: https://www.archlinux.org/svn/

Or is an old version already available in the AUR, unless the AUR package is fully broken, it should install fine within your system, you could possibly update the AUR package in the future. Do not install them with the "--force" option, so that pacman will complain if there is a file conflict. If the AUR package does not work, you could at least remove it without having trashed your system.

Or do you want an old version of an AUR package? You should be able to checkout an older version of the build script using git. https://wiki.archlinux.org/index.php/Ar … Repository, but I am not very familiar with git.

Last edited by olive (2019-11-02 09:18:55)

Offline

#5 2019-11-02 09:39:58

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] Older/multiple versions of package

olive wrote:

I do not understand what the AUR has to do with your problem.

I thought it was a possibility to install an earlier version, available from the AUR, next to the latest version from the official repositories.
Or is it better to use the SVN repos?

loqs wrote:

Do you mean the requirement that you rebuild AUR packages as required by dependency updates?

Yes, I'm afraid that some day in the future a required dependency would not be compatible anymore with the older version...


Failure is success in progress.
A.E.

Offline

#6 2019-11-02 09:59:55

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Older/multiple versions of package

chrisdb wrote:

I thought it was a possibility to install an earlier version, available from the AUR, next to the latest version from the official repositories.

This is the correct solution. There are plenty of old versions of PHP in the AUR, all of them are designed to coexist with the repo packages.

slithery@red:~$ aursearch -P ^php[0-9][0-9]$
aur/php53 5.3.29-10 (11)
    An HTML-embedded scripting language - Legacy 5.3 version
aur/php55 5.5.38-5 (3)
    An HTML-embedded scripting language
aur/php56 5.6.40-1 (47)
    An HTML-embedded scripting language
aur/php70 7.0.33-4 (10)
    A general-purpose scripting language that is especially suited to web development
aur/php71 7.1.32-1 (10)
    A general-purpose scripting language that is especially suited to web development
aur/php72 7.2.24-1 (3)
    A general-purpose scripting language that is especially suited to web development

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2019-11-02 10:21:28

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] Older/multiple versions of package

Slithery wrote:
chrisdb wrote:

I thought it was a possibility to install an earlier version, available from the AUR, next to the latest version from the official repositories.

This is the correct solution. There are plenty of old versions of PHP in the AUR, all of them are designed to coexist with the repo packages.

slithery@red:~$ aursearch -P ^php[0-9][0-9]$
aur/php53 5.3.29-10 (11)
    An HTML-embedded scripting language - Legacy 5.3 version
aur/php55 5.5.38-5 (3)
    An HTML-embedded scripting language
aur/php56 5.6.40-1 (47)
    An HTML-embedded scripting language
aur/php70 7.0.33-4 (10)
    A general-purpose scripting language that is especially suited to web development
aur/php71 7.1.32-1 (10)
    A general-purpose scripting language that is especially suited to web development
aur/php72 7.2.24-1 (3)
    A general-purpose scripting language that is especially suited to web development

ok so the SVN repos are a no-go in this case?


Failure is success in progress.
A.E.

Offline

#8 2019-11-02 10:29:00

loqs
Member
Registered: 2014-03-06
Posts: 17,719

Re: [SOLVED] Older/multiple versions of package

The older versions of the php PKGBUILD work with arch as it was at that point in time there is no guarantee they would work now.
What advantages do you see in using such a PKGBUILD over the AUR PKGBUILD's?  Both may have issues with future upstream changes.

Offline

#9 2019-11-02 10:34:20

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] Older/multiple versions of package

loqs wrote:

The older versions of the php PKGBUILD work with arch as it was at that point in time there is no guarantee they would work now.
What advantages do you see in using such a PKGBUILD over the AUR PKGBUILD's?  Both may have issues with future upstream changes.

I would think the SVN repos are more reliable as they were once official and not uploaded by a random user...


Failure is success in progress.
A.E.

Offline

#10 2019-11-02 10:38:50

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Older/multiple versions of package

The problem with attempting to use the old official packages is that even if they do still build successfully they will conflict with the current official packages, whereas the old versions in the AUR are deliberately installed to a different location so they can coexist happily.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#11 2019-11-02 11:03:15

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Older/multiple versions of package

olive wrote:

...Do not install them with the "--force" option...

There is no such option.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#12 2019-11-02 15:46:12

chrisdb
Member
From: Belgium
Registered: 2018-05-16
Posts: 155

Re: [SOLVED] Older/multiple versions of package

Ok thx
I will have a look at the AUR option then


Failure is success in progress.
A.E.

Offline

#13 2019-11-02 16:17:04

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Older/multiple versions of package

Slithery wrote:
olive wrote:

...Do not install them with the "--force" option...

There is no such option.

Indeed, there was an option "--force" in pacman before, but reading the man page, it seems that it has been replaced with "--overwrite"

Offline

Board footer

Powered by FluxBB