PDA

View Full Version : Best way to add repos from SMT server?



allenb_1121
21-Mar-2012, 22:10
I can successfully manually add repos on my SMT server to a system by going into yast repositories, adding, and having it prompt me for a username/password. It doesn't matter what I enter there, because it will take anything. The repos add successfully, and a zypper lr shows them.
However, I would like to add them from the commandline and can't figure out how to do it.
Here is what I have tried (for example): zypper ar http://smt-server.oit.ua.edu/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-x86_64/ SLE11-SDK-SP2-Updates
The repo adds, but it doesn't actually work. Adding the -c options reveals the following output:
ualinux-test02:~ # zypper ar -c http://smt-server.oit.ua.edu/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-x86_64/ SLE11-SDK-SP2-Updates
Adding repository 'SLE11-SDK-SP2-Updates' [done]
Can't find a valid repository at given location:
[|] Repository type can't be determined.
Could not determine the type of the repository. Please check if the defined URIs (see below) point to a valid repository:http://smt-server.oit.ua.edu/repo//SLE11-SDK-SP2-Updates/sle-11-x86_64/

ualinux-test02:~ #

Maybe there is a better way?

Here is what I am trying to accomplish:
I want to write a script to add the new SP2 repos and then run "zypper dup"
If I manually add the repos in yast and run "zypper dup" all works fine.
The deployment guide is vague, but seems to imply that "suse_register -d 2" should add them - it only tries to re-add the SP1 repos that exist already.

Thoughts on what I'm missing/doing wrong?

Thanks.
Allen Beddingfield
Systems Engineer
The University of Alabama

malcolmlewis
21-Mar-2012, 22:34
I can successfully manually add repos on my SMT server to a system by
going into yast repositories, adding, and having it prompt me for a
username/password. It doesn't matter what I enter there, because it
will take anything. The repos add successfully, and a zypper lr shows
them.
However, I would like to add them from the commandline and can't figure
out how to do it.
Here is what I have tried (for example): zypper ar
http://smt-server.oit.ua.edu/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-x86_64/
SLE11-SDK-SP2-Updates
The repo adds, but it doesn't actually work. Adding the -c options
reveals the following output:
ualinux-test02:~ # zypper ar -c
http://smt-server.oit.ua.edu/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-x86_64/
SLE11-SDK-SP2-Updates
Adding repository 'SLE11-SDK-SP2-Updates' [done]
Can't find a valid repository at given location:
[|] Repository type can't be determined.
Could not determine the type of the repository. Please check if the
defined URIs (see below) point to a valid
repository:http://smt-server.oit.ua.edu/repo//SLE11-SDK-SP2-Updates/sle-11-x86_64/

ualinux-test02:~ #

Maybe there is a better way?

Here is what I am trying to accomplish:
I want to write a script to add the new SP2 repos and then run "zypper
dup"
If I manually add the repos in yast and run "zypper dup" all works
fine.
The deployment guide is vague, but seems to imply that "suse_register
-d 2" should add them - it only tries to re-add the SP1 repos that exist
already.

Thoughts on what I'm missing/doing wrong?

Thanks.
Allen Beddingfield
Systems Engineer
The University of Alabama



Hi
You need to add the -t option see zypper help ar

Something like;


zypper ar -t rpm-md -n "SLE11-SDK-SP2-Updates" http://smt-server.oit.ua.edu/repo//SLE11-SDK-SP2-Updates/sle-11-x86_64/ SLE11-SDK-SP2-Updates


--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 6 days 2:09, 3 users, load average: 0.03, 0.02, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

malcolmlewis
21-Mar-2012, 22:44
I can successfully manually add repos on my SMT server to a system by
going into yast repositories, adding, and having it prompt me for a
username/password. It doesn't matter what I enter there, because it
will take anything. The repos add successfully, and a zypper lr shows
them.
However, I would like to add them from the commandline and can't figure
out how to do it.
Here is what I have tried (for example): zypper ar
http://smt-server.oit.ua.edu/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-x86_64/
SLE11-SDK-SP2-Updates
The repo adds, but it doesn't actually work. Adding the -c options
reveals the following output:
ualinux-test02:~ # zypper ar -c
http://smt-server.oit.ua.edu/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-x86_64/
SLE11-SDK-SP2-Updates
Adding repository 'SLE11-SDK-SP2-Updates' [done]
Can't find a valid repository at given location:
[|] Repository type can't be determined.
Could not determine the type of the repository. Please check if the
defined URIs (see below) point to a valid
repository:http://smt-server.oit.ua.edu/repo//SLE11-SDK-SP2-Updates/sle-11-x86_64/

ualinux-test02:~ #

Maybe there is a better way?

Here is what I am trying to accomplish:
I want to write a script to add the new SP2 repos and then run "zypper
dup"
If I manually add the repos in yast and run "zypper dup" all works
fine.
The deployment guide is vague, but seems to imply that "suse_register
-d 2" should add them - it only tries to re-add the SP1 repos that exist
already.

Thoughts on what I'm missing/doing wrong?

Thanks.
Allen Beddingfield
Systems Engineer
The University of Alabama



Hi
You need to add the -t option see zypper help ar

Something like;


zypper ar -t rpm-md -n "SLE11-SDK-SP2-Updates"
http://smt-server.oit.ua.edu/repo//SLE11-SDK-SP2-Updates/sle-11-x86_64/
SLE11-SDK-SP2-Updates


This may be of help as well;
http://www.novell.com/communities/node/5922/keep-your-linux-desktops-and-servers-updated-subscription-management-tool-suse-linux-enter

--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 6 days 2:23, 4 users, load average: 0.00, 0.02, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

allenb_1121
22-Mar-2012, 14:30
Malcolm,
Thanks! Actually, I found that "better way" or should I say SUSE did. The migration package got release, so now suse_register adds the repos automatically. I think it had been released when I posted the message, but my SMT server had not synced yet.
Allen B.