Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update a package? #62

Open
evandrocoan opened this issue Dec 27, 2019 · 3 comments
Open

How to update a package? #62

evandrocoan opened this issue Dec 27, 2019 · 3 comments

Comments

@evandrocoan
Copy link

I come here from transcode-open#22 where they said this support package upgrade, but they did not said how it can upgrade a package.

Look at help, I can only find a option to upgrade all packages:

  dist-upgrade             : to upgrade all packages that is installed.
                             This subcommand uses setup.exe

Currently I have gcc 7.3 instead, but I just saw there is gcc 8 available: https://cygwin.com/packages/summary/gcc-g++.html

What is the command to update gcc from 7.3 to 8?

I already tried just running apt-cyg install gcc-g++, but the gcc version still the same:

Professional@PROFESSIONAL-PC$ apt-cyg install gcc-g++

Cache directory is /.pkg-cache
Mirror is http://cygwin.mirror.constant.com
Updating setup.ini
--2019-12-26 23:17:28--  http://cygwin.mirror.constant.com/x86_64/setup.bz2
Resolving cygwin.mirror.constant.com (cygwin.mirror.constant.com)... 108.61.5.83
Connecting to cygwin.mirror.constant.com (cygwin.mirror.constant.com)|108.61.5.83|:80... connected.
HTTP request sent, awaiting response... 304 Not Modified
File ‘setup.bz2’ not modified on server. Omitting download.

--2019-12-26 23:17:28--  http://cygwin.mirror.constant.com/x86_64/setup.bz2.sig
Resolving cygwin.mirror.constant.com (cygwin.mirror.constant.com)... 108.61.5.83
Connecting to cygwin.mirror.constant.com (cygwin.mirror.constant.com)|108.61.5.83|:80... connected.
HTTP request sent, awaiting response... 304 Not Modified
File ‘setup.bz2.sig’ not modified on server. Omitting download.

gpg: assuming signed data in `setup.bz2'
gpg: Signature made Thu, Dec 26, 2019 19:15:06 ESAST using DSA key ID 676041BA
gpg: Good signature from "Cygwin <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 1169 DF9F 2273 4F74 3AA5  9232 A9A2 62FF 6760 41BA
signature verified: setup.bz2.sig
--2019-12-26 23:17:30--  http://cygwin.mirror.constant.com/x86_64/setup.ini
Resolving cygwin.mirror.constant.com (cygwin.mirror.constant.com)... 108.61.5.83
Connecting to cygwin.mirror.constant.com (cygwin.mirror.constant.com)|108.61.5.83|:80... connected.
HTTP request sent, awaiting response... 200 OK
Server ignored If-Modified-Since header for file ‘setup.ini’.
You might want to add --no-if-modified-since option.

--2019-12-26 23:17:30--  http://cygwin.mirror.constant.com/x86_64/setup.ini.sig
Resolving cygwin.mirror.constant.com (cygwin.mirror.constant.com)... 108.61.5.83
Connecting to cygwin.mirror.constant.com (cygwin.mirror.constant.com)|108.61.5.83|:80... connected.
HTTP request sent, awaiting response... 304 Not Modified
File ‘setup.ini.sig’ not modified on server. Omitting download.

gpg: assuming signed data in `setup.ini'
gpg: Signature made Thu, Dec 26, 2019 19:15:01 ESAST using DSA key ID 676041BA
gpg: Good signature from "Cygwin <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 1169 DF9F 2273 4F74 3AA5  9232 A9A2 62FF 6760 41BA
signature verified: setup.ini.sig
Updated setup.ini
Package gcc-g++ is already installed, skipping
Professional@PROFESSIONAL-PC$
@kou1okada
Copy link
Owner

This question will be resolved with my answer at issue #48.

The latest version of gcc-g++(version 8.3.0-1) is in the [test] section not [curr].
But, I'm sorry, apt-cyg does not support selecting a section for install subcommand, yet.
Thus, you can not install it with apt-cyg directly.

