Managing repositories - Have added 28 repositories

I know that if the number of repositories exceeds 10 then we need to prioritize that. But I don’t know how.
I’ve have got 28 repositories added right now.

akash:~ # zypper lr -d
#  | Alias                         | Name                               | Enabled | Refresh | Priority | Type   | URI                                                                                         | Service
---+-------------------------------+------------------------------------+---------+---------+----------+--------+---------------------------------------------------------------------------------------------+--------
 1 | CrossToolchain:avr            | CrossToolchain:avr                 | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/CrossToolchain:/avr/openSUSE_13.2/                |        
 2 | LibreOffice_4.3-openSUSE_13.2 | openSUSE_13.2-LibreOffice_4.3      | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/LibreOffice:/4.3/openSUSE_13.2/                   |        
 3 | X11:Enlightenment:Factory     | X11:Enlightenment:Factory          | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/X11:/Enlightenment:/Factory/openSUSE_13.2/        |        
 4 | devel:languages:perl          | devel:languages:perl               | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_13.2/             |        
 5 | devel:languages:python        | devel:languages:python             | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_13.2/           |        
 6 | games:tools                   | games:tools                        | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/games:/tools/openSUSE_13.2/                       |        
 7 | home:Nemton                   | home:Nemton                        | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/Nemton/openSUSE_13.2/                       |        
 8 | home:malcolmlewis:TESTING     | home:malcolmlewis:TESTING          | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_13.2_Update/ |        
 9 | home:mreggie                  | home:mreggie                       | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/mreggie/openSUSE_13.2/                      |        
10 | home:srinidhi                 | home:srinidhi                      | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/srinidhi/openSUSE_13.2/                     |        
11 | openSUSE-13.2-0               | openSUSE-13.2-0                    | No      | No      |   99     | yast2  | hd:///?device=/dev/disk/by-id/scsi-1PHISON_USB3-part2                                       |        
12 | openSUSE:13.2                 | openSUSE:13.2                      | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/openSUSE:/13.2/standard/                          |        
13 | openSUSE_13.2-Bumblebee       | openSUSE_13.2-Bumblebee            | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_13.2/                     |        
14 | openSUSE_13.2-Education       | openSUSE_13.2-Education            | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/Education/openSUSE_13.2/                          |        
15 | openSUSE_13.2-electronics     | openSUSE_13.2-electronics          | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/electronics/openSUSE_13.2/                        |        
16 | openSUSE_13.2-games           | openSUSE_13.2-games                | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/games/openSUSE_13.2/                              |        
17 | openSUSE_13.2-libdvdcss       | openSUSE_13.2-libdvdcss            | Yes     | Yes     |   99     | rpm-md | http://opensuse-guide.org/repo/13.2/                                                        |        
18 | openSUSE_13.2-packman         | openSUSE_13.2-packman              | Yes     | Yes     |   99     | rpm-md | http://packman.inode.at/suse/openSUSE_13.2/                                                 |        
19 | openSUSE_13.2-science         | openSUSE_13.2-science              | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/science/openSUSE_13.2/                            |        
20 | openSUSE_13.2-wallpapers      | openSUSE_13.2-wallpapers           | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/artwork:/wallpapers/openSUSE_13.2/                |        
21 | repo-debug                    | openSUSE-13.2-Debug                | No      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/distribution/13.2/repo/oss/                              |        
22 | repo-debug-update             | openSUSE-13.2-Update-Debug         | No      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/update/13.2/                                             |        
23 | repo-debug-update-non-oss     | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/update/13.2-non-oss/                                     |        
24 | repo-non-oss                  | openSUSE-13.2-Non-Oss              | Yes     | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/13.2/repo/non-oss/                                |        
25 | repo-oss                      | openSUSE-13.2-Oss                  | Yes     | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/13.2/repo/oss/                                    |        
26 | repo-source                   | openSUSE-13.2-Source               | No      | Yes     |   99     | NONE   | http://download.opensuse.org/source/distribution/13.2/repo/oss/                             |        
27 | repo-update                   | openSUSE-13.2-Update               | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/update/13.2/                                                   |        
28 | repo-update-non-oss           | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/update/13.2-non-oss/    

