_2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s tuvwxyz{|}~      !"#$%&'()*+,-./01"portablealphaDavid Fox <dsf@seereason.com>23456789:;<=>?@ABCDEFGHIJKL2654334567:9889:;<=>?@ABCDEFGHIJK<=>?@ABCDEFGHIJKL MNOPQRSTU MONPPNOPQRRSTTUU4If the URI type could be read and showed this wouldn't be necessary. 2VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~EWe have to do this wackiness because ~ is less than the empty string :Convert a string to a debian version number. May throw an D exception if the string is unparsable -- but I am not sure if that > can currently happen. Are there any invalid version strings? - Perhaps ones with underscore, or something? ASplit a DebianVersion into its three components: epoch, version, @ revision. It is not safe to use the parsed version number for @ this because you will lose information, such as leading zeros.            CWe implement two types of version number tags. One has the format  r 5releasenumber>vendor<buildnumber>~release<buildnumber  the other simply  vendor buildnumber>~release<buildnumber E There are notes from a meeting that explains why ReleaseTagBuild is 1 more future friendly, but it is also more ugly. BParse a Debian revision string (the portion of the version number ; following the final dash) into a prefix and a VersionTag. The tag returned by splitTag  The prefix returned by splitTag CModify a version number by adding or changing the vendor tag. The ? result will be newer than the distVersion (the newest already @ uploaded version.) It will also be different from (though not < necessarily newer than) any of the elements of allVersions Format a tag as a string. @Append a vendor tag to a string containing the revision portion  of a debian version number. @Change the revision part of a Debian version number. (This may  belong in Debian.Version.)  A package'9s subsection is only evident in its control information, C packages from different subsections all reside in the same index. ;A section of a repository such as main, contrib, non-free, > restricted. The indexes for a section are located below the  distribution directory. AThe types of architecture that a package can have, either Source & or some type of binary architecture. CA distribution (aka release) name. This type is expected to refer D to a subdirectory of the dists directory which is at the top level  of a repository.  !"#$%& !"#$%&  !"#$%&'>This is a name given to a combination of parts of one or more 8 releases that can be specified by a sources.list file. 2<quoteWords - similar to words, but with special handling of  double-quotes and brackets.  The handling double quotes and [] is supposed to match:  apt-0.6.44.2/apt-pkg/contrib/strutl.cc:ParseQuoteWord() !The behaviour can be defined as: ABreak the string into space seperated words ignoring spaces that  appear between "" or []). Strip trailing and leading white space > around words. Strip out double quotes, but leave the square  brackets intact. 5(parseSourceLine -- parses a source line L the argument must be a non-empty, valid source line with comments stripped  see: 4 '()*+,-./01234567/10*+,-.'()234567'()()*+,-.+,-./1001234567BB. parse a debian relation (i.e. the value of a : Depends field). Return a parsec error or a value of type  G I;Check if a version number satisfies a version requirement. 89:;<=>?@ABCDEFGHIHGFECDAB>@?8=<;:9I8=<;:99:;<=>@??@ABBCDDEFGHI89:;<=>?@ABCDEFGHIJKHFEGCD>@?8=<;:9IJABKJK89:;<=>?@ABCDEFGHIJHFEGCD>@?8=<;:9IJAB89:;<=>?@ABCDEFGHIJHFEGCD>@?8=<;:9IJAB LLL M+Print a message without forcing the command' s output N+Print a message without forcing the command' s output OPrint stdout to stdout PPrint stderr to stderr Q7Print all the output to the appropriate output channel R>Print one dot to stderr for every COUNT characters of output. MNOPQRMNOPQRMNOPQR TT  filepath is a simple wrapper function  that parses filepath using pControl UU   sourceName handle -  sourceName" is only used for error reporting VparseControlFromString  sourceName text -  sourceName" is only used for error reporting WW  fieldName paragraph looks up a \  in a ^ .  N.B.$ trailing and leading whitespace is not stripped. X?Strip the trailing and leading space and tab characters from a  string. Folded whitespace is not unfolded. This should probably - be moved to someplace more general purpose. Z@NOTE: we do not strip the leading or trailing whitespace in the  name or value i6Move selected fields to the beginning of a paragraph. j6Run a command and parse its output as a control file. k'look up the md5sum file in a paragraph % Tries several different variations:  MD5Sum:  Md5Sum:  MD5sum: STUVWXYZ[\]^_`abcdefghijk_`a]^Z\[STUVWXYbcdefghijkSTUVWXYTUVWXYZ\[[\]^^_`a`abcdefghijk lmnopnoplmlmmnop  !, applied to a predicate p and a ByteString xs, 0 returns the longest prefix (possibly empty) of xs of elements that  satisfy p. findIndexOrEnd4 is a variant of findIndex, that returns the length < of the string if no element is found, rather than Nothing. The  !" function takes a predicate and a  ByteString and : returns the index of the first element in the ByteString  satisfying the predicate. STUVWXYZ[\]^_`abcdefghiqrs_`a]^Z\[srqSTUVWXYbcdefghiqrsxDA parser for debian control file. This parser handles control files D that end without a newline as well as ones that have several blank D lines at the end. It is very liberal and does not attempt validate E the fields in any way. All trailing, leading, and folded whitespace ' is preserved in the field values. See X. AWe are liberal in that we allow *any* field to have folded white A space, even though the specific restricts that to a few fields. We go with the assumption that ' blank lines' mean lines that < consist of entirely of zero or more whitespace characters. STUVWXYZ[\]^_`abcdefghituvwx_`a]^Z\[vuwtSTUVWXYxbcdefghituvwxyyy!STUVWXYZ[\]^_`abcdefghituvwxz_`a]^Z\[vuwtSTUVWXYxbcdefghizz ESpecifies build dependencies that should be ignored during the build I decision. If the pair is (BINARY, Nothing) it means the binary package I BINARY should always be ignored when deciding whether to build. If the J pair is (BINARY, Just SOURCE) it means that binary package BINARY should < be ignored when deiciding whether to build package SOURCE. @This type describes the build dependencies of a source package. VReturn the dependency info for a source package with the given dependency relaxation. @ |According to debian policy, only the first paragraph in debian/ control can be a source package   Rhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-sourcecontrolfiles ,Remove any dependencies that are designated "relaxed" by relaxInfo. >Given an ordering function representing the dependencies on a D list of packages, return a triple: One ready package, the packages B that depend on the ready package directly or indirectly, and all  the other packages. Remove any packages which can',t be built given that a package has failed. @Given a list of packages, sort them according to their apparant 3 build dependencies so that the first element doesn't depend on any  of the other packages. =Build a graph with the list of packages as its nodes and the " build dependencies as its edges. BThis is a nice start. It ignores circular build depends and takes ! a pretty simplistic approach to  ! build depends. However, I 3 think this should work pretty nicely in practice. 8Return the dependency info for a list of control files. @One example of how to tie the below functions together. In this  case fp5 is the path to a directory that contains a bunch of C checked out source packages. The code will automatically look for  fp/*/debian/4control. It returns a list with the packages in the  order they should be built. {|}~{~|}{~|}|}~"portablealphaDavid Fox <dsf@seereason.com>9List the packages bundled with this version of the given ? compiler. If the answer is not known, return the empty list. =Determine whether a specific version of a Haskell package is B bundled with into this particular version of the given compiler. 7Some dependencies are libraries, some are executables. ,A changelog is a series of ChangeLogEntries 6An entry in the list of files generated by the build. AA file generated by dpkg-buildpackage describing the result of a  package build >The full pathname of the directory holding the .changes file. 4The package name parsed from the .changes file name 6The version number parsed from the .changes file name ,The Distribution field of the .changes file 4The architecture parsed from the .changes file name "The contents of the .changes file 4The value of the Changes field of the .changes file (The parsed value of the Files attribute DShow just the top line of a changelog entry (for debugging output.) ;Parse a Debian Changelog and return a lazy list of entries LParse a single changelog entry, returning the entry and the remaining text. >Parse the changelog information that shows up in the .changes 1 file, i.e. a changelog entry with no signature.  #portablealphaDavid Fox <dsf@seereason.com>.Each cabal package corresponds to a directory  name>-<version,  either in usr lib or in usrlibhaskell-packagesghc6/lib. A In that directory is a compiler subdirectory such as ghc-6.8.2. A In the ghc subdirectory is one or two library files of the form  libHS *name>-<version>.a and libHS<name>-<version_p.a. We can @ determine the debian package names by running dpkg -S on these  names, or examining the varlibdpkginfo/*.list files. From ? these we can determine the source package name, and from that ! the documentation package name. 5Write a file which we might still be reading from in % order to compute the text argument. ;Given a path, return the name of the package that owns it. Debian packages don'.t have per binary package build dependencies, % so we just gather them all up here. cartesianProduct [[1,2,3], [4,5],[6]] -> [[1,4,6],[1,5,6],[2,4,6],[2,5,6],[3,4,6],[3,5,6]] CConvert from license to RPM-friendly description. The strings are 6 taken from TagsCheck.py in the rpmlint distribution. $portablealphaDavid Fox <dsf@seereason.com>G creates a map from a package name to all the versions of that package , NOTE: Provides are not included in the map 9 NOTE: the sort order is random -- this is perhaps a bug  see also:  5 finds packages that Provide other packages and adds A them to the PackageNameMap. They will be adde to the end of the " list, so that real packages have 'higher priority' than virtual  packages. 6 NOTE: Does not check for duplication or multiple use  > returns all the packages that satisfy the specified relation  TODO: Add architecture check -withMethod - run |methodPath| bracketed with  openMethod/'closeMethod. |f| gets the open handle. EwhichMethodBinary - find the method executable associated with a URI  throws an exception on failure )fetch a single item, show console output  see also: getLastModified =@;  3function-type for a function that downloads a file A The timestamp is optional. If the local file is as new or newer 4 than the remote copy, the download may be skipped. 9A good choice might be a partially parameterized call to   BPackage indexes on the server are uncompressed or compressed with F gzip or bzip2. We do not know what will exist on the server until we D actually look. This type is used to mark the compression status of  what was actually found. #update - similar to apt-get update #download possibly compressed files < NOTE: index uri must not include the .bz2 or .gz extension :examine a DebSource line, and calculate for each section: + - the URI to the uncompressed index file > - the basename that apt-get would name the downloaded index : FIXME: ExactPath dist will fail with error at runtime :(  return a tuple for the section + - the URI to the uncompressed index file < - the basename that apt-get uses for the downloaded index , FIXME: support for Release and Release.gpg (Parse a possibly compressed index file. )parse an index possibly compressed file 3A release file contains a list of indexes (Packages/Sources). Each E Package or Source index may appear multiple times because it may be A compressed several different ways. This function will return an B assoc list where the key is the name of the uncompressed package C index name and the value is the list of (file, compression) which  decompress to the key. =The release file contains the checksums for the uncompressed C package indexes, even if the uncompressed package indexes are not D stored on the server. This function returns the list of files that  actually exist. 4make a FileTuple for a file found on the local disk  returns  % if the file does not exist. Dfind the Contents-* files. These are not listed in the Release file Kcreate a map of (package name, extracted field) from a list of index files BNOTE: we could merge all the files into a single control and then D run packageMap over that. We currently do it one control file at a @ time to avoid having all the control files loaded in memory at A once. However, I am not sure that property is actually occuring ' anyway. So, this should be revisited. Gcreate a map of (package name, max version) from a single control file 4extract the version number from a control paragraph bcompare two sources.list and find all the packages in the second that trump packages in the first  see also: |trumpedMap| #calculate all the trumped packages  create  trumped /- XML element and children from a trumped Map     Fconflicting packages and relations that require non-existant packages !TODO addProvides -- see DQL.Exec JAS: deal with Provides0 (can a package provide more than one package?) */earliestInconsistency does what it sounds like  the ' reverse as'3 is because the vars are order high to low, but we B want to find the lowest numbered (aka, eariest) inconsistency ?? /bj - backjumping labeler =If the node already has a conflict set, then leave it alone. BOtherwise, the conflictset for the node is the combination of the &conflict sets of its direct children. +     !"#$%&'()*+,-./01(   !"#$%&'()* +, -./01(      !"#$%&'()*+,-./01&'()*+,-./0123456789:;;<=>>?@ABBCDEFGHIJJKLLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl m n o p q r s t u v w x y z { | } ~     }  }      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]^]_``aa&bcdbcdbcebcfbcgbchbchbcibcjbckbclbcmbcnbcobcpbcqbcrbcsbctbcubcvbcwbcxbcybczbc{bc|bc}bc~bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc     ! """"""#######$ % debian-3.32Debian.Version.Common Debian.URI Debian.TimeDebian.VersionPolicyDebian.ReleaseDebian.SourcesDebian.Relation.CommonDebian.Relation.StringDebian.Extra.FilesDebian.Extra.CIODebian.Control.CommonDebian.Control.PrettyPrintDebian.Control.ByteStringDebian.Control.String Debian.DebDebian.ControlDebian.GenBuildDepsDebian.Util.FakeChangesDebian.ChangesDebian.Apt.PackageDebian.Apt.MethodsDebian.Apt.Index Debian.ReportDebian.Apt.Dependencies!Distribution.Package.Debian.SetupDebian.Version.InternalDebian.Version.StringDebian.Version.ByteStringDebian.VersionDebian.Relation.ByteStringDebian.Relationbase Data.List#Distribution.Package.Debian.BundledDistribution.Package.Debian Distribution.Package.Debian.Main Data.Maybe DebianVersion URIString fileFromURI dirFromURIrfc822DateFormatepochTimeToUTCTimeformatTimeRFC822parseTimeRFC822getCurrentLocalRFC822TimeParseDebianVersionparseDebianVersionparseDVevrbuildDebianVersion VersionTagparseTaggetTagdropTagsetTagtagMax appendTag SubSectionsectionsubSectionNameSectionArchBinarySource ReleaseNamerelNameparseReleaseName releaseName'archName sectionName sectionName'sectionNameOfSubSection SliceName sliceName DebSource sourceType sourceUri sourceDist SourceTypeDebSrcDeb quoteWords stripLine sourceLinesparseSourceLineparseSourceLine'parseSourcesList VersionReqSGRGREEEQLTESLTArchitectureReq ArchExceptArchOnlyParseRelationsparseRelationsRelationRel OrRelation AndRelation RelationsPkgNamecheckVersionReq RelParser pRelationswithTemporaryFiletMessagevMessage printStdout printStderr printOutput dotOutputControlFunctionsparseControlFromFileparseControlFromHandle parseControllookupPstripWSasStringField'CommentField Paragraph' ParagraphControl'Control unControl mergeControls fieldValue removeField prependFields appendFields renameField modifyField raiseFieldsparseControlFromCmd md5sumFieldToTexttotext ppControl ppParagraphppField ControlParserpControlfields packParagraph BuildableInfo CycleInfodepPairs readyTriples allBlocked RelaxInfoDepInfo BinPkgName SrcPkgNamebuildDependencies relaxDeps buildable failPackage orderSource compareSourcegenDepsgetSourceOrder fakeChangesChangeLogEntryEntry logPackage logVersionlogDists logUrgency logCommentslogWhologDateChangedFileSpecchangedFileMD5sumchangedFileSHA1sumchangedFileSHA256sumchangedFileSizechangedFileSectionchangedFilePrioritychangedFileName ChangesFileChanges changeDir changePackage changeVersion changeRelease changeArch changeInfo changeEntry changeFileschangesFileNameparseLog parseEntry parseChangesPackageNameMappackageNameMap addProvides findProvideslookupPackageByRelFetchCallbackslogCBstatusCB uriStartCB uriDoneCB uriFailureCBgeneralFailureCBauthorizationRequiredCBmediaFailureCBdebugCB ConfigItemHeaderCommand MediaChangedAuthorizationCredentials Configuration URIAcquireStatus MediaFailureAuthorizationRequiredGeneralFailure URIFailuremessageURIDonefilenamehashesimsHitURIStarturisize lastModified resumePointLogMsg CapabilitiesversionsingleInstancepreScanpipeline sendConfig needsCleanup localOnlyDriveMediaPasswordUserSiteMessage withMethodURIwithMethodPathwhichMethodPath recvStatus sendCommand openMethod closeMethod simpleFetchfetchgetLastModified FileTupleSizeFetcher CheckSumsmd5sumsha1sha256 Compression UncompressedGZBZ2updatecontrolFromIndexcontrolFromIndex' findIndexesindexesInReleasetupleFromFilePathfindContentsFilesmakePackageMap packageMapextractVersiontrumped trumpedMap trumpedXMLLabeler ConflictSetCSPpnm relations depFunction conflictspackageVersionStateComplete MissingDep Remainingcomplete controlCSPtestCSPdepFpackageVersionParagraphconflict conflict'mkTreelabelinitTreemapTreefoldTree zipTreesWithpruneleavesinhTree distrTree mkSearchTreeearliestInconsistency isConflict solutionssearchbtbjunionCScombine DebActionUpdateDebianizationSubstVar DebianizeUsageDebTypeDocProfDevFlags rpmPrefix rpmCompilerrpmConfigurationsFlags rpmHaddockrpmHelp debLibProfrpmNamerpmOptimisation rpmRelease rpmSplitObjs debOutputDir rpmVerbosity rpmVersion debMaintainer debAction parseArgsFound SimulatedunFoundNumeric NonNumeric network-2.2.1 Network.URIURIAuth uriUserInfo uriRegNameuriPortURI uriScheme uriAuthorityuriPathuriQuery uriFragmentnullURIparseURIparseURIReferenceparseRelativeReferenceparseAbsoluteURIisURIisURIReferenceisRelativeReference isAbsoluteURI isIPv6address isIPv4address isReserved isUnreserved uriToStringisAllowedInURIisUnescapedInURI escapeURICharescapeURIStringunEscapeStringnonStrictRelativeTo relativeTo relativeFrom normalizeCasenormalizeEscapenormalizePathSegmentsparseabsoluteURI escapeStringreserved unreservedscheme authoritypathqueryfragment uriToString'compareNonNumericepochrevisionshowTag setRevisiontagCmpbumpTagnewTagcompareSourceAndDist parseSection parseSection' _takeWhile2GHC.List takeWhilefindIndex2OrEnd _findIndex2 findIndexpFieldpBlanks packField formatControlformatParagraph formatField buildGraphor bundledWith isBundled isLibraryBundledbuiltIns docPrefix showHeader substvars replaceFile debOfFiledebianDependenciescartesianProduct showLicensedebianmainemptyFetchCallbackscliFetchCallbacks fetchIndex indexURIscalcPath groupIndexes filterExistsNothing sidPackages gutsyPackagestest