~ubuntu-branches/ubuntu/oneiric/sbuild/oneiric

« back to all changes in this revision

Viewing changes to lib/Sbuild/DB/Info.pm

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2011-05-01 16:55:16 UTC
  • mfrom: (8.1.19 upstream) (3.3.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110501165516-8g3uwrnhv2bzjt8y
Tags: 0.62.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/patches/do-not-install-debfoster-into-chroots.patch: 
    do not install debfoster into the chroots because it is in universe and 
    not needed for package building itself.
  - debian/patches/run-pre-build-hooks-as-root.patch: 
    run pre-build hooks as root (Closes: #607228)
* Now that the package uses a patch system, don't modify the files directly;
  instead, put the changes in the respective patches and add the DEP-3
  patch tagging guidelines to them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# DBInfo.pm: Database abstraction
3
 
# Copyright © 1998      Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
4
 
# Copyright © 2005      Ryan Murray <rmurray@debian.org>
5
 
# Copyright © 2005-2008 Roger Leigh <rleigh@debian.org>
6
 
#
7
 
# This program is free software: you can redistribute it and/or modify
8
 
# it under the terms of the GNU General Public License as published by
9
 
# the Free Software Foundation, either version 2 of the License, or
10
 
# (at your option) any later version.
11
 
#
12
 
# This program is distributed in the hope that it will be useful, but
13
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
# General Public License for more details.
16
 
#
17
 
# You should have received a copy of the GNU General Public License
18
 
# along with this program.  If not, see
19
 
# <http://www.gnu.org/licenses/>.
20
 
#
21
 
#######################################################################
22
 
 
23
 
package Sbuild::DB::Info;
24
 
 
25
 
use Sbuild qw(debug isin);
26
 
 
27
 
use strict;
28
 
use warnings;
29
 
 
30
 
BEGIN {
31
 
    use Exporter ();
32
 
    our (@ISA, @EXPORT);
33
 
 
34
 
    @ISA = qw(Exporter);
35
 
 
36
 
    @EXPORT = qw(category);
37
 
}
38
 
 
39
 
sub category ($);
40
 
 
41
 
my %short_category = (
42
 
    'u' => 'uploaded-fixed-pkg',
43
 
    'f' => 'fix-expected',
44
 
    'r' => 'reminder-sent',
45
 
    'n' => 'nmu-offered',
46
 
    'e' => 'easy',
47
 
    'm' => 'medium',
48
 
    'h' => 'hard',
49
 
    'c' => 'compiler-error',
50
 
    ''  => 'none'
51
 
);
52
 
 
53
 
sub category ($) {
54
 
    my $category = shift;
55
 
 
56
 
    if (!isin($category, values %short_category)) {
57
 
        $category = $short_category{$category}
58
 
    }
59
 
 
60
 
    return $category;
61
 
}