Of 28, 5 are disabled.

That knowledge (if it was ever true) is outdated. Using priorities is something of the past.

We have now Vendor Stickiness, which is on by default. It means e.g. that when you did the “Change system packages to this Repositorie” for Packman, a package from Packman will not be overwritten by the same package from OSS, even if it has a newer version number.

So when you did the repo/vendor changing in the correct sequence (for those that have versions of the same package), you are ready.

BTW having 28 repos is a bit much. Do you realy need those? And do you realy need them Enabled all the time? IMHO it is a recipe for problems.

BTW on this system I have 17 repos of which 6 enabled: OSS, Non-OSS, Update-OSS, Update-Non-OSS, Packman and Printing (the last one only because of a problem and I guess disabling it will be OK). The disabled ones include libdvdcss and a few I only enable one or two times a year to see if they have newer version. But as long as everyting works, why should I go for newer versions?

So, after I do

zypper dup

, work done

IMHO it is a recipe for problems

What problems are we talking of.

The disabled ones include libdvdcss and a few I only enable one or two times a year to see if they have newer version. But as long as everyting works, why should I go for newer versions?

Nice idea.

Do you realy need those?

  1. CrossToolchain:avr - Arduino IDE
  2. LibreOffice_4.3-openSUSE_13.2 - Because of https://forums.opensuse.org/showthread.php/504354-Error-Installing-ooo2gd_3-0-1-oxt-on-LibreOffice?p=2696827
    Don’t know whether the bug has been solved or not
  3. X11:Enlightenment:Factory - Enlightenment 18
  4. devel:languages:perl, devel:languages:python - Came as free gift with arduino. Later many other packages migrated to these by “**zypper dup”
  5. games:tools - While installing steam. **Since, steam doesn’t work with proxy connection, I can do away with. But, “zypper dup” messed up.
  6. home:Nemton - maybe steam, can do away with
  7. home:malcolmlewis:TESTING - Somagic firmware
  8. home:mreggie - Don’t remember. How can I verify?
  9. home:srinidhi - openmotif
  10. openSUSE_13.2-Bumblebee - Bumblebee
  11. openSUSE_13.2-games - Games
  12. Education, Electronics, Science - How can I know which packages are subscribed to these?
  13. Others pacman and other default repos

So, How can I know which packages are subscribed to different repos?

Yast > Software > Software Management; then from the View menu: Repositories. Selecting a repo from the list will show you at right what is installed/available from that repo.

Hi,

You can check which repo a package belongs by using zypper.

zypper if package-name

To do that in every packages installed you can do

zypper se -is

Also maybe not related but you can see.

https://forums.opensuse.org/showthread.php/505555-Best-way-to-revert-full-repository-vendor-change?p=2696744#post2696744

To list packages from specific repos.

A comment and IMO about large number of repos…

Aside from the original OSS and non-OSS repos basic to all installations, the other repos are typically there to provide packages for special purposes… ie a development environment, a somewhat unusual deployment, apps for special use.

So, the question then becomes…
Do you do <all> those things <all> the time? Typically not. At least for me, I get involved in a project but that project has a definite life span. When it ends, it may be some time before I work on a similar project with similar requirements.

So, you can enable/disable your repos for the immediate tasks at hand.
Disabling (and disable refresh) can save immense time updating packages and apps unnecessarily when they’re not being used.

Disabling a repo can be easy. First list your repos, then you can modify a repo’s status by referencing its number.
eg

zypper lr

Followed by disabling one or more repos, the following disables and disables refresh the 8 and 10 repos

zypper mr --disable -R 8 10

and the following re-enables both repos

