How to downgrade a package via zypper?

For a new issue,

MAYBE because of newer pkg php-pear-Mail_Mime, version 1.10.6-lp151.4.1, from repo server:php:applications.repo,
(FYI issue is https://github.com/roundcube/roundcubemail/issues/7270)

I would like to downgrade temporarily to the previous vesion of php-pear-Mail_Mime.

I’ve the following zypper history:


vserver:/var/log/zypp # grep -n php-pear-Mail_Mime history
43046:# 2019-12-06 10:02:00 php-pear-Mail_Mime-1.10.4-lp151.1.1.noarch.rpm installed ok
43053:2019-12-06 10:02:00|install|php-pear-Mail_Mime|1.10.4-lp151.1.1|noarch||server:php:applications.repo|ca2e551d2a5628640a06e1d18504bad7a51ee494db4f30b030f41b2f10c82302|
44150:# 2020-02-05 10:38:00 php-pear-Mail_Mime-1.10.6-lp151.4.1.noarch.rpm installed ok
44157:2020-02-05 10:38:00|install|php-pear-Mail_Mime|1.10.6-lp151.4.1|noarch||server:php:applications.repo|9d12d7b636be784b362f9a26f7ffd6ede8fad548e09de25c78429218d839e244|

and I would downgrade to 1.10.4-lp151.1.1.

Found this https://stackoverflow.com/questions/25995813/zypper-update-package-to-the-previous-version-not-the-last#26033143
with the hint for

zypper install --oldpackage package-name-x.x.x.x-x.x86_64

BUT whatever I’m trying like e.g.

vserver:/var/log/zypp # zypper install --oldpackage php-pear-Mail_Mime-1.10.4-lp151.1.1.noarch
Loading repository data...
Reading installed packages...
Package 'php-pear-Mail_Mime-1.10.4-lp151.1.1.noarch' not found.
Resolving package dependencies...

Nothing to do.


Always leads to “Package … not found”.

Any hints would be great!

Found here https://pear.php.net/package/Mail_Mime/download that 1.10.4 would be downloadable from there, but as I’m not really familiar with php, I’ve no clue if there might be a chance to put the downloaded 1.10.4 at a place to get the zypper-installed version “overridden/overloaded” by the (temporary) downloaded pear package? Like “playing” with CLASSPATH in Java?

Thanks in advance,
Michael

I’m looking at the man page for “zypper”. I have never actually done this – I always use Yast and the “Version” tab for downgrading. But it looks as if you need:

zypper install --oldpackage php-pear-Mail_Mime=1.10.4-lp151.1.1

It is the “=” that is missing in your attempt. It should be okay to omit the “.noarch”.

Looking at the man page, it wants

OP EDITION

where “OP” is “=” or “<” or “>” (and some other possibilities).

THANKS for the hint about the “=”, missed that

Getting a new error message now:

zypper install --oldpackage php-pear-Mail_Mime=1.10.4-lp151.1.1
Loading repository data...
Reading installed packages...
'php-pear-Mail_Mime=1.10.4-lp151.1.1' not found in package names. Trying capabilities.
No provider of 'php-pear-Mail_Mime=1.10.4-lp151.1.1' found.

Seems to me that server:php:applications.repo only have the latest version packages available, is this correct?

As @nrickert already hints at, that is easy to see in the Versions tab in YaST > Software Management.

And it is of course also easy to look into that repo by yourself, put the URL in your browser and walk around to see what is there.

Henk, thank you very much for answering. Of course I’ve tried via yast before, and also looked “manually” at https://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Leap_15.1/,
but maybe because a lack of php knowledge I’ve been confused:

Zypper shows both “php-pear-Mail_Mime” and also “php7-pear-Mail_Mime”:

vserver:~ # zypper se -v mail_mime
Loading repository data...
Reading installed packages...

S  | Name                     | Type       | Version          | Arch   | Repository
---+--------------------------+------------+------------------+--------+-----------------------------
   | php-pear-Mail_Mime       | package    | 1.10.6-lp151.4.1 | noarch | server:php:applications.repo
    name: php-pear-Mail_Mime
   | php-pear-Mail_Mime       | srcpackage | 1.10.6-lp151.4.1 | noarch | server:php:applications.repo
    name: php-pear-Mail_Mime
   | php-pear-Mail_mimeDecode | package    | 1.5.6-lp151.1.1  | noarch | server:php:applications.repo
    name: php-pear-Mail_mimeDecode
   | php-pear-Mail_mimeDecode | srcpackage | 1.5.6-lp151.1.1  | noarch | server:php:applications.repo
    name: php-pear-Mail_mimeDecode
i+ | php7-pear-Mail_Mime      | package    | 1.10.1-lp151.2.1 | noarch | openSUSE-15.1 OSS
    name: php7-pear-Mail_Mime

Remembering some pains from our period of php5 to php7 upgrade I tried to avoid to “mix” php pkgs. As you see I nevertheless did now, downgraded to 1.10.1, to continue my tests.

https://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Leap_15.1/ as said only shows 1.10.6 in the “noarch” , so my question was more generally meant: Is this by-design that there are only the latest pkgs?

Maybe a wrong assumption by me, or a wrong remembrance, but I’ve assumed / believed to remember that updated packages are still stored in a repo for fallback-needed issues like mine :slight_smile:

I assume that depends on the repo maintainer.

The Leap OSS repo still has the version that LEAP version is released with. And the OSS Update repo contains all the updates of each package that are published since the original release.

Try to contact the repo maintainer to ask him about her/his policy.

I just checked the repo by opening a web browser to that location

https://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Leap_15.1/x86_64/

There’s a problem there that’s consistent with the error “Package… not found”
The repo really doesn’t have that package despite the various metadata and the Software Search website which indicate the package should be there.

Recommend you submit a bug to https://bugzilla.opensuse.org so that someone can investigate what’s happening.

TSU

Hi tsu,
just to be sure before opening an issue: The Mail_Mime (1.10.6) package is in the repo, but in the “noarch” subfolder, not in X86_64 as you mentioned.
You (still) think that this is a bug?

Rgds,
Michael

“php-pear-Mail_Mime” is located in <https://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Leap_15.1/noarch/>.
[HR][/HR]Some examples of using the Zypper search for available versions of a package – German repository naming:


 > LANG=C zypper search --match-exact --type package --details kernel-default
Loading repository data...
Reading installed packages...

S  | Name           | Type    | Version               | Arch   | Repository                     
---+----------------+---------+-----------------------+--------+--------------------------------
i+ | kernel-default | package | 4.12.14-lp151.28.36.1 | x86_64 | Hauptaktualisierungs-Repository
i+ | kernel-default | package | 4.12.14-lp151.28.32.1 | x86_64 | Hauptaktualisierungs-Repository
i+ | kernel-default | package | 4.12.14-lp151.28.25.1 | x86_64 | Hauptaktualisierungs-Repository
i+ | kernel-default | package | 4.12.14-lp151.28.20.1 | x86_64 | Hauptaktualisierungs-Repository
v  | kernel-default | package | 4.12.14-lp151.28.16.1 | x86_64 | Hauptaktualisierungs-Repository
v  | kernel-default | package | 4.12.14-lp151.28.13.1 | x86_64 | Hauptaktualisierungs-Repository
v  | kernel-default | package | 4.12.14-lp151.28.10.1 | x86_64 | Hauptaktualisierungs-Repository
v  | kernel-default | package | 4.12.14-lp151.28.7.1  | x86_64 | Hauptaktualisierungs-Repository
v  | kernel-default | package | 4.12.14-lp151.28.4.1  | x86_64 | Hauptaktualisierungs-Repository
v  | kernel-default | package | 4.12.14-lp151.27.3    | x86_64 | Haupt-Repository               
 > 
 > LANG=C zypper search --details pear-mail
Loading repository data...
Reading installed packages...

S | Name                     | Type       | Version          | Arch   | Repository                              
--+--------------------------+------------+------------------+--------+-----------------------------------------
  | php-pear-Mail            | package    | 1.4.1-lp151.1.1  | noarch | openSUSE BuildService - PHP:Applications
  | php-pear-Mail            | srcpackage | 1.4.1-lp151.1.1  | noarch | openSUSE BuildService - PHP:Applications
  | php-pear-Mail_Mime       | package    | 1.10.6-lp151.4.1 | noarch | openSUSE BuildService - PHP:Applications
  | php-pear-Mail_Mime       | srcpackage | 1.10.6-lp151.4.1 | noarch | openSUSE BuildService - PHP:Applications
  | php-pear-Mail_mimeDecode | package    | 1.5.6-lp151.1.1  | noarch | openSUSE BuildService - PHP:Applications
  | php-pear-Mail_mimeDecode | srcpackage | 1.5.6-lp151.1.1  | noarch | openSUSE BuildService - PHP:Applications
  | php7-pear-Mail_Mime      | package    | 1.10.1-lp151.2.1 | noarch | Haupt-Repository                        
 > 

[HR][/HR]So, yes, as far as the PHP MIME classes for the implementation interface for mail applications under the PEAR hierarchy is concerned, only those versions listed are currently available in the openSUSE repositories.
[HR][/HR]I looked for the PHP PEAR MIME packages for Mail on “the net{work}” and found this: <https://pear.php.net/package/Mail_Mime> – latest stable version 1.10.7.
Looking at <https://pear.php.net/package/Mail_Mime/download> I notice that, the previous versions can be downloaded.

  • Given that, we’re talking about PHP classes and that, the concerned package contains a couple of PHP source files in a /usr/share/ directory and, a XML source file in a /var/lib/ directory, it should not be too difficult to merge a previous version from the developer’s source to your local directories.
  • You’ll have to make sure that, the openSUSE package is locked – to avoid any updates via the openSUSE Repositories until such time that, the PHP PEAR developers have resolved the issue you’re experiencing.
  • You’ll also have to make sure that, within your environment, everyone is aware that, “zypper verify” and “rpm --verify” will complain about the checksums and everything else associated with the files related to that implementation interface …

Great thanks to all who answered!

My issue has been getting a little more complex than I’ve initially estimated. I’ve started to dig into this because after one of the recent upgrades of roundcubemail on my VPS I’ve recognized that my emails, or precisely the ones sent by roundcubemail, are getting “corrupted”. E.g. German umlauts after storing/sending. Character Set issue. Both for emails with content-type text/plain and also HTML. I’m usually trying to avoid HTML emails, but tried as potential workaround as plain text was corrupted. More worse with HTML, unreadable.

After opening my original issue for roundcubemail https://github.com/roundcube/roundcubemail/issues/7270, with great help of Aleksander, (one of?) the leading contributor of roundcubemail AND the PHP Mail_Mime module, we found out that my issue is very probably distro specififc, does not happen with plain vanilla roundcubemail.

So in fact my search for Mail_Mime 1.10.4 and maybe backwards was in fact useless, as our server:php:applications.repo based roundcubemail ships with a distro specific “vendor” subdirectory. Containing many things including a local pear installation… accessed first, of course.

I’ve opened a bugzilla issue for this, https://bugzilla.opensuse.org/show_bug.cgi?id=1166235, and I’ll wait if someone who is more inside php might have the time to take a look at it.

Again: Thanks to all who answered!

ANOTHER QUESTION: How could I avoid the tongue-out-smiley when adding the “server…applications.repo” when posting to this forum? :question:

You can’t – it’s a feature of the way the back-end interprets URLs …

Sorry, but wrong: you can use the ‘noparse’ and ‘/noparse’ tags ( like code tags, between square brackets ). See: [noparse]home:Dadada:Papapa[/noparse]

Well, I see below my editor panel a part Extra Options (or something like that) and it has a box “Switch smileys out in text”.
My question is: did you try that and did it not work as you intended?

Thanks. That’s useful to know.

It makes it easier for me to
[noparse]

explain how to use CODE tags

[/noparse]
(yes, I just used the “noparse” tags around the whole thing).

Thanks, but, where exactly is that documented?

  • [NOPARSE]“:D”[/NOPARSE] and [NOPARSE]“:P”[/NOPARSE] parsed: home:Dadada:Papapa
  • With “NOPARSE” tags: [NOPARSE]home:Dadada:Papapa[/NOPARSE]
  • And for michael_of
    : [NOPARSE]server:php:applications.repo[/NOPARSE]

I don’t remember, Don. Found it years ago when I wrote the stickies in the dutch subforums and wanted to show CODE tags.

:);):frowning:

This post with the checkbox “Switch off Smileys” checked.

Nice, I entered them by clicking on the smileys top-right and see hem as such in the edit space, but the preview (and thus the post) shows the characters.

And for this, I guess nobody needs documentation. It is right in front of you when you compose a post.

(Nevertheless, thanks for showing the existence of the NOPARSE tags).

Thanks Paul.

What I want to know is how to make “Disable smilies” my default setting; it is very annoying to have punctuation reinterpreted.