[opensuse] distribution upgrade sed problem
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, on <https://en.opensuse.org/SDB:System_upgrade> it says: The following command modifies all repos from the old to the new. Modify "15.0" if your current system is not 15.0: # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* Well, it does not work for me: Telcontar:/etc/zypp/repos.d # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* sed: couldn't edit /etc/zypp/repos.d/ANTIGUOS_REPOS: not a regular file Telcontar:/etc/zypp/repos.d # Yes, certainly I do have directories in that path. How do I change that sed command to work ignoring directories in there? I confess that sed syntax overloads my mind, so I need help. Meanwhile, I'm editing all those files by hand, one by one. - -- Cheers Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXaDKlhwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVO44An0n+FJZ11J3IzjcHzcJM XmVzTIUqAJ9+zSC20b0pBTtEP0EFUTI2Ja91Kw== =jnIq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
11.10.2019 21:31, Carlos E. R. пишет:
Hi,
on <https://en.opensuse.org/SDB:System_upgrade> it says:
The following command modifies all repos from the old to the new. Modify "15.0" if your current system is not 15.0:
# sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*
Well, it does not work for me:
Telcontar:/etc/zypp/repos.d # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* sed: couldn't edit /etc/zypp/repos.d/ANTIGUOS_REPOS: not a regular file Telcontar:/etc/zypp/repos.d #
Yes, certainly I do have directories in that path.
This path is not supposed to contain directories.
How do I change that sed command to work ignoring directories in there? I confess that sed syntax overloads my mind, so I need help.
Meanwhile, I'm editing all those files by hand, one by one.
-- Cheers
Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2019-10-11 at 21:55 +0300, Andrei Borzenkov wrote:
11.10.2019 21:31, Carlos E. R. пишет:
Hi,
on <https://en.opensuse.org/SDB:System_upgrade> it says:
The following command modifies all repos from the old to the new. Modify "15.0" if your current system is not 15.0:
# sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*
Well, it does not work for me:
Telcontar:/etc/zypp/repos.d # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* sed: couldn't edit /etc/zypp/repos.d/ANTIGUOS_REPOS: not a regular file Telcontar:/etc/zypp/repos.d #
Yes, certainly I do have directories in that path.
This path is not supposed to contain directories.
Well, here it contains a directory holding a directory for several prior distributions, since 11.4. And another temporary directory which has been there for a year. How was I going to know that the directory is supposed to not contain other subdirectories? - -- Cheers, Carlos E. R. (from openSUSE 15.0 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXaDYaRwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVWmcAnRGBWUfTD/LAOvD0FZO8 WainkgRMAJ9NiSIzPayM+ZADUNpic7ebP0Xk5A== =LOyP -----END PGP SIGNATURE-----
On Fri, 11 Oct 2019 20:31, Carlos E. R. wrote:
Hi,
on <https://en.opensuse.org/SDB:System_upgrade> it says:
The following command modifies all repos from the old to the new. Modify "15.0" if your current system is not 15.0:
# sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*
Well, it does not work for me:
Telcontar:/etc/zypp/repos.d # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* sed: couldn't edit /etc/zypp/repos.d/ANTIGUOS_REPOS: not a regular file Telcontar:/etc/zypp/repos.d #
Yes, certainly I do have directories in that path. How do I change that sed command to work ignoring directories in there? I confess that sed syntax overloads my mind, so I need help.
Meanwhile, I'm editing all those files by hand, one by one.
You personally know that the repo-files end in .repo? (A simple "ls /etc/zypp/repos.d/" should show that) So, simply correcting the glob in the sed line to end in "....repos.d/*.repo" would stop that problem. Ergo, the only mistake in the page would be the missing glob, as shown here in pseudo diff notation: - # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* + # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*.repo Have a nice day, - Yamaban. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2019-10-11 at 21:30 +0200, Yamaban wrote:
On Fri, 11 Oct 2019 20:31, Carlos E. R. wrote:
Hi,
...
You personally know that the repo-files end in .repo?
Yes, of course, but I did not attach both ends; I have thick moments, specially when there is a line with sed in it ;-)
(A simple "ls /etc/zypp/repos.d/" should show that) So, simply correcting the glob in the sed line to end in "....repos.d/*.repo" would stop that problem.
Ergo, the only mistake in the page would be the missing glob, as shown here in pseudo diff notation: - # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* + # sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*.repo
Thanks. I'll edit the page when I end the upgrade :-) - -- Cheers, Carlos E. R. (from openSUSE 15.0 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXaDcOhwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfV2uwAnAk+9iYrc71o4RICbkIG 09uwilpRAJ9AhyrB9iLLM3LTm4WU6ucZ2s/u1Q== =ZS1W -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Carlos E. R.
-
Yamaban