zypper mr --enable -r 8 10

IMO,
TSU

A bit off topic.

I wanted to know for a given repo what packages are installed.
This methods does it.

jetchisel’s method is also good but has alot of text.

Had to do

zypper se -is >> /home/akash/Documents/package_repo.txt

as all the packages were not displayed in konsole.

Then, I wanted to do a hack. Write the info in .ods or .csv so that I can sort the table/list not according to package name but according to repo name.
I did

zypper se -is >> /home/akash/Documents/package_repo.ods

and

zypper se -is >> /home/akash/Documents/package_repo.csv

But, when I open the file with libreoffice, I’m asked to import and importing doesn’t takes properly. While importing from .ods all the content is written in single cell but while importing from .csv the the content does go into different cells but it’s all haywire.

How can I import it properly.

jetchisel what does

do.

For me it just opens yast software management window.

Text is not magicaly transformed into an Open Document Spreadsheet or a Comma Separated Values file because you give it a file a name ending in .ods or .csv. For the same reason that

echo "duh" >duh.jpg

does not create a JPEG picture.

28 huh? Not bad. At one point I had over 100. But then I knew how to handle it.

Hi,

you can do

zypper --no-refresh se -si  | awk -F\|  '$1 ~ /^i/{print $2, $NF}'

To print the list to your screen aka stdout now if you want to print also to a file then you can do.

zypper --no-refresh se -si  | awk -F\|  '$1 ~ /^i/{print $2, $NF}' > >(tee list-packages.txt) 2>&1

That will save the list in the file named list-packages.txt

Now if you want something more advance format then modify the code.

:wink:

The basics about what jetchisel and I try to tell you is that you have the output to start from and then want it modified in another form (e.g. a Comma Separated Values list), which you then can import into LibreOffice Calc.

This is to be done by a combination of bash statements and the calls of clever tools. And jetchisel gives you a start using awk. I would start different, but that is not that important. One should start somewhere and then refine until one gets the result wanted.

I will also give you some starting hints.
Looking at the ouput (it is a bit long to post here), I see several lines we do not need: headings and lines mentioning “patch” instead of “product”. Thus first we go to remove those:

zypper se -is | grep '| package'

Then, to remove all superfluous spaces between the fields and to make it , separated:

zypper se -is | grep '| package' | sed 's/ *| /,/g'

Which brings us to this (a snippet):

i,mkfontdir,package,1.0.7-7.1.2,x86_64,openSUSE-13.1-Oss           
i,mkfontscale,package,1.1.1-2.1.2,x86_64,openSUSE-13.1-Oss           
i,mkinitrd,package,2.8.1-9.1,x86_64,openSUSE-13.1-Update        
i,mkvtoolnix,package,6.3.0-2.1.3,x86_64,openSUSE-13.1-Oss           
i,mobile-broadband-provider-info,package,20120614-4.1.2,noarch,openSUSE-13.1-Oss           
i,module-init-tools,package,3.15-11.1.2,x86_64,openSUSE-13.1-Oss           
i,moodbar,package,0.1.2-17.1.3,x86_64,openSUSE-13.1-Oss           
i,mozilla-js,package,17.0.10-1.1,x86_64,openSUSE-13.1-Oss           
i,mozilla-kde4-integration,package,0.6.4-4.1.1,x86_64,openSUSE-13.1-Oss           
i,mozilla-nspr,package,4.10.7-19.1,x86_64,openSUSE-13.1-Update        
i,mozilla-nss,package,3.17.2-47.2,x86_64,openSUSE-13.1-Update        
i,mozilla-nss-certs,package,3.17.2-47.2,x86_64,openSUSE-13.1-Update        
i,mpt-status,package,1.2.0-190.1.2,x86_64,openSUSE-13.1-Oss           
i,mpv,package,0.7.3-2.8,x86_64,(System Packages)           
i,mtools,package,4.0.18-3.1.4,x86_64,openSUSE-13.1-Oss           
i,multipath-tools,package,0.4.9-11.4.1,x86_64,openSUSE-13.1-Update        
i,myspell-american,package,20100316-32.1.2,noarch,openSUSE-13.1-Oss           
i,myspell-dutch,package,20091002-32.1.2,noarch,openSUSE-13.1-Oss           
i,nano,package,2.3.2-2.1.2,x86_64,openSUSE-13.1-Oss           
i,nano-lang,package,2.3.2-2.1.2,noarch,openSUSE-13.1-Oss           
i,ncurses-utils,package,5.9-33.1.2,x86_64,openSUSE-13.1-Oss

