Bug 246883 - ports-mgmt/pkg: PKG REVISIONS limited with two characters not number
Summary: ports-mgmt/pkg: PKG REVISIONS limited with two characters not number
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-30 21:50 UTC by Please
Modified: 2020-05-30 22:52 UTC (History)
1 user (show)

See Also:
linimon: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Please 2020-05-30 21:50:55 UTC
I am producing packages in the format: ${PORTNAME}-${PORTVERSION}[_${PORTREVISION}][,${PORTEPOCH}]. 

When PORTREVISION is 99+ pkg manager does not respect packages. Maximum revision 99. 

'pkg upgrade' thinks it is 99 is the latest package revision in the repository even repository has a definition of higher numbers of 99. 

It might be in this part of the code: https://github.com/freebsd/pkg/blob/16207928cbdbd8e950071e6067f8bc5a0a621856/libpkg/pkg_version.c#L72  

Documentation does not state 99 limits:
PORTREVISION is a monotonically increasing value which is reset to 0 with every increase of DISTVERSION, typically every time there is a new official vendor release. If PORTREVISION is non-zero, the value is appended to the package name. [...]
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#5.2.3.1
Comment 1 Please 2020-05-30 22:19:26 UTC
How to repeat.
Create a repository with packages that have higher numbers in revision.

#pkg search appstore
appstore-1.0.125         SSO authentication method for Redmine
appstore-1.0.15_100      SSO authentication method for Redmine
appstore-1.0.15_101      SSO authentication method for Redmine
..
appstore-1.0.15_122      SSO authentication method for Redmine
appstore-1.0.15_18       SSO authentication method for Redmine
appstore-1.0.15_19       SSO authentication method for Redmine
..
appstore-1.0.15_99       SSO authentication method for Redmine

#pkg upgrade appstore
Updating internal_repo repository catalogue...
internal_repo repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.


The only solution to get the package installed is to install it again / update command does not work.

# pkg install appstore-1.0.125
Installed packages to be UPGRADED:
        appstore: 1.0.15_99 -> 1.0.125 [internal_repo]