summaryrefslogtreecommitdiff
path: root/Debian
Commit message (Collapse)AuthorAge
* setup_sigwarn: explain why "warnings" aren't fatal (though "warn" is)Ian Jackson2023-11-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: error handling: Prepare for use of evalIan Jackson2023-10-29
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Suppress unwanted messages from git-rebase.Ian Jackson2023-02-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects (fix): Don't *promise* that deliberatly will workIan Jackson2022-12-28
| | | | | | Maybe passing it will cause the server to find something else wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects (cleanup): Do hint addition in common message prepIan Jackson2022-12-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects: Prepare the error message for translationIan Jackson2022-12-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects: Move message construction to moduleIan Jackson2022-12-28
| | | | | | This will allow us to reuse it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit/gdr: playtrees: Provide function for gbp.confIan Jackson2022-05-28
| | | | | | | git-debrebase wants to mess with this. The config file is a way to pass options that doesn't rely on them actually being supported. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit/gdr: playtrees: Provide a gbp.confIan Jackson2022-05-28
| | | | | | | | | | | | | | | | This lets us override certain settings to make sure gbp behaves the way we want. So far, the only setting is "--ignore-new = false" which is there solely to catch bugs. As I wrote in #1005873 The difficulty [in this bug] is just the .pc directory. Perhaps dgit ought to remove it or move it aside, before running gbp pq. If we did that then we might want to explicitly *enable* the new checks. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Fix upstream_commitish_search APIIan Jackson2020-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | upstream_commitish_search used to return a commit. If it succeeded The caller could find the tag in $tried[-1]. Both callers relied on this unpleasant and error-prone API. In 0bb8e2a87e3c8b5be0fce5c2491b292e9273056e Dgit::upstream_commitish_search: fail if more than one tag exists the algorithm was changed to keep looking, so it can reject ambiguous situations. The result is that $tried[-1] is entirely wrong in the success case. (This is spotted by the tagupl-baredebian test.) It would have been possible to fix this by making upstream_commitish_search synthesise a suitable return value for putting in $tried, but that is absurd. Instead give this function a sensible calling convention. It now returns a list of the tag name (for messages etc.) and the commitish (for use). Change both call sites. CC: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit::upstream_commitish_search: fail if more than one tag existsSean Whitton2020-05-27
| | | | | | | | | We should not assume we know which the user wants to merge, as git-deborig does not. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Reported-by: David Bremner <bremner@debian.org> Reviewed-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit: Break out $tarball_f_ext_re.Ian Jackson2019-09-05
| | | | | | | | We are going to reuse this. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-playtree-setup: Rename from git-playtree-createIan Jackson2019-07-21
| | | | | | | The name is from when I thought it would actually mkdir. But it doesn't. No overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Abolish now-unused $t_local_git_cfg playtree_setup argIan Jackson2019-07-21
| | | | | | | | | | | This was there so that dgit's -c options would be honoured here. But now, we get this information via @git, which dgit adds -c options to, which we pass to git-playtree-create by invoking it via git. So this is no longer used and can be abolished. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-playtree-setup: Rewrite in shell and call it from PerlIan Jackson2019-07-21
| | | | | | | | | | We want this because git-debpush is going to want this functionality but doesn't want to include (or have a copy of) Dgit.pm. The installation arrangements are rather ugly. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* Dgit.pm: Provide @gitIan Jackson2019-07-21
| | | | | | | | | This clears the way for some parts of Dgit.pm to honour dgit's git invocation conventions. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Update copyright notices in many filesIan Jackson2019-07-20
| | | | | | Mostly, adding 2019. Also adding some missing credits to Sean Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: printcmd: Print in one goIan Jackson2019-07-17
| | | | | | | | | | | | | | | | | | | | | | | Sometimes this message is used to report failure of `git fetch' etc. But when such operations fail, they may interleave output from the remote git, which typically prints fatal: The remote end hung up unexpectedly (referring to the local end as the `remote' end, from its point of view), after the the local end printed its message and failed. This sets up a race between Dgit.pm's printcmd and the message from the remote. If we're really unlucky, the remote's message interrupts the output from printcmd. We can avoid the within-line interleaving - at least, the interruption of our message - by printing the whole message in one go, so do that. (Strictly, the approach we use here only ensures that the message appears in a single write(2) call if it fits in the stdio buffer.) One of our test cases (tagupl) depends on this message not being split and has a small chance of failing without this fix. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: resolve_upstream_version: Report tag, where sensibleIan Jackson2019-07-17
| | | | | | | | | | | | | This affect what is show in commit messages (including the parseable parts) made by dgit and git-debrebase. Now they prefer to refer to the tag name if the caller specified refs/tags/ and the tag name is a nice one. This is not expected to make much difference for human callers (who will probably not explicitly qualify their tag refs). But it will make a difference for scripts. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: reflog_cache_insert: Use ensurepath for the reflogIan Jackson2019-07-17
| | | | | | Otherwise quilt fixup can fail in a too-fresh git tree. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Provide `ensurepath'Ian Jackson2019-07-17
| | | | | | | | | | Like `ensuredir' but also a bit like a more controlled `mkdir -p'. We use make_path from File::Path. It dies on failure. No caller yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move $suite_re from dgitIan Jackson2019-07-06
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: read_tree_*: Treat '' as meaning 'delete this'Ian Jackson2019-06-30
| | | | | | No functional change with existing callers. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: resolve_upstream_version: Return a message tooIan Jackson2019-06-29
| | | | | | No functional change for existing callers. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move hash_commit from dgitIan Jackson2019-06-29
| | | | | | No functional change other than to no longer honour @git. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move make_commit (git-commit-tree wrapper) from gdrIan Jackson2019-06-29
| | | | | | No functional change other than to no longer honour @git. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Rename various *make_commit* to *hash_commit*Ian Jackson2019-06-29
| | | | | | | | This avoids a subroutine name clash with make_commit in gdr. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move read-tree wrappers from git-debrebaseIan Jackson2019-06-29
| | | | | | No functional change other than to no longer honour @git. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move resolve_upstream_version from git-debrebaseIan Jackson2019-06-29
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move upstream_commitish_search from git-debrebaseIan Jackson2019-06-29
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Tidying up after tag format: Drop debiantag_oldIan Jackson2019-06-28
| | | | | | | | | The one remaining call site was in debiantags, where debiantag_maintview is (also) correct. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Replace `confess $!' with `confess "$!"', to actually print errnoIan Jackson2019-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ perl -e 'use Carp; open X, ">/dev/eacces" or die $!' Permission denied at -e line 1. $ perl -e 'use Carp; open X, ">/dev/eacces" or confess $!' at -e line 1. $ perl -e 'use Carp; open X, ">/dev/eacces" or confess "$!"' Permission denied at -e line 1. $ confess will get references to its arguments in @_. Its documentation says it saves/restores $!. I conjecture that these interact as we see here: $ perl -e '$!=1; sub x { print ">@_<\n"; } x $!;' >Operation not permitted< $ perl -e '$!=1; sub x { local $!; print ">@_<\n"; } x $!;' >< Quoting "$!" averts the reference (and it will also ensure that we get the string value of $!, in case confess were to do anything in the future which would mess that up). This commit was made like this: perl -i -pe 's/confess \$!/confess "\$!"/g' dgit perl -i -pe 's/confess \$!/confess "\$!"/g' git-debrebase perl -i -pe 's/confess \$!/confess "\$!"/g' Debian/Dgit.pm I have manually reviewed each hunk and it all looks good to me. Closes: #929549 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Allow uppercase (ascii) letters in multi-orig componentsIan Jackson2019-01-06
| | | | | | | | | | | | | | We didn't recognise files like firefox-esr_60.4.0esr.orig-l10n-sv-SE.tar.bz2 as orig files. As a result, dgit would see all the things in the corresponding subdirectory as having been added in Debian changes, leading it making inaccurate complaints and bombing out. See also #918438 against policy, where I (effectively) argue that this is a design error in the `3.0 (quilt)' format. Closes: #916926 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* changedir_git_toplevel: Special error for not in git treeIan Jackson2018-10-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move changedir_git_toplevel from git-debrebaseIan Jackson2018-10-11
| | | | | | NFC other than hardcoded qw(git). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: rename_link_xf: Avoid copying if src is a link to dstIan Jackson2018-10-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: rename_link_xf: Always use cpIan Jackson2018-10-11
| | | | | | If we use mv on a symlink, it moves the link, not the file. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: rename_link_xf: Minor style fixIan Jackson2018-10-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Provide rename_link_xfIan Jackson2018-10-11
| | | | | | This will be used for cross-filesystem support. No callers yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: git_cat_file: When passed undef, crash with \n at endIan Jackson2018-10-09
| | | | | | | | | Interpolating $objname into this string means that the crash occors before "GCFF>| " has been "printed" - but actually sits in a stdio buffer, waiting to appear after the output from confess. Reported-by: Mattia Rizzolo <mattia@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: reflog_cache_lookup: Replace `confess' with `die' after execIan Jackson2018-10-02
| | | | | | | | | | | | | | With `confess' after `exec', perl complains Statement unlikely to be reached at /usr/share/perl5/Debian/Dgit.pm line 770. (Maybe you meant system() when you said exec()?) The error message's suggestion is not right here - what is wrong is that confess is not really appropriate in the child in this way. Replace it with die, using a better error string. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Dgit.pm: mark final batch of messages (2)Ian Jackson2018-10-01
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: parsecontrol: Improve error message for failed openIan Jackson2018-10-01
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Split here doc for reflog cache commit message (nfc)Ian Jackson2018-10-01
| | | | | | This will make the translation markup auditable. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Improve message for control file parse failureIan Jackson2018-10-01
| | | | | | Use fail rather than die. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Improve symlink failure messageIan Jackson2018-10-01
| | | | | | | Use fail rather than die, and print a newline. This is used sometimes to link origs etc. Hopefully if this fails the user will know why. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Replace many die calls with confessIan Jackson2018-10-01
| | | | | | | | As a rule of thumb, anything where we would end up printing the line number in Dgit.pm is wrong. Most of these are internal errors or unexpected syscall failures. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Dgit.pm: mark some of messages (1)Ian Jackson2018-10-01
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Improve getcwd failure messageIan Jackson2018-10-01
| | | | | | Don't print the pointless line number in Dgit.pm. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Provide i_ (identity function, tags for translation)Ian Jackson2018-09-30
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>