Project

General

Profile

Bug #12798

zypper module arch and version specification for zypper commands is not correct

Added by Alexis MOUSSET 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Generic methods - Package Management
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
102
Tags:

Description

The command used by zypper module:

rpm -qa --qf "Name=%{name}\nVersion=%{version}-%{release}\nArchitecture=%{arch}\n" 

does not display epoch, which leads to a list of installed packaged without epoch.

So when specifying a version with epoch, install works but always returns an error.
If not specifying it, reporting works well but install will be able to install an exact version.

This needs to be fixed in zypper (and maybe rpm) repos at least.


Related issues

Related to ncf - Bug #12799: Force using epoch when installing a package with zypperReleased

Associated revisions

Revision 20773339 (diff)
Added by Alexis MOUSSET 6 months ago

Fixes #12798: Epoch in software versions is not stored by zypper module, which breaks version detection

History

#1 Updated by Alexis MOUSSET 6 months ago

  • Project changed from Rudder to ncf
  • Category changed from Agent to Generic methods - Package Management
  • Assignee set to Alexis MOUSSET

#2 Updated by Alexis MOUSSET 6 months ago

  • Tags set to Sponsored
  • User visibility changed from Operational - other Techniques | Technique editor | Rudder settings to Getting started - demo | first install | level 1 Techniques
  • Priority changed from 52 to 102

#3 Updated by Alexis MOUSSET 6 months ago

  • Status changed from New to In progress

#4 Updated by Alexis MOUSSET 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/ncf/pull/777

#5 Updated by Alexis MOUSSET 6 months ago

The same bug exists in yum module, but it has less consequences as yum allows installing a given version without epoch.

#6 Updated by Alexis MOUSSET 6 months ago

yum requires epoch at the beginning like:

1398866025:rudder-agent-4.1.10.release-1.EL.6.x86_64

So it is hard to fix as we don't want people to be forced to use an epoch, but allow to specify it.

#7 Updated by Alexis MOUSSET 6 months ago

  • Subject changed from Epoch in software versions is not stored by zypper (and yum?) module, which breaks version detection to Epoch in software versions is not stored by zypper module, which breaks version detection

#8 Updated by Alexis MOUSSET 6 months ago

  • Related to Bug #12799: Force using epoch when installing a package with zypper added

#9 Updated by Alexis MOUSSET 6 months ago

zypper on SLES10 appears to completely ignore epoch...

We will have to handle it differently depending on the zypper version...

#10 Updated by Alexis MOUSSET 6 months ago

Actually this is trickier:

zypper can identify a package with a specific version and without the epoch when the package comes from a repository, which is the most common case

# zypper install rudder-agent=4.0.7.release-1.SLES.12
Loading repository data...
Reading installed packages...
'rudder-agent=4.0.7.release-1.SLES.12' not found in package names. Trying capabilities.
'rudder-agent = 4.0.7.release-1.SLES.12' is already installed.
Resolving package dependencies...

Nothing to do.

So if we add epoch to version number, we would break some usecases.

#11 Updated by Alexis MOUSSET 6 months ago

  • Subject changed from Epoch in software versions is not stored by zypper module, which breaks version detection to zypper module arch and version specification for zypper commands is not correct

#12 Updated by Alexis MOUSSET 6 months ago

We have no simple way to handle epoch is version numbers, but it should not be necessary as Rudder makes no version comparisons and delegates it to zypper (which know epoch).

#13 Updated by Normation Quality Assistant 6 months ago

  • Assignee changed from Benoît PECCATTE to Alexis MOUSSET

#14 Updated by Alexis MOUSSET 6 months ago

  • Status changed from Pending technical review to Pending release

#15 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.13, 4.2.7 and 4.3.3 which were released today.

Also available in: Atom PDF