1
     ˆÀ�þBì‹7) ä�n1ˆ þÔ381Ó¿ÂÑ }    //
// unyield.hpp
// ~~~~~~~~~~~
//
// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifdef reenter
# undef reenter
#endif

#ifdef yield
# undef yield
#endif

#ifdef fork
# undef fork
#endif
  6   ˆl–äY>”Ên-ji@¿pB¸ÈÅ£�þBû�,à„ãñŒBy÷�üÿÕƒq°5ÔÃÒ h    #!/usr/bin/perl

# transition-check: Check whether a given source package is involved
# in a current transition for which uploads have been blocked by the
# Debian release team
#
# Copyright 2008 Adam D. Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

=head1 NAME

transition-check - check a package list for involvement in transitions

=head1 SYNOPSIS

B<transition-check> B<--help>|B<--version>

B<transition-check> [B<-f>|B<--filename=>I<FILENAME>] [I<source package list>]

=head1 DESCRIPTION

B<transition-check> checks whether any of the listed source packages
are involved in a transition for which uploads to unstable are currently
blocked.

If neither a filename nor a list of packages is supplied, B<transition-check>
will use the source package name from I<debian/control>.

=head1 OPTIONS

=over 4

=item B<-f>, B<--filename=>I<filename>

Read a source package name from I<filename>, which should be a Debian
package control file or I<.changes> file, and add that package to the list
of packages to check.

=back

=head1 EXIT STATUS

The exit status indicates whether any of the packages examined were found to
be involved in a transition.

=over 4

=item 0Z<>

Either B<--help> or B<--version> was used, or none of the packages examined
was involved in a transition.

=item 1Z<>

At least one package examined is involved in a current transition.

=back

=head1 LICENSE

This code is copyright by Adam D. Barratt <I<adam@adam-barratt.org.uk>>,
all rights reserved.

This program comes with ABSOLUTELY NO WARRANTY.
You are free to redistribute this code under the terms of the GNU
General Public License, version 2 or later.

=head1 AUTHOR

Adam D. Barratt <I<adam@adam-barratt.org.uk>>

=cut

use warnings;
use strict;
use Getopt::Long qw(:config bundling permute no_getopt_compat);
use File::Basename;

my $progname = basename($0);

my ($opt_help, $opt_version, @opt_filename);

GetOptions(
    "help|h"       => \$opt_help,
    "version|v"    => \$opt_version,
    "filename|f=s" => sub { push(@opt_filename, $_[1]); },
  )
  or die
"Usage: $progname [options] source_package_list\nRun $progname --help for more details\n";

if ($opt_help)    { help();    exit 0; }
if ($opt_version) { version(); exit 0; }

my ($lwp_broken, $yaml_broken);
my $ua;

sub have_lwp() {
    return ($lwp_broken ? 0 : 1) if defined $lwp_broken;
    eval {
        require LWP;
        require LWP::UserAgent;
    };

    if ($@) {
        if ($@ =~ m%^Can\'t locate LWP%) {
            $lwp_broken = "the libwww-perl package is not installed";
        } else {
            $lwp_broken = "couldn't load LWP::UserAgent: $@";
        }
    } else {
        $lwp_broken = '';
    }
    return $lwp_broken ? 0 : 1;
}

sub have_yaml() {
    return ($yaml_broken ? 0 : 1) if defined $yaml_broken;
    eval { require YAML::Syck; };

    if ($@) {
        if ($@ =~ m%^Can\'t locate YAML%) {
            $yaml_broken = "the libyaml-syck-perl