This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'logger' | |
# Monkeypatch a 'trace' loglevel into ruby Logger | |
class Logger | |
module Severity; TRACE=-1;end | |
def trace(progname = nil, &block);add(TRACE, nil, progname, &block);end | |
def trace?; @level <= TRACE; end | |
end | |
l = Logger.new(STDERR) | |
l.level = Logger::TRACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Usage: | |
# python aptcompare.py foo-2.0.873-3ubuntu1 foo-2.0.873-3ubuntu1+foo | |
# Outputs: | |
# version foo-2.0.873-3ubuntu1 < version foo-2.0.873-3ubuntu1+foo | |
# See: | |
# http://stackoverflow.com/questions/4957514/how-to-compare-debian-package-versions | |
import apt | |
import sys |