Do you like this as a starter?

Now I can save this in a file

zypper se -is | grep '| package' | sed 's/ *| /,/g' >/tmp/hurray

The above is all done as root, but

boven:~ # ll /tmp/hurray 
-rw-r--r-- 1 root root 130600 Feb 27 09:43 /tmp/hurray
boven:~ #

shows that it is readable by all. Thus I can use a normal user GUI session and start LibreOffice Calc from the main menu. Then from the main (left) menu there, I can choose Open … It will present you with an open file dialogue, surf to /tmp/hurray and click. LibreOffice will dtect that it’s contents looks very much like a CSV file and open a dialogue for you to adjust a few things. I did almost nothing there (removed the checks from the separator characters except from ,) and it loaded perfect.

Now to you to adjust this process to your needs. Come back when you need help.

Hi,

Nice csv format, so this is my awk version of it without sed and grep.

zypper se -is | awk -F\| '$1 !~ /^i/ && $3 !~ /package/{next}{gsub(/:space:]|]+/,",")}{print}'

:):slight_smile:
As you may have noticed, I do not realy like awk. But as I often say: In Unix/Linux there are always 100 different ways to do something and at least 75 of them are good ones (exaggaration of numbers here, saying 10 and 7 will also do!).

Hello vish_99,

It is now a few weeks ago that jetchisel and I tried to help you with statements to create a CSV file from your installed software packages. You never told us if it helped, or if you still have questios. Now it could be that you became ill or went on holiday or something like that, but since that time you started several new threads.

We are of course very curious if the effort we put into helping you had any positive results. Any reaction from you that you at least read what we posted and what yoy did with the information is encouraging for us to help you in the future.

Regards,

I have 7 repositories enable, good enough for all apps I need:

  • OSS
  • games:tools (for Steam)
  • Packaman
  • Main Update
  • AMD fglrx
  • security (for GUFW, ClamTK, unhide, rkhunter, bleachbit)
  • DVD repo

Sorry for extremely late reply:P

I modified it to

zypper se -is | grep '| package' | sed 's/ *| /,/g' >/home/akash/package.txt

Imported it in LibreOffice Calc, arranged repo names in ascending order. Later I searched each of the packages (from devel:languages: python, devel:languages: perl) manually and changed vendor in yast software management.

But soon I lost patience and migrated packages from devel:languages: python, devel:languages: perl to openSUSE-13.2-OSS by jetchisel’s thread. It downgraded the packages but, it’s not a problem.

Also, I disabled repo and repo auto-refresh of user repos, CrossToolchain:avr and openSUSE_13.2-libdvdcss.

So, now I’ve 25 repos added with only 14 repos enabled. I guess 14 repos are fine. Any comments.

akash:~ # zypper lr
#  | Alias                         | Name                               | Enabled | Refresh
---+-------------------------------+------------------------------------+---------+--------
 1 | CrossToolchain:avr            | CrossToolchain:avr                 | No      | No     
 2 | LibreOffice_4.3-openSUSE_13.2 | LibreOffice_4.3-openSUSE_13.2      | Yes     | Yes    
 3 | X11:Enlightenment:Factory     | X11:Enlightenment:Factory          | Yes     | Yes    
 4 | games:tools                   | games:tools                        | Yes     | Yes    
 5 | home:Nemton                   | home:Nemton                        | No      | No     
 6 | home:malcolmlewis:TESTING     | home:malcolmlewis:TESTING          | No      | No     
 7 | home:mreggie                  | home:mreggie                       | No      | No     
 8 | home:srinidhi                 | home:srinidhi                      | No      | No     
 9 | openSUSE-13.2-0               | openSUSE-13.2-0                    | No      | No     