However, you can resolve it with the least cost by using setup subcommand and a few GUI operations.

  1. Run below command:
apt-cyg setup -- -q -B -M -n -x gcc-g++ -P gcc-g++
  1. Click Reinstall and select 8.3.0-1 (Test) from pop up menu.
    image
  2. Click Next button to finish install.

If you want to check the section which packages are belongs, use describe subcommand as following:

$ apt-cyg -u describe gcc-g++
Cache directory is /cygdrive/c/Users/kou/Downloads/cygwin
Mirror is http://ftp.jaist.ac.jp/pub/cygwin
@ gcc-g++
sdesc: "GNU Compiler Collection (C++)"
ldesc: "The GNU Compiler Collection includes front ends for C, C++,
Objective-C, Fortran, Ada, and Go, as well as libraries for these
languages (libstdc++, libgcj,...)."
category: Devel
requires: cygwin gcc-core libgmp10 libiconv2 libintl8 libisl15 libmpc3 libmpfr6 libstdc++6 zlib0
version: 7.4.0-1
install: x86_64/release/gcc/gcc-g++/gcc-g++-7.4.0-1.tar.xz 12405804 7bd7861622c214710da4b3ff3304eb22b8c05c595f343610750a44bf5826ec27a4cd37623cfa20d48f40d07055b1a2e33eb0bab158fecef2e7fce310fb2e29a8
source: x86_64/release/gcc/gcc-7.4.0-1-src.tar.xz 62627316 28c56fb6c6b2b1e2248bac49d5cfa96bc48d9ba7f473e07a54f43e63f3aafeacb6acf6b2a139e9f01926551d4c0fdecae9c46d864599b24b6c0f4763a72321f9
depends2: cygwin, gcc-core, libgmp10, libiconv2, libintl8, libisl15, libmpc3, libmpfr6, libstdc++6, zlib0
[prev]
version: 7.3.0-3
install: x86_64/release/gcc/gcc-g++/gcc-g++-7.3.0-3.tar.xz 12379576 390d58d363c5eef45b796f6a20e784a81700a04b588a7af599fc95cff7fa6d35a99f350fd96c7430e18a5aa0df774fb225bac759958396c2fbe398b09e5d9a90
source: x86_64/release/gcc/gcc-7.3.0-3-src.tar.xz 62487856 cf93db46b32dce73ddc4b44ad253405ebfa16937340f0e59f7f0ddf0e2397faea6092c173d03f53b401d63e34e9a6b8d2f2911013dbb5d6dd146af1e84d61a07
depends2: cygwin, gcc-core, libgmp10, libiconv2, libintl8, libisl15, libmpc3, libmpfr6, libstdc++6, zlib0
[test]
version: 8.3.0-1
install: x86_64/release/gcc/gcc-g++/gcc-g++-8.3.0-1.tar.xz 15720920 902cb94cc224e98fba2b12429d7fc7a36329c139c124300dc730a04307228ef4e2f7f9fa7958ef8ac2ee12a991f5678f36046291c2569b53a91d6b9b02970adc
source: x86_64/release/gcc/gcc-8.3.0-1-src.tar.xz 63717648 d1bd8497bbda3e97413a33e71c3e13ee0c9eff3f610e219b99aac0a97a7a850c6204cd1c8d8579a85ddbfd81a1f20a5dc929dc09ddce5d88130c8d526715ce39
depends2: cygwin, gcc-core, libgmp10, libiconv2, libintl8, libisl15, libmpc3, libmpfr6, libstdc++6, zlib0

@evandrocoan
Copy link
Author

Thanks for the detailed answer!

@charlescanato
Copy link

Out of curiosity, this is nice when you need to select a specific version, since this is still not supported.

But, when you want to upgrade, isn't it "easier" to just remove and then install the package again?

I'd also love a one-package update feature, but so far, it seems to me that sticking to the command-line is still faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants