7. Ein Paket hochladen¶
Once your merge proposal is reviewed and approved, you will want to upload your package, either to the archive (if you have permission) or to your Personal Package Archive (PPA). You might also want to do an upload if you are sponsoring someone else’s changes.
7.1. Eine eigene Änderung hochladen¶
Wenn du einen Branch mit einer Änderung hast, die Du hochladen möchtest, musst Du die Änderung in den Haupt-Branch integrieren, ein Quellpaket bauen und es hochladen.
Zuerst musst Du prüfen, ob Du die neueste Version des Pakets in Deinem Checkout des Entwicklungszweiges hast.
$ cd tomboy/tomboy.dev
$ bzr pull
This pulls in any changes that may have been committed while you were working
on your fix. From here, you have several options. If the changes on the
trunk are large and you feel should be tested along with your change you can
merge them into your bug fix branch and test there. If not, then you can
carry on merging your bug fix branch into the development trunk branch. As of
bzr 2.5 and bzr-builddeb 2.8.1, this works with just the standard merge
command:
$ bzr merge ../bug-12345
Für ältere Versionen von bzr kannst Du das merge-package
Kommando verwenden.
$ bzr merge-package ../bug-12345
Dies wird zwei Zweige mergen, dabei können Merge-Konflikte auftreten, die man manuell auflösen muss.
Als nächstes solltest Du sicherstellen, dass debian/changelog
wie gewünscht aussieht, mit der richtigen Distribution, Versionsnummer und so weiter.
Ist das einmal gemacht, solltest du die zu commitende Änderung mit bzr diff
überprüfen. Das sollte dieselben Unterschiede anzeigen wie debdiff bevor ein Quellpaket hochgeladen wird.
Im nächsten Schritt baut und testet man das modifizierte Paket, genau wie sonst auch:
$ bzr builddeb -S
When you’re finally happy with your branch, make sure you’ve committed all
your changes, then tag the branch with the changelog’s version number. The
bzr tag
command will do this for you automatically when given no
arguments:
$ bzr tag
Dieser Tag signalisiert dem Paketimporter, dass der Bazaar-Zweig denselben Inhalt hat wie das Archiv.
Jetzt kann man die Änderungen zurück nach Launchpad hochladen:
$ bzr push ubuntu:tomboy
(Ändere die Zieldistribution, falls Du einen SRU oder ähnliches hochlädst.)
You need one last step to get your changes uploaded into Ubuntu or your PPA;
you need to dput
the source package to the appropriate location. For
example, if you want to upload your changes to your PPA, you’d do:
$ dput ppa:imasponsor/myppa tomboy_1.5.2-1ubuntu5_source.changes
oder, wenn Du die Uploadrechte für das Primärachiv hast:
$ dput tomboy_1.5.2-1ubuntu5_source.changes
Jetzt kannst Du den Feature-Branch löschen. Er ist bereits gemerged, kann also von Launchpad heruntergeladen werden, wenn nötig.
7.2. Eine Änderung sponsorn¶
Sponsoring someone else’s change is just like the above procedure, but instead of merging from a branch you created, you merge from the branch in the merge proposal:
$ bzr merge lp:~subgenius/ubuntu/trusty/tomboy/bug-12345
Sollte es Merge-Konflikte geben, wirst Du den Autoren der Änderung wahrscheinlich bitten, diese zu lösen. Im nächsten Abschnitt wird beschrieben, wie man einen bevorstehenden Merge abbricht.
But if the changes look good, commit and then follow the rest of the uploading process:
$ bzr commit --author "Bob Dobbs <subgenius@example.com>"
7.3. Einen Upload abbrechen¶
At any time before you dput the source package you can decide to cancel an upload and revert the changes:
$ bzr revert
You can do this if you notice something needs more work, or if you would like to ask the contributor to fix up conflicts when sponsoring something.
7.4. Etwas sponsoren und eigene Änderungen beifügen¶
If you are going to sponsor someone’s work, but you would like to roll it up with some changes of your own then you can merge their work in to a separate branch first.
If you already have a branch where you are working on the package and you
would like to include their changes, then simply run the bzr merge
from
that branch, instead of the checkout of the development package. You can then
make the changes and commit, and then carry on with your changes to the
package.
If you don’t have an existing branch, but you know you would like to make changes based on what the contributor provides then you should start by grabbing their branch:
$ bzr branch lp:~subgenius/ubuntu/trusty/tomboy/bug-12345
then work in this new branch, and then merge it in to the main one and upload as if it was your own work. The contributor will still be mentioned in the changelog, and Bazaar will correctly attribute the changes they made to them.