Duplicate of package names!
#1
Fri, 2017-01-13 09:18
Kalle
-
- Offline
- 1 year 2 months ago
- 2017-01-13
The package "py2-sphinx" is available in two versions, 1.4.9-r0 and 1.5.1-r0. The packages has the same name ("py2-sphinx")..
I get the old version but want to install the 1.5.1-r0 package instead.
Today i write "apk add py2-sphinx" but how do to get the other version of the py2-sphinx??
(Both of the packages is there for all the different architectures)
Hmm the add command shult acording to the dokumentation install the newest package! Why does i get the old one then?
"Add a Package
Use add to install packages from a repository. Any necessary dependencies are also installed. If you have multiple repositories, the add command installs the newest package."
source:
http://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Update_the_Package_list
i found also the:
apk update
apk upgrade
For example like: "apk add --upgrade py2-sphinx"
But non of them helped me to retrive the "latest" py2-sphinx... What more can i try?!
Ahhh this is tiresome!
The dokumentation have to be all off!
It states:
"Advanced APK Usage
Holding a specific package back
In certain cases, you may want to upgrade a system, but keep a specific package at a back level. It is possible to add "sticky" or versioned dependencies. For instance, to hold the asterisk package to the 1.6.2 level or lower:
apk add asterisk=1.6.0.21-r0"
Source:
http://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Update_the_Package_list
I have tried then:
"apk add py2-sphinx=1.5.1-r0"
But I got error instead!!!
"ERROR: unsatisfiable constraints:
py2-sphinx-1.4.9-r0:
breaks: world[py2-sphinx=1.5.1-r0]"
py2-sphinx version 1.5.1-r0 is on edge main ( https://pkgs.alpinelinux.org/packages?name=py2-sphinx&branch=&repo=&arch=&maintainer= )
Uncomment the corresponding mirror (...alpine/edge/main...) in /etc/apk/repositories.
apk update
apk add py2-sphinx=1.5.1-r0
or apk upgrade py2-sphinx=1.5.1-r0
NB: if you want to make sure the good one will be installed before doing so, add --simulate and see if installation will work properly: apk --simulate upgrade py2-sphinx=1.5.1-r0
Thanks but it still do not work.
I tried your suggestion "apk upgrade py2-sphinx=1.5.1-r0" as seen below. It seams that it do not install it at all!
'''
$ apk update && apk upgrade py2-sphinx=1.5.1-r0 && apk add py2-yaml
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
v3.5.0-46-gdb19c120bc [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
v3.5.0-45-g73e309f355 [http://dl-cdn.alpinelinux.org/alpine/v3.5/community]
OK: 7955 distinct packages available
OK: 4 MiB in 11 packages
(1/12) Installing libbz2 (1.0.6-r5)
(2/12) Installing expat (2.2.0-r0)
(3/12) Installing libffi (3.2.1-r2)
(4/12) Installing gdbm (1.12-r0)
(5/12) Installing ncurses-terminfo-base (6.0-r7)
(6/12) Installing ncurses-terminfo (6.0-r7)
(7/12) Installing ncurses-libs (6.0-r7)
(8/12) Installing readline (6.3.008-r4)
(9/12) Installing sqlite-libs (3.15.2-r0)
(10/12) Installing python2 (2.7.13-r0)
(11/12) Installing yaml (0.1.7-r0)
(12/12) Installing py2-yaml (3.12-r0)
Executing busybox-1.25.1-r0.trigger
OK: 51 MiB in 23 packages
'''
And when it try to run it later on i get:
'''
$ ./build.sh
./build.sh: line 10: sphinx-apidoc: not found
./build.sh: line 12: make: not found
./build.sh: line 13: make: not found
'''
I think your repositories still don't include edge/main, otherwise after update, you would have
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
Did you edit the file /etc/apk/repositories to uncomment edge/main (remove the # at the beginning of the line) ?
Try:
echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories
apk update
apk upgrade py2-sphinx=1.5.1-r0
For information, package management is based on repositories ( https://help.ubuntu.com/community/Repositories/Ubuntu ) containing pre-compiled versioned programs for a specific distribution. This article is available for Alpine too and other distributions. You can find multiple sources of packages (main, edge, community, testing, for x86_64 architectures, for ARM, etc ...). Where you can find a specific version of a package depends on the status (stable, not official, not tested, etc.). You can also add your own repository containing your home-made packages ( http://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package ). All these things are well done on Alpine ! :-)
Thanks!
I have not comment anything. It is a CI job container in a gitlab environment. There i want to use Alpine.
i ran your suggestion and i got:
'''$ ./build.sh
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
v3.5.0-46-gdb19c120bc [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
v3.5.0-45-g73e309f355 [http://dl-cdn.alpinelinux.org/alpine/v3.5/community]
v3.5.0-566-g2399dd2a5a [http://dl-cdn.alpinelinux.org/alpine/edge/main]
OK: 13598 distinct packages available
(1/5) Upgrading musl (1.1.15-r5 -> 1.1.16-r2)
(2/5) Upgrading busybox (1.25.1-r0 -> 1.26.1-r2)
Executing busybox-1.26.1-r2.post-upgrade
(3/5) Upgrading zlib (1.2.8-r2 -> 1.2.10-r0)
(4/5) Upgrading musl-utils (1.1.15-r5 -> 1.1.16-r2)
(5/5) Upgrading libc-utils (0.7-r1 -> 0.7.1-r0)
Executing busybox-1.26.1-r2.trigger
OK: 4 MiB in 11 packages
./build.sh: line 14: sphinx-apidoc: not found
'''
Now the output is there of the "..APKINDEX.tar.gz". But it still do not install the sphinx :(
Ok my bad, your /etc/apk/repositories now contains the repository where your package is (at the correct version).
Did you
apk upgrade py2-sphinx=1.5.1-r0
?
This:
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
is the order specified in /etc/apk/repositories.
It means when you want to add a new package with a simple "apk add", apk will first look into v3.5 main repository if it can find the package. If not, then it will look into v3.5 community, and finally in edge main. Because the package is present in v3.5 main as v1.4.9-r0 and you distri is up to date with that one, apk will not look forward ==> no update.
When you do
apk upgrade py2-sphinx=1.5.1-r0
you force the version too. apk will look into v3.5 main, will not find it (only v1.4.9-r0 is available), then it will look into v3.5 community (no py2-sphinx is available in this one) and finally, it will find it into edge main, the repository you just added.
Ok good explanation!
Yes i did exactly as you suggested and pasted in among others:
apk upgrade py2-sphinx=1.5.1-r0
Then it has look in all 3 places and not found the package ==> package missing?!
That, I couldn't explain ... Try
apk del py2-sphinx
apk update
apk add py2-sphinx=1.5.1-r0
The package is here, i can see it when I apk --simulate add py2-sphinx=1.5.1-r0.
I need to go ( weekend ;-) ). Good luck, Kalle !
Thanks it looks that the del, update and add did it! (But why?)
Have a nice weekend!!
'''$ ./build.sh
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
v3.5.0-46-gdb19c120bc [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
v3.5.0-45-g73e309f355 [http://dl-cdn.alpinelinux.org/alpine/v3.5/community]
v3.5.0-575-g2305acbbe0 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
OK: 13598 distinct packages available
OK: 4 MiB in 11 packages
(1/32) Installing make (4.2.1-r0)
(2/32) Installing libbz2 (1.0.6-r5)
(3/32) Installing libpng (1.6.27-r0)
(4/32) Installing freetype (2.7.1-r0)
(5/32) Installing libjpeg-turbo (1.5.1-r0)
(6/32) Installing lcms2 (2.8-r0)
(7/32) Installing openjpeg (2.1.2-r1)
(8/32) Installing expat (2.2.0-r0)
(9/32) Installing libffi (3.2.1-r2)
(10/32) Installing gdbm (1.12-r0)
(11/32) Installing ncurses-terminfo-base (6.0-r7)
(12/32) Installing ncurses-terminfo (6.0-r7)
(13/32) Installing ncurses-libs (6.0-r7)
(14/32) Installing readline (6.3.008-r4)
(15/32) Installing sqlite-libs (3.16.0-r0)
(16/32) Installing python2 (2.7.13-r0)
(17/32) Installing tiff (4.0.7-r0)
(18/32) Installing libwebp (0.5.2-r0)
(19/32) Installing py2-pillow (3.4.2-r0)
(20/32) Installing py2-roman (2.0.0-r1)
(21/32) Installing py2-docutils (0.12-r3)
(22/32) Installing py2-markupsafe (0.23-r3)
(23/32) Installing py2-jinja2 (2.8-r1)
(24/32) Installing py2-pygments (2.1.3-r2)
(25/32) Installing py2-six (1.10.0-r5)
(26/32) Installing py2-sphinx_rtd_theme (0.1.9-r1)
(27/32) Installing py2-alabaster (0.7.9-r0)
(28/32) Installing py2-tz (2016.7-r0)
(29/32) Installing py2-babel (2.3.4-r1)
(30/32) Installing py2-snowballstemmer (1.2.1-r0)
(31/32) Installing py2-imagesize (0.7.1-r1)
(32/32) Installing py2-sphinx (1.5.1-r0)
Executing busybox-1.25.1-r0.trigger
'''
Well ... I just saw that if apk --simulate add py2-sphinx, it gives me v1.5.1-r0 too ...
I need to read the wiki again ... http://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
apk info py2-sphinx
gives both versions v1.4.9-r0 and v1.5.1-r0.
I think (not sure), if the package is already installed and the version fits with one found in the repos, apk considers it's up to date.
Otherwise, it will install the latest.
So my explaination was not good, it's not a sequence.
Finally you can force the repo by editing /etc/apk/repositories:
@v35_main http://nl.alpinelinux.org/alpine/v3.5/main
@edge_main http://nl.alpinelinux.org/alpine/v3.5/main
And then
apk --simulate add py2-sphinx@edge_main
gives v1.5.1-r0 and
apk --simulate add py2-sphinx@v35_main
gives v1.4.9-r0
Thank you Kalle, you made me reconsider my thinking about the package management :-)
First i tied the del and add but it failed:
'''
$ apk del py2-sphinx
OK: 51 MiB in 23 packages
$ apk add py2-sphinx=1.5.1-r0
ERROR: unsatisfiable constraints:
py2-sphinx-1.4.9-r0:
breaks: world[py2-sphinx=1.5.1-r0]
'''
And then the sugested @edge and del first:
'''
$ apk del py2-sphinx
OK: 51 MiB in 23 packages
$ apk add py2-sphinx@edge
WARNING: The repository tag for world dependency 'py2-sphinx@edge' does not exist
ERROR: Not committing changes due to missing repository tags. Use --force to override.
ERROR: Build failed: exit code 255
'''
Hmm did not go so good..
'''
$ apk -vv info|sort
alpine-baselayout-3.0.4-r0 - Alpine base dir structure and init scripts
alpine-keys-1.3-r0 - Public keys for Alpine Linux packages
apk-tools-2.6.8-r1 - Alpine Package Keeper - package manager for alpine
busybox-1.25.1-r0 - Size optimized toolbox of many common UNIX utilities
expat-2.2.0-r0 - An XML Parser library written in C
gdbm-1.12-r0 - GNU dbm is a set of database routines that use extensible hashing
libbz2-1.0.6-r5 - Shared library for bz2
libc-utils-0.7-r1 - Meta package to pull in correct libc
libffi-3.2.1-r2 - A portable, high level programming interface to various calling conventions.
libressl2.4-libcrypto-2.4.4-r0 - libressl libcrypto library
libressl2.4-libssl-2.4.4-r0 - libressl libssl library
musl-1.1.15-r5 - the musl c library (libc) implementation
musl-utils-1.1.15-r5 - the musl c library (libc) implementation
ncurses-libs-6.0-r7 - Ncurses libraries
ncurses-terminfo-6.0-r7 - Console display library
ncurses-terminfo-base-6.0-r7 - Descriptions of common terminals
py2-yaml-3.12-r0 - Python bindings for YAML (for python2)
python2-2.7.13-r0 - A high-level scripting language
readline-6.3.008-r4 - GNU readline library
scanelf-1.1.6-r0 - Scan ELF binaries for stuff
sqlite-libs-3.15.2-r0 - Sqlite3 library
yaml-0.1.7-r0 - YAML 1.1 parser and emitter written in C
zlib-1.2.8-r2 - A compression/decompression Library
$ apk del py2-sphinx
OK: 51 MiB in 23 packages
$ apk add --force py2-sphinx@edge
(1/22) Installing make (4.2.1-r0)
(2/22) Installing libpng (1.6.25-r0)
(3/22) Installing freetype (2.7-r0)
(4/22) Installing libjpeg-turbo (1.5.1-r0)
(5/22) Installing lcms2 (2.8-r0)
(6/22) Installing openjpeg (2.1.2-r1)
(7/22) Installing tiff (4.0.7-r0)
(8/22) Installing libwebp (0.5.2-r0)
(9/22) Installing py2-pillow (3.4.2-r0)
(10/22) Installing py2-roman (2.0.0-r1)
(11/22) Installing py2-docutils (0.12-r3)
(12/22) Installing py2-markupsafe (0.23-r3)
(13/22) Installing py2-jinja2 (2.8-r1)
(14/22) Installing py2-pygments (2.1.3-r2)
(15/22) Installing py2-six (1.10.0-r5)
(16/22) Installing py2-sphinx_rtd_theme (0.1.9-r1)
(17/22) Installing py2-alabaster (0.7.9-r0)
(18/22) Installing py2-tz (2016.7-r0)
(19/22) Installing py2-babel (2.3.4-r1)
(20/22) Installing py2-snowballstemmer (1.2.1-r0)
(21/22) Installing py2-imagesize (0.7.1-r1)
(22/22) Installing py2-sphinx (1.4.9-r0)
Executing busybox-1.25.1-r0.trigger
OK: 104 MiB in 45 packages
$ apk -vv info|sort
alpine-baselayout-3.0.4-r0 - Alpine base dir structure and init scripts
alpine-keys-1.3-r0 - Public keys for Alpine Linux packages
apk-tools-2.6.8-r1 - Alpine Package Keeper - package manager for alpine
busybox-1.25.1-r0 - Size optimized toolbox of many common UNIX utilities
expat-2.2.0-r0 - An XML Parser library written in C
freetype-2.7-r0 - TrueType font rendering library
gdbm-1.12-r0 - GNU dbm is a set of database routines that use extensible hashing
lcms2-2.8-r0 - Color Management Engine
libbz2-1.0.6-r5 - Shared library for bz2
libc-utils-0.7-r1 - Meta package to pull in correct libc
libffi-3.2.1-r2 - A portable, high level programming interface to various calling conventions.
libjpeg-turbo-1.5.1-r0 - accelerated baseline JPEG compression and decompression library
libpng-1.6.25-r0 - Portable Network Graphics library
libressl2.4-libcrypto-2.4.4-r0 - libressl libcrypto library
libressl2.4-libssl-2.4.4-r0 - libressl libssl library
libwebp-0.5.2-r0 - Libraries for working with WebP images
make-4.2.1-r0 - GNU make utility to maintain groups of programs
musl-1.1.15-r5 - the musl c library (libc) implementation
musl-utils-1.1.15-r5 - the musl c library (libc) implementation
ncurses-libs-6.0-r7 - Ncurses libraries
ncurses-terminfo-6.0-r7 - Console display library
ncurses-terminfo-base-6.0-r7 - Descriptions of common terminals
openjpeg-2.1.2-r1 - Open-source implementation of JPEG2000 image codec
py2-alabaster-0.7.9-r0 - Modified Kr Sphinx doc theme (for python2)
py2-babel-2.3.4-r1 - Python i18n tool (for python2)
py2-docutils-0.12-r3 - Documentation Utilities for Python (for python2)
py2-imagesize-0.7.1-r1 - Getting image size from png/jpeg/jpeg2000/gif file (for python2)
py2-jinja2-2.8-r1 - A small but fast and easy to use stand-alone python template engine (for python2)
py2-markupsafe-0.23-r3 - Implements a XML/HTML/XHTML Markup safe string (for python2)
py2-pillow-3.4.2-r0 - A Python Imaging Library (for python2)
py2-pygments-2.1.3-r2 - A syntax highlighting package written in Python. (for python2)
py2-roman-2.0.0-r1 - Integer to Roman numerals converter (for python2)
py2-six-1.10.0-r5 - Python 2 and 3 compatibility library (for python2)
py2-snowballstemmer-1.2.1-r0 - Snowball stemming library collection for Python (for python2)
py2-sphinx-1.4.9-r0 - Python Documentation Generator (for python2)
py2-sphinx_rtd_theme-0.1.9-r1 - Sphinx theme for readthedocs.org (for python2)
py2-tz-2016.7-r0 - A Python definitions of world timezone (for python2)
py2-yaml-3.12-r0 - Python bindings for YAML (for python2)
python2-2.7.13-r0 - A high-level scripting language
readline-6.3.008-r4 - GNU readline library
scanelf-1.1.6-r0 - Scan ELF binaries for stuff
sqlite-libs-3.15.2-r0 - Sqlite3 library
tiff-4.0.7-r0 - Provides support for the Tag Image File Format or TIFF
yaml-0.1.7-r0 - YAML 1.1 parser and emitter written in C
zlib-1.2.8-r2 - A compression/decompression Library
$ apk add py-setuptools && apk add py2-pip
WARNING: The repository tag for world dependency 'py2-sphinx@edge' does not exist
ERROR: Not committing changes due to missing repository tags. Use --force to override.
$ apk --no-cache add musl-dev linux-headers g++
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
WARNING: The repository tag for world dependency 'py2-sphinx@edge' does not exist
ERROR: Not committing changes due to missing repository tags. Use --force to override.
ERROR: Build failed: exit code 255
'''
This is strange. Now i try with --force like the output suggested. And it installs old version (py2-sphinx-1.4.9-r0)! And after that is done and next command of apk add .. is executed it starts to complain.
But anyhow can anybody confirm that py2-sphinx v1.5.1-r0 package for x86_64 are there at all!??
Maybe the problem that when i do "update" it is not looking at all in edge! It is only looking in main and community. And later on when trying to install it will fail becuse it do not have any information abut edge. How to force it to also look at edge during update?
'''
$ apk update && apk add py2-yaml
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
v3.5.0-48-g8042937a2f [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
v3.5.0-48-g8042937a2f [http://dl-cdn.alpinelinux.org/alpine/v3.5/community]
OK: 7955 distinct packages available
(1/12) Installing libbz2 (1.0.6-r5)
(2/12) Installing expat (2.2.0-r0)
(3/12) Installing libffi (3.2.1-r2)
(4/12) Installing gdbm (1.12-r0)
(5/12) Installing ncurses-terminfo-base (6.0-r7)
(6/12) Installing ncurses-terminfo (6.0-r7)
(7/12) Installing ncurses-libs (6.0-r7)
(8/12) Installing readline (6.3.008-r4)
(9/12) Installing sqlite-libs (3.15.2-r0)
(10/12) Installing python2 (2.7.13-r0)
(11/12) Installing yaml (0.1.7-r0)
(12/12) Installing py2-yaml (3.12-r0)
Executing busybox-1.25.1-r0.trigger
OK: 51 MiB in 23 packages
$ apk add py2-sphinx=1.5.1-r0
ERROR: unsatisfiable constraints:
py2-sphinx-1.4.9-r0:
breaks: world[py2-sphinx=1.5.1-r0]
'''
Ups, of some reason the change the version number during the weekend from 1.5.1-r0 to 1.5.1-r1. Yes it is bad to pursue a absolute version number :)
'''
(23/23) Installing py2-sphinx (1.5.1-r1)
'''
I think that i got it now to work! Used one of the tricks in the dokumentation:
'''
$ apk add py2-sphinx --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main --allow-untrusted
'''