10 | openSUSE:13.2                 | openSUSE:13.2                      | Yes     | Yes    
11 | openSUSE_13.2-Bumblebee       | openSUSE_13.2-Bumblebee            | Yes     | Yes    
12 | openSUSE_13.2-Education       | openSUSE_13.2-Education            | Yes     | Yes    
13 | openSUSE_13.2-electronics     | openSUSE_13.2-electronics          | Yes     | Yes    
14 | openSUSE_13.2-games           | openSUSE_13.2-games                | Yes     | Yes    
15 | openSUSE_13.2-libdvdcss       | openSUSE_13.2-libdvdcss            | No      | No     
16 | openSUSE_13.2-packman         | openSUSE_13.2-packman              | Yes     | Yes    
17 | openSUSE_13.2-science         | openSUSE_13.2-science              | Yes     | Yes    
18 | repo-debug                    | openSUSE-13.2-Debug                | No      | Yes    
19 | repo-debug-update             | openSUSE-13.2-Update-Debug         | No      | Yes    
20 | repo-debug-update-non-oss     | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes    
21 | repo-non-oss                  | openSUSE-13.2-Non-Oss              | Yes     | Yes    
22 | repo-oss                      | openSUSE-13.2-Oss                  | Yes     | Yes    
23 | repo-source                   | openSUSE-13.2-Source               | No      | Yes    
24 | repo-update                   | openSUSE-13.2-Update               | Yes     | Yes    
25 | repo-update-non-oss           | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes

Question:
What’s difference between disabling repo or disabling auto-refresh? What will happen if only repo is disabled and auto-refresh is enabled OR repo is enabled and auto-refresh is disabled?

There was a problem with this code. It ran for long time. Even though it had displayed all the packages, it had not stopped. I’d to Ctrl+C to stop it.

zypper --no-refresh se -si  | awk -F\|  '$1 ~ /^i/{print $2, $NF}' > >(tee list-packages.txt) 2>&1

That will save the list in the file named list-packages.txt
[/QUOTE]
Also, for this code I’d to do Ctrl+C plus I couldn’t find where it created list-packages.txt. I modified the code to

zypper --no-refresh se -si  | awk -F\|  '$1 ~ /^i/{print $2, $NF}' > >(tee /home/akash/list-packages.txt) 2>&1

Even then I couldn’t find list-packages.txt

Now if you want something more advance format then modify the code.

:wink:

To do more advanced stuff I’ll have to learn awk. I find grep command more easy to handle. :stuck_out_tongue:

A repo that is disables is more or less “not there”. You will see no packages available for installation in YaST > Software > Software management from such a repo. And the installed packages you have from that repo will be shown in red because they can not be linked to a repo they cam from. The only advantage is that you still have the full configuration available, thus a simple Enable will activate them.

Switching off Automatic Refresh means that when you start YaST > Softwarte Software Managemnt the repos (when Enabled) will not be refreshed (you can still do so by clicking or zypper ref). Thus info might be outdated. Usefull, when you want to work off-line with only local repos (so no access to remote repos tried). Or without any repo, you need no repo for some actions like removing. a package. After all slow internet connection might frustrate work in these cases.

Hi,

When dealing with installed packages by using the

**-i **

flag to zypper , something like

zypper se -i

The autorefresh is not needed.

If you disable a repository and search for packages using zypper, those packages in that repo is not listed in the search. The yast method was already explained by Henk.