Original site: http://www.xs4all.nl/~jantien/software/cyg-apt

help


cyg-apt [OPTION]... COMMAND [PACKAGE]...

Commands:
    ball - print tarball name
    build - build package from source in CWD
    download - download package
    find - package containing file
    help - help COMMAND
    install - download and install packages with dependencies
    list - installed packages
    md5 - check md5 sum
    missing - print missing dependencies
    new - list new packages in distribution
    remove - uninstall packages
    requires - print requires: for package
    search - search package list
    setup - cygwin environment
    source - download, build and install
    update - setup.ini
    upgrade - all installed packages
    url - print tarball url
    version - print installed version

Options:
    -d,--download          download only
    -i,--ini=FILE          use setup.ini [%(setup_ini)s]
    -m,--mirror=URL        use mirror [%(mirror)s]
    -r,--root=DIR          set cygwin root [%(root)s]
    -t,--t=NAME            set dist name (*curr*, test, prev)
    -x,--no-deps           ignore dependencies

main logic

import main
import getopt
import os
import sys
import urllib

The abi change.

ABI = os.environ.get('ABI', '')

root = '/cygwin' NETREL = '/netrel' EXTRA = NETREL + '/extra'

PATCH = NETREL + '/patch'

SRC = NETREL + '/src' CWD = os.getcwd ()

os.environ['PATH'] = NETREL + '/bin:' + os.environ['PATH']

mirror = 'ftp://mirrors.rcn.net/mirrors/sources.redhat.com/cygwin' mirror = 'http://mirrors.rcn.net/pub/sourceware/cygwin'

downloads = root + '/var/cache/setup/' + urllib.quote (mirror, '').lower ()

config = root + '/etc/setup' setupini = config + '/setup.ini' installeddb = config + '/installed.db' installeddbmagic = 'INSTALLED.DB 2\n'

INSTALL = 'install'

The abi change.

ABI = os.environ.get('ABI', '')

root = '/cygwin' NETREL = '/netrel' EXTRA = NETREL + '/extra'

PATCH = NETREL + '/patch'

SRC = NETREL + '/src' CWD = os.getcwd ()

os.environ['PATH'] = NETREL + '/bin:' + os.environ['PATH']

mirror = 'ftp://mirrors.rcn.net/mirrors/sources.redhat.com/cygwin' mirror = 'http://mirrors.rcn.net/pub/sourceware/cygwin'

downloads = root + '/var/cache/setup/' + urllib.quote (mirror, '').lower ()

config = root + '/etc/setup' setupini = config + '/setup.ini' installeddb = config + '/installed.db' installeddbmagic = 'INSTALLED.DB 2\n'

INSTALL = 'install'

================(snip)================================

(options, files) = getopt.getopt (sys.argv[1:],
                  'dhi:m:r:t:x',
                  ('download', 'help', 'mirror=', 'root='
                   'ini=', 't=', 'no-deps'))

command = 'help' if len (files) > 0: command = files[0]

packagename = 0 if len (files) > 1: packagename = files[1]

distname = 'curr'

dependp = 0 downloadp = 0 for i in options: o = i[0] a = i[1]

if 0:
    pass
elif o == '--download' or o == '-d':
        download_p = 1
elif o == '--help' or o == '-h':
    command = 'help'
    break
elif o == '--ini' or o == '-i':
    setup_ini = a
elif o == '--mirror' or o == '-m':
    mirror = a
elif o == '--root' or o == '-r':
    root = a
elif o == '--t' or o == '-t':
    distname = a
elif o == '--no-deps' or o == '-x':
    depend_p = 1

================(snip)================================

if command == 'setup':
    setup ()
    sys.exit (0)

if command == 'update': update () sys.exit (0)

for i in (installeddb, setupini): if not os.path.isfile (i): sys.stderr.write ('error: %s no such file\n' % i) sys.stderr.write ('error: set ABI and run cyg-apt setup\n') sys.exit (2)

getsetupini () get_installed ()

if command and hasattr(main, command): getattr(main,command) ()

changed November 29, 2009