cannot remove repository

I am trying to remove some old repositories form SLES 11.3. If I try deleting with YAST it seems to work, but when I use YAST again to configure the repositories the ones I removed are back again. If I use ‘zypper rr’ to remove them it seems to work because ‘zypper lr’ does not show them anymore. However if I again use YAST to configure the repositories, the ones I removed are there again and if if run ‘zypper lr’ they are all back.

Hi chapan,

the repositories are actually configured as files in /etc/zypp/repos.d/ . You might want to check if the corresponding files there are actually deleted after runing “zypper rr” and if so, if they suddenly “re-appear” after invoking yast.

Might it be your site has some default repositories including a custom mechanism to restore them (by recreating the according files in /etc/zypp/repos.d/)?

Regards,
Jens

Me again - it might be interesting to see which repositories are auto-recreated… are those repositories belonging to some installed product (or even the SLES repositories themselves) or are we looking at non-standard external repositories (i.e. from build service or some other external source)?

REgards,
Jens

I am trying to delete repositories of older service packs:

[QUOTE]wasserv:/etc/zypp/repos.d # zypper rr SLES11-SP1-Updates
Removing repository ‘SLES11-SP1-Updates’ [done]
Repository ‘SLES11-SP1-Updates’ has been removed.[/QUOTE]

After I run command the entry is no longer in /etc/zypp/repos.d. If I the use yast to manage repositories is reappears in /etc/zypp.repos.d.

Hi chapan,

I am trying to delete repositories of older service packs:
After I run command the entry is no longer in /etc/zypp/repos.d. If I the use yast to manage repositories is reappears in /etc/zypp.repos.d.

this is strange enough to open a service request for. While you could of course further debug the issue (identify which YaST module actually causes this, check the YaST module source for details), SUSE support ought to be much quicker in resolving this issue.

If anyone else can share information or ideas, don’t hesitate to jump in :slight_smile:

Regards,
Jens

chapan wrote:
[color=blue]

I am trying to remove some old repositories form SLES 11.3. If I try
deleting with YAST it seems to work, but when I use YAST again to
configure the repositories the ones I removed are back again. If I use
‘zypper rr’ to remove them it seems to work because ‘zypper lr’ does not
show them anymore. However if I again use YAST to configure the
repositories, the ones I removed are there again and if if run ‘zypper
lr’ they are all back.[/color]

What happens if you use “zypper -r rr …” (-r is–rug-compatible)?

HTH.

Simon
SUSE Knowledge Partner

I tried ‘zypper -r rr’ but as soon as I use YAST software management the deleted repositories reappear.

Can you determine roughly when the repo re-appears? E.g. does it re-appear as soon as you run the Software Management module, or after you’ve quit the Software Management module. Does the repo re-appear if you any other YaST modules, or just Software Management? It seems curious that Software Management module would trigger it rather than say Software Repositories module which is used to modify repos. Software Management doesn’t, shouldn’t, modify repos, just install/remove packages,

You could try

$ strace -o yaststrace -f /sbin/yast2

Do something in YaST which causes the repo to re-appear, quit YaST then look through yaststrace to see if there’s a clue as to what’s happening. There will be a lot of noise in there, but it should be possible to see creation/access of the file for the mysteriously re-appearing repo in /etc/zypp/repos.d.

The repository reappears as soon as I open any software management function with yast. I ran the trace and it looks like yast tries to open the file, can’t find it, and then recreates it:

[QUOTE]19787 stat("/etc/zypp/repos.d/nu_novell_com:SLE11-SDK-SP1-Pool.repo", 0x7fff0209
c660) = -1 ENOENT (No such file or directory)
19787 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3559, …}) = 0
19787 uname({sys=“Linux”, node=“wasweb2”, …}) = 0
19787 stat("/var/log/YaST2/y2log", {st_mode=S_IFREG|0644, st_size=7569075, …})
= 0
19787 open("/var/log/YaST2/y2log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 29
19787 fstat(29, {st_mode=S_IFREG|0644, st_size=7569075, …}) = 0
19787 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7fe4c630e000
19787 fstat(29, {st_mode=S_IFREG|0644, st_size=7569075, …}) = 0
19787 lseek(29, 7569075, SEEK_SET) = 7569075
19787 write(29, “2013-11-15 12:46:16 <1> wasweb2(”…, 152) = 152
19787 close(29) = 0
19787 munmap(0x7fe4c630e000, 4096) = 0
19787 open("/etc/zypp/repos.d/nu_novell_com:SLE11-SDK-SP1-Pool.repo", O_WRONLY|O
_CREAT|O_TRUNC, 0666) = 29
19787 write(29, “[nu_novell_com:SLE11-SDK-SP1-Poo”…, 35) = 35
19787 write(29, "name=SLE11-SDK-SP1-Pool
", 24) = 24
19787 write(29, "enabled=0
", 10) = 10
19787 write(29, "autorefresh=1
", 14) = 14
19787 write(29, “baseurl=https://nu.novell.com/re”…, 100) = 100
19787 write(29, "type=NONE
", 10) = 10[/QUOTE]

Does look like that, doesn’t it. I’ve no idea why that could be happening though. Jens previously suggested logging a Service Request, are you able to do that?

I’ve duplicated this behaviour, albeit on SLED. If I remove any of nu_novell_com:SLED11-SP1-Pool nu_novell_com:SLED11-SP1-Updates nu_novell_com:SLED11-SP2-Core nu_novell_com:SLED11-SP2-Updates using ‘zypper -rr’ then as soon as I run either the ‘Software Repositories’ or ‘Software Management’ modules of YaST, the repos re-appear. If I delete the repos using the e ‘Software Repositories’ module, they get deleted. They are then re-created if I run either of the aforementioned modules again.

I suspect this is intended behaviour designed to protect against inadvertent breakage. Although with SLED 11 SP3, and as far as I know SLES 11 SP3 and the SLE-SDK (the repo in your strace output is /etc/zypp/repos.d/nu_novell_com:SLE11-SDK-SP1-Pool.repo) you should not have the SP1 or SP2 repos enabled, when I tried registering a SLED box with Novell Customer Centre (something I very very rarely bother to do as I have my own repo mirror), it added the SP1 and SP2 repos as disabled repos.

If I delete non nu_novell_com repos they stay deleted.

I opened a service log and was told this is a known problem and there will be fix in the future.

chapan wrote:
[color=blue]

I opened a service log and was told this is a known problem and there
will be fix in the future.[/color]

Do you know if a Technical Information Document (TID) was created so
others can be made aware of this issue?

If you don’t have a TID number, can you provide a Bug number or your SR
number and I’ll request that an appropriate TID be created?


Kevin Boyle - Knowledge Partner
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

I have had a similar problem with my SLESSP3 to SLESSP4 upgrade. The following bug gives similar symptoms where deleted repositories are added again.
Bug 1094739 - zypper tos reply a blank answer

Working this problem currently with support but this might help someone who stumbles across this topic doing a search.

Ken