This file is indexed.

/usr/share/wajig/debfile-deps.py is in wajig 2.13.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/python3

# This file is part of wajig.  The copyright file is at debian/copyright.

import sys

import apt
from apt.debfile import DebPackage


def show_dependencies(debfile):

    install, remove, unauthenticated = debfile.required_changes
    prefix = "In order to allow installation of"

    if unauthenticated:
        # me not know what should happen here
        # awaiting bug report :)
        print ("The following are UNAUTHENTICATED: ", end="")
        for package_name in unauthenticated:
            print(package_name + " ", end=" ")
        print()

    if remove:
        print ("{} {}, the following is to be REMOVED: ".format(
                prefix, debfile.pkgname), end="")
        for package_name in remove:
            print(package_name + " ", end=" ")
        print()

    if install:
        print ("{} {}, the following is to be INSTALLED: ".format(
                prefix, debfile.pkgname), end="")
        for package_name in install:
            print(package_name, end=" ")
        print()


def main(package):
    cache = apt.Cache()
    debfile = DebPackage(package, cache=cache)
    if debfile.check():
        show_dependencies(debfile)
        prompt = "Do you want to continue [Y/n]? "
        choice = input(prompt)
        if "y" == choice.lower() or not choice:
            try:
                cache.commit(apt.progress.text.AcquireProgress())
            except apt.cache.FetchFailedException as e:
                print(e)
        else:
            print("Abort.")


if __name__ == "__main__":
    main(sys.argv[1])