= Recipes for common situations with UDD = == Update a package with patches to a new upstream version == Currently UDD maintains quilt patches in `debian/patches` in applied form in bzr, but the `merge-upstream` command does not know about this. As a result, if your package has (applied) patches, and you run `merge-upstream`, you will often end up with * merge conflicts as the sources are modified with the patches * patches do not unapply/reapply any more because the upstream version changed The clean way for handling this situation is to temporarily unapply the patches first: {{{ quilt pop -a rm -r .pc bzr commit -m 'unapply patches in preparation for new upstream release' bzr merge-upstream [...] # as usual }}} Review the upstream merge, add/update debian/changelog etc, and `debcommit`/`bzr commit`. Now you should walk through the patches to update them. Do `quilt push`. If it applies, go to the next patch, i. e. `quilt push`. If it does not apply, check if it was applied upstream, if so remove it from series and `debian/patches/` (also document it in the changelog). Otherwise, if the patch is still needed, but needs porting, do `quilt push -f`, resolve the `*.rej` and do `quilt refresh`. Now go to the next patch. Once all patches are updated and applied, do {{{ bzr add .pc bzr commit -m 'reapply patches after merging new upstream release' }}}