Xiaoqiang0 (Talk | contribs) (→zypper) |
Xiaoqiang0 (Talk | contribs) (→Update repository creation) |
||
| Line 12: | Line 12: | ||
=== Update repository creation === | === Update repository creation === | ||
| - | You need to write additional updateinfo for your updaterepo. Example can be got from | + | You need to write additional updateinfo for your updaterepo. Example can be got from [[http://repo.meego.com/MeeGo/updates/1.1/core/repos/ia32/packages/repodata/41a49610180ccd7902a6e9e9f2fa1ec56e8de07f2e81cc6fec0aa562d21b11a1-updateinfo.xml.gz|Updateinfo.xml]] |
== Add a repo to MeeGo == | == Add a repo to MeeGo == | ||
This page describes the basic steps to create and update a Zypper repo that can be used with MeeGo systems.
Contents |
A useful repo should reside on a web server that your MeeGo client machines can access. The only requirement on the host server is that it runs an HTTP service and can share a directory. Either Linux or Windows IIS are fine. If you are using Windows as a web server, you do need another Linux machine to create and maintain the repo.
You need to write additional updateinfo for your updaterepo. Example can be got from [[1]]
Package Management subsystem responsible for repo management.
OBS always create a repo for each OBS project, for example project 'Trunk' have a repo http://download.meego.com/live/Trunk/standard/. and there's also a repo file named Trunk.repo. zypper can help to add the repo to meego system, commands as follows:
zypper addrepo http://download.meego.com/live/Trunk/standard/Trunk.repo
If the repo file does not exist, and we just know the repo base url (eg: http://download.meego.com/live/Trunk/standard/), pkcon command can help to add this repo, commands as follows:
#zypper addrepo -t rpm-md http://download.meego.com/live/Trunk/standard/ Trunk #cat /etc/zypp/repos.d/Trunk.repo [Trunk] name=Trunk enabled=1 autorefresh=0 baseurl=http://download.meego.com/live/Trunk/standard type=rpm-md keeppackages=0 #zypper addrepo --help //More infomation about adding repo
Local repo is useful, and it does not depend on http server, and can be used to update/install packages with complicate dependency.
You need to install createrepo first, and then prepare the RPMs you want to put them to repo:
cp XX/YY/*.rpm . createrepo .
#zypper addrepo -t plaindir file:///root/repo/ local #cat /etc/zypp/repos.d/local.repo [local] name=local enabled=1 autorefresh=0 baseurl=file:///root/repo/ type=plaindir keeppackages=0
If you want to list the package in your local repo, the follow command can helo you.
#zypper search --repo local
Once your repo is installed correctly in MeeGo, next work would be update packages from repo. There're several way you can follow.
If your repo is official update repo, you can use this method to update patches, but for package update, you'd better use command line tool, such as pkcon or zypper.
pkcon get-updates # list the avaliable updates pkcon update [package name or patch name]
zypper list-patches, lp # List needed patches. zypper list-updates, lu # List available updates. zypper update, up # Update installed packages with newer versions
You can get more information from 'zypper update --help'. For example, you can use -t option to specify a patch or package.