Ejemplo n.º 1
0
        "--keep-configuration",
        action="store_true",
        default=False,
        help=
        "always keep local changes in configuration files (use with caution)")
    parser.add_argument("-v",
                        "--version",
                        action="version",
                        version="__DEB_VERSION__",
                        help="Display the current version")

    args = parser.parse_args()
    try:
        if args.refresh_cache:
            subprocess.run("sudo /usr/bin/mint-refresh-cache", shell=True)
        check = APTCheck()
        check.find_changes()

        blacklisted = []
        if os.path.exists("/etc/mintupdate.blacklist"):
            with open("/etc/mintupdate.blacklist") as blacklist_file:
                for line in blacklist_file:
                    line = line.strip()
                    if line.startswith("#"):
                        continue
                    blacklisted.append(line)
        if args.ignore:
            blacklisted.extend(args.ignore.split(","))

        updates = []
        for source_name in sorted(check.updates.keys()):
Ejemplo n.º 2
0
                        help="install recommended packages (use with caution)")
    parser.add_argument(
        "--keep-configuration",
        action="store_true",
        default=False,
        help=
        "always keep local changes in configuration files (use with caution)")
    parser.add_argument("-v",
                        "--version",
                        action="version",
                        version="__DEB_VERSION__",
                        help="Display the current version")

    args = parser.parse_args()
    try:
        check = APTCheck()
        if args.refresh_cache:
            check.refresh_cache()
        check.find_changes()

        blacklisted = []
        if os.path.exists("/etc/mintupdate.blacklist"):
            with open("/etc/mintupdate.blacklist") as blacklist_file:
                for line in blacklist_file:
                    line = line.strip()
                    if line.startswith("#"):
                        continue
                    blacklisted.append(line)

        updates = []
        for source_name in sorted(check.updates.keys()):
Ejemplo n.º 3
0
    group = parser.add_mutually_exclusive_group()
    group.add_argument("-k", "--only-kernel", action="store_true", help="only include kernel updates")
    group.add_argument("-s", "--only-security", action="store_true", help="only include security updates")
    parser.add_argument("-i", "--ignore", help="list of updates to ignore (comma-separated list of source package names). Note: You can also blacklist updates by adding them to /etc/mintupdate.blacklist, one source package per line. To ignore a specific version, use the format package=version.")
    parser.add_argument("-r", "--refresh-cache", action="store_true", help="refresh the APT cache")
    parser.add_argument("-d", "--dry-run", action="store_true", help="simulation mode, don't upgrade anything")
    parser.add_argument("-y", "--yes", action="store_true", help="automatically answer yes to all questions and always install new configuration files (unless you also use \"--keep-configuration\" option)")
    parser.add_argument("--install-recommends", action="store_true", help="install recommended packages (use with caution)")
    parser.add_argument("--keep-configuration", action="store_true", default=False, help="always keep local changes in configuration files (use with caution)")
    parser.add_argument("-v", "--version", action="version", version="__DEB_VERSION__", help="Display the current version")

    args = parser.parse_args()
    try:
        if args.refresh_cache:
            subprocess.run("sudo /usr/bin/mint-refresh-cache", shell=True)
        check = APTCheck()
        check.find_changes()

        blacklisted = []
        if os.path.exists("/etc/mintupdate.blacklist"):
            with open("/etc/mintupdate.blacklist") as blacklist_file:
                for line in blacklist_file:
                    line = line.strip()
                    if line.startswith("#"):
                        continue
                    blacklisted.append(line)
        if args.ignore:
            blacklisted.extend(args.ignore.split(","))

        updates = []
        for source_name in sorted(check.updates.